-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (49 loc) · 1.42 KB
/
cargo.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
name: Cargo Tests
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
cargo:
timeout-minutes: 12
runs-on: ubuntu-latest
permissions:
checks: write
packages: read
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
# Sync with dockerfiles/cargo-base/Dockerfile
toolchain: 1.75
override: true
components: rustfmt, clippy
- name: Setup cargo cache
uses: Swatinem/rust-cache@v2
continue-on-error: false
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Run cargo fmt
run: cargo fmt --check
- name: Run tests
run: cargo llvm-cov --all-features --workspace --codecov --output-path codecov.json nextest
- name: Show coverage report
run: cargo llvm-cov report
- name: Check link
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-targets --all-features -- -D warnings
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: codecov.json
fail_ci_if_error: true
- name: Run cargo check
run: cargo check