-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (35 loc) · 1012 Bytes
/
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
name: Test
on:
push:
branches: [ master ]
pull_request:
jobs:
test:
name: test
runs-on: ubuntu-22.04
steps:
- name: Git checkout
uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
id: rust-toolchain
- name: Setup rust cache
uses: Swatinem/rust-cache@v2
with:
shared-key: ${{ steps.rust-toolchain.outputs.cachekey }}
- name: Install cargo-llvm-cov and nextest
uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov,cargo-nextest
- name: Run tests
id: test
run: cargo llvm-cov nextest --lcov --output-path lcov.info
continue-on-error: true
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./lcov.info
fail_ci_if_error: true
- name: End test
run: '[ "${{ steps.test.outcome }}" = "success" ]'