-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (43 loc) · 1.35 KB
/
cargo-test.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
on:
push:
paths:
- '**.rs'
- Cargo.toml
- Cargo.lock
- .github/workflows/cargo-test.yml
name: cargo test
jobs:
cargotest:
name: cargo test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install latest stable/nightly
shell: bash
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y
rustup default nightly
rustup default stable
rustup component add rustfmt
rustup component add rustfmt --toolchain nightly
rustup component add clippy
echo PATH="${HOME}/.cargo/bin:${PATH}" >> ${GITHUB_ENV}
- uses: taiki-e/install-action@cargo-llvm-cov
- uses: taiki-e/install-action@nextest
- name: Rust Cache
uses: Swatinem/[email protected]
- name: cargo test
shell: bash
run: |
cargo llvm-cov nextest --all --lcov --output-path lcov.info --all-features
cargo llvm-cov nextest --all --lcov --output-path lcov.info
env:
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
- name: Upload to codecov.io
uses: codecov/codecov-action@v3
with:
token: ${{secrets.CODECOV_TOKEN}}
fail_ci_if_error: true
flags: unittests
verbose: true
files: lcov.info