forked from GREsau/okapi
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (49 loc) · 1.39 KB
/
ci.yml
File metadata and controls
56 lines (49 loc) · 1.39 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
name: CI
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Rustup toolchain to 1.91.1
shell: bash
run: |
rustup default 1.91.1
rustup component add clippy rustfmt
- name: Cache cargo registry
uses: actions/cache@v3
with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
./target
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Build
run: cargo build
- name: Run tests
run: cargo test
- name: Format
run: cargo fmt -- --check
- name: Linting
run: cargo clippy -- -D warnings
# Run code coverage
- name: Run code coverage
continue-on-error: true
shell: bash
run: |
cargo install cargo-tarpaulin
cargo tarpaulin --out Xml --output-dir .
ls -la cobertura.xml
# Upload coverage to Codecov
- name: Upload coverage to Codecov
continue-on-error: true
uses: codecov/codecov-action@v5
with:
files: ./cobertura.xml
slug: sctg-development/okapi
token: ${{ secrets.CODECOV_TOKEN }}