-
Notifications
You must be signed in to change notification settings - Fork 30
153 lines (120 loc) · 4.65 KB
/
linux.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: CI (Linux)
on: [ push, pull_request ]
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Start ArangoDB by docker-compose
run: |
docker compose -f tests/docker-compose.yml up -d
sleep 30
docker compose -f tests/docker-compose.yml logs
- name: Set up ArangoDB for test
run: bash tests/init_db.sh
- name: rustfmt
env:
RUST_LOG: arangors=trace
run: cargo fmt --all -- --check
- name: check build (blocking)
env:
RUST_LOG: arangors=trace
run: cargo check --no-default-features --features "rocksdb cluster enterprise blocking" --lib
- name: test (blocking)
env:
RUST_LOG: arangors=trace
timeout-minutes: 40
run: cargo test --no-fail-fast --no-default-features --features "rocksdb cluster enterprise blocking" --lib -- --test-threads=1
- name: check build (reqwest_blocking)
env:
RUST_LOG: arangors=trace
run: cargo check --no-default-features --features "rocksdb cluster enterprise reqwest_blocking" --all
- name: test (reqwest_blocking)
env:
RUST_LOG: arangors=trace
timeout-minutes: 40
run: cargo test --no-fail-fast --no-default-features --features "rocksdb cluster enterprise reqwest_blocking" --all -- --test-threads=1
- name: check build (default features)
env:
RUST_LOG: arangors=trace
run: cargo check --all --bins --examples --tests
- name: tests (default features)
env:
RUST_LOG: arangors=trace
timeout-minutes: 40
run: cargo test --all --no-fail-fast -- --nocapture -- --test-threads=1
- name: check build (async)
env:
RUST_LOG: arangors=trace
run: cargo check --no-default-features --features "rocksdb cluster enterprise" --lib
- name: test (async)
env:
RUST_LOG: arangors=trace
timeout-minutes: 40
run: cargo test --no-fail-fast --no-default-features --features "rocksdb cluster enterprise" --lib -- --test-threads=1
- name: check build (reqwest_async)
env:
RUST_LOG: arangors=trace
run: cargo check --no-default-features --features "rocksdb cluster enterprise reqwest_async" --all
- name: test (reqwest_async)
env:
RUST_LOG: arangors=trace
timeout-minutes: 40
run: cargo test --no-fail-fast --no-default-features --features "rocksdb cluster enterprise reqwest_async" --all -- --test-threads=1
- name: check build (surf_async)
env:
RUST_LOG: arangors=trace
run: cargo check --no-default-features --features "rocksdb cluster enterprise surf_async" --all
- name: test (surf_async)
env:
RUST_LOG: arangors=trace
timeout-minutes: 40
run: cargo test --no-fail-fast --no-default-features --features "rocksdb cluster enterprise surf_async" --all -- --test-threads=1
mmfiles:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Start ArangoDB by docker
run: |
docker run -e ARANGO_STORAGE_ENGINE=mmfiles -e ARANGO_ROOT_PASSWORD=KWNngteTps7XjrNv -p 8529:8529 -d --name arangodb arangodb/arangodb
sleep 30
docker logs arangodb
- name: Set up ArangoDB for test
run: bash tests/init_db.sh
- name: check build
env:
RUST_LOG: arangors=trace
run: cargo check --all --bins --examples --tests --no-default-features --features "mmfiles cluster enterprise reqwest_blocking" --lib
- name: tests
env:
RUST_LOG: arangors=trace
timeout-minutes: 40
run: cargo test --all --no-fail-fast --no-default-features --features "mmfiles cluster enterprise reqwest_blocking" -- --test-threads=1
doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: doc
env:
RUSTDOCFLAGS: -Dwarnings
run: cargo doc --all --no-deps
publish:
name: Publish Package
needs: build_and_test
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Check semver
uses: obi1kenobi/cargo-semver-checks-action@v1
- name: login
env:
SUPER_SECRET: ${{ secrets.CARGO_TOKEN }}
run: cargo login "$SUPER_SECRET"
shell: bash
- name: publish
run: cargo publish