-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 loc) · 861 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
39
40
41
name: test
on:
push:
branches: [ "main" ]
paths:
- '**.rs'
- 'src/**.rs'
pull_request:
branches: [ "main" ]
paths:
- '**.rs'
- 'src/**.rs'
env:
CI: true
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install tarpaulin
run: cargo install --locked cargo-tarpaulin
- name: Run build
run: cargo build --locked
- name: Run clippy
run: cargo clippy --all-targets --all-features --no-deps -- -D warnings
- name: Run lint
run: cargo fmt -- --check
- name: Run tests
run: cargo tarpaulin --locked --out xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
file: ./cobertura.xml