Skip to content

Commit 06a3ef7

Browse files
Update CI workflow
1 parent ae5692f commit 06a3ef7

File tree

1 file changed

+42
-30
lines changed

1 file changed

+42
-30
lines changed

.github/workflows/rust.yml

Lines changed: 42 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,37 +8,49 @@ on:
88

99
jobs:
1010
build:
11+
runs-on: ubuntu-latest
12+
continue-on-error: true
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: dtolnay/rust-toolchain@stable
17+
- uses: Swatinem/rust-cache@v2
18+
- name: Build
19+
run: cargo build
20+
21+
test:
22+
runs-on: ubuntu-latest
23+
continue-on-error: true
24+
25+
steps:
26+
- uses: actions/checkout@v4
27+
- uses: dtolnay/rust-toolchain@stable
28+
- uses: Swatinem/rust-cache@v2
29+
- name: Run tests
30+
run: cargo test
31+
- name: Run tests (no default features)
32+
run: cargo test -p onvif --no-default-features
33+
34+
clippy:
35+
runs-on: ubuntu-latest
36+
continue-on-error: true
37+
38+
steps:
39+
- uses: actions/checkout@v4
40+
- uses: dtolnay/rust-toolchain@stable
41+
with:
42+
components: clippy
43+
- name: Catch common mistakes
44+
run: cargo clippy --workspace --tests --all-targets -- -D warnings
1145

46+
rustfmt:
1247
runs-on: ubuntu-latest
48+
continue-on-error: true
1349

1450
steps:
15-
- uses: actions/checkout@v2
16-
- uses: actions-rs/toolchain@v1
17-
with:
18-
toolchain: stable
19-
default: true
20-
profile: minimal
21-
components: rustfmt, clippy
22-
- name: Build
23-
uses: actions-rs/cargo@v1
24-
with:
25-
command: build
26-
- name: Run tests
27-
uses: actions-rs/cargo@v1
28-
with:
29-
command: test
30-
- name: Check (no default features)
31-
uses: actions-rs/cargo@v1
32-
with:
33-
command: test
34-
args: -p onvif --no-default-features
35-
- name: Check formatting
36-
uses: actions-rs/cargo@v1
37-
with:
38-
command: fmt
39-
args: -- --check
40-
- name: Catch common mistakes
41-
uses: actions-rs/cargo@v1
42-
with:
43-
command: clippy
44-
args: --all-targets -- -D warnings
51+
- uses: actions/checkout@v4
52+
- uses: dtolnay/rust-toolchain@stable
53+
with:
54+
components: rustfmt
55+
- name: Check formatting
56+
run: cargo fmt -- --check

0 commit comments

Comments
 (0)