-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (33 loc) · 1.02 KB
/
ci.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
name: Rust CI
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
ci:
name: Lint, build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install system dependencies
run: |
sudo apt-get update && sudo apt-get install -y cmake
- name: Install toolchain
run: |
rustup update stable
rustup default stable
- name: Install additional tools
run: |
rustup component add clippy llvm-tools-preview
cargo install grcov convco
- name: run linter
run: cargo clippy -- --deny "warnings"
- name: build project
run: cargo build --verbose
- name: run tests
run: |
RUSTFLAGS="-C instrument-coverage" cargo test
mkdir -p target/coverage
grcov . --binary-path ./target/debug/deps/ -s . -t html,cobertura --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o target/coverage
cat target/coverage/html/coverage.json