-
Notifications
You must be signed in to change notification settings - Fork 6
57 lines (44 loc) · 1.26 KB
/
ci.yaml
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
name: CI
on: [push, pull_request]
env:
RUSTFLAGS: -D warnings
CARGO_TERM_COLOR: always
TEST_STATS_DELAY: 5000
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Lint (clippy)
run: cargo clippy --all-features
- name: Lint (rustfmt)
run: cargo fmt --all --check
build:
name: Build and test
runs-on: ubuntu-latest
strategy:
matrix:
rust-version: [ stable ]
services:
rabbitmq:
image: rabbitmq:4-management
ports:
- 15672:15672
- 5672:5672
steps:
- uses: actions/checkout@v3
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust-version }}
- uses: taiki-e/install-action@nextest
- name: Wait for node to start booting
run: sleep 15
- name: Configure broker
run: RUST_HTTP_API_CLIENT_RABBITMQCTL=DOCKER:${{job.services.rabbitmq.id}} bin/ci/before_build.sh
- name: Run tests
run: RUST_BACKTRACE=1 TEST_STATS_DELAY=1500 NEXTEST_RETRIES=4 cargo nextest run --workspace --no-fail-fast --all-features