-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (50 loc) · 1.34 KB
/
rust.yml
File metadata and controls
60 lines (50 loc) · 1.34 KB
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
50
51
52
53
54
55
56
57
58
59
60
name: Rust
on:
push:
branches: [ "main" ]
paths:
- '**.rs'
- 'Cargo.toml'
- 'Cargo.lock'
pull_request:
branches: [ "main" ]
paths:
- '**.rs'
- 'Cargo.toml'
- 'Cargo.lock'
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Lint & Test
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Setup Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Run Lints
run: |
nix develop --command make lint
- name: Run Tests With Coverage
id: coverage
run: |
nix develop --command make coverage-lcov
nix develop --command make test-junit
- name: Upload coverage to Codecov
if: steps.coverage.outcome == 'success'
uses: codecov/codecov-action@v5
with:
files: target/coverage/lcov.info
name: favkit-coverage
fail_ci_if_error: true
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: target/nextest/ci/junit.xml