File tree Expand file tree Collapse file tree 5 files changed +164
-201
lines changed
Expand file tree Collapse file tree 5 files changed +164
-201
lines changed Original file line number Diff line number Diff line change @@ -35,17 +35,23 @@ jobs:
3535 pre-commit run --all-files
3636
3737 - name : Build
38- run : cargo build --verbose
38+ run : cargo build
3939
4040 - name : Run tests
41- run : cargo test --verbose
41+ run : cargo test
4242
4343 - name : Code coverage
4444 run : |
4545 cargo install cargo-llvm-cov
4646 # rustup component add llvm-tools-preview --toolchain stable-x86_64-unknown-linux-gnu
4747 cargo llvm-cov
4848
49+ COVERAGE=$(cargo llvm-cov --json | jq -r '.data[0].totals.lines.percent')
50+
51+ if (( $(echo "$COVERAGE < 90" | bc -l) )); then
52+ echo "❌ Code coverage is below 90% (Current: ${COVERAGE}%)"
53+ exit 1
54+ fi
4955 # - name: Install Miri
5056 # run: |
5157 # rustup toolchain install nightly --component miri
Original file line number Diff line number Diff line change 22- repo : https://github.com/pre-commit/pre-commit-hooks
33 rev : v5.0.0
44 hooks :
5- - id : check-byte-order-marker
6- - id : check-case-conflict
75 - id : check-case-conflict
86 - id : check-merge-conflict
97 - id : check-symlinks
You can’t perform that action at this time.
0 commit comments