Skip to content

Commit 60688cf

Browse files
ci: Upgrade actions. Upgrade dependencies. (#169)
1 parent 47d83c6 commit 60688cf

File tree

17 files changed

+359
-249
lines changed

17 files changed

+359
-249
lines changed

.github/workflows/audit-on-push.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/deny.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Verify dependencies
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
branches:
10+
- main
11+
12+
jobs:
13+
deny-check:
14+
name: cargo-deny check
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
checks:
19+
- advisories
20+
- licenses
21+
steps:
22+
- uses: actions/checkout@v4
23+
- uses: EmbarkStudios/cargo-deny-action@v2
24+
with:
25+
command: check ${{ matrix.checks }}
26+
arguments: --all-features

.github/workflows/general.yml

Lines changed: 43 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Rust
22

3-
on: [push, pull_request]
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
48

59
env:
610
CARGO_TERM_COLOR: always
@@ -10,88 +14,63 @@ jobs:
1014
name: Test
1115
runs-on: ubuntu-latest
1216
steps:
13-
- uses: actions/checkout@v2
14-
- uses: actions-rs/toolchain@v1
15-
with:
16-
profile: minimal
17-
toolchain: stable
18-
override: true
19-
- uses: Swatinem/rust-cache@v1
20-
- uses: actions-rs/cargo@v1
21-
with:
22-
command: test
17+
- uses: actions/checkout@v5
18+
- name: Install Rust stable toolchain
19+
uses: actions-rust-lang/[email protected]
20+
- name: Test
21+
run: |
22+
cargo test
2323
2424
fmt:
2525
name: Rustfmt
2626
runs-on: ubuntu-latest
2727
steps:
28-
- uses: actions/checkout@v2
29-
- uses: actions-rs/toolchain@v1
30-
with:
31-
profile: minimal
32-
toolchain: stable
33-
override: true
34-
components: rustfmt
35-
- uses: Swatinem/rust-cache@v1
36-
- uses: actions-rs/cargo@v1
37-
with:
38-
command: fmt
39-
args: --all -- --check
28+
- uses: actions/checkout@v5
29+
- name: Install Rust stable toolchain
30+
uses: actions-rust-lang/[email protected]
31+
- name: Format
32+
run: |
33+
cargo fmt --all -- --check
4034
4135
clippy:
4236
name: Clippy
4337
runs-on: ubuntu-latest
4438
steps:
4539
- name: Checkout repository
46-
uses: actions/checkout@v2
47-
- uses: actions-rs/toolchain@v1
48-
with:
49-
profile: minimal
50-
toolchain: stable
51-
override: true
52-
components: clippy
53-
- uses: Swatinem/rust-cache@v1
54-
- uses: actions-rs/cargo@v1
55-
with:
56-
command: clippy
57-
args: -- -D warnings
40+
uses: actions/checkout@v5
41+
- name: Install Rust stable toolchain
42+
uses: actions-rust-lang/[email protected]
43+
- name: Lint
44+
run: |
45+
cargo clippy -- -D warnings
5846
5947
docs:
6048
name: Docs
6149
runs-on: ubuntu-latest
6250
steps:
6351
- name: Checkout repository
64-
uses: actions/checkout@v2
65-
- name: Install Rust
66-
uses: actions-rs/toolchain@v1
67-
with:
68-
toolchain: stable
69-
profile: minimal
70-
override: true
71-
- uses: Swatinem/rust-cache@v1
72-
- name: Check documentation
73-
env:
74-
RUSTDOCFLAGS: -D warnings
75-
uses: actions-rs/cargo@v1
76-
with:
77-
command: doc
78-
args: --no-deps --document-private-items
52+
uses: actions/checkout@v5
53+
- name: Install Rust stable toolchain
54+
uses: actions-rust-lang/[email protected]
55+
- name: Document
56+
run: |
57+
cargo doc --no-deps --document-private-items
7958
8059
coverage:
81-
name: Code coverage
8260
runs-on: ubuntu-latest
61+
env:
62+
CARGO_TERM_COLOR: always
8363
steps:
84-
- name: Checkout repository
85-
uses: actions/checkout@v2
86-
87-
- name: Install stable toolchain
88-
uses: actions-rs/toolchain@v1
89-
with:
90-
toolchain: stable
91-
override: true
92-
93-
- uses: Swatinem/rust-cache@v1
94-
- name: Run cargo-tarpaulin
95-
uses: actions-rs/[email protected]
64+
- uses: actions/checkout@v5
65+
- name: Install Rust stable toolchain
66+
uses: actions-rust-lang/[email protected]
67+
- name: Install cargo-llvm-cov
68+
uses: taiki-e/install-action@cargo-llvm-cov
69+
- name: Generate code coverage
70+
run: cargo llvm-cov --all-features --workspace --codecov --output-path codecov.json
71+
- name: Upload coverage to Codecov
72+
uses: codecov/codecov-action@v3
9673
with:
97-
args: '--ignore-tests'
74+
token: ${{ secrets.CODECOV_TOKEN }}
75+
files: codecov.json
76+
fail_ci_if_error: true

.github/workflows/scheduled-audit.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)