chore: add codecov for testing (#3)
Signed-off-by: Gaius <gaius.qi@gmail.com>
This commit is contained in:
parent
c1b714349f
commit
932d87f420
|
|
@ -41,14 +41,17 @@ jobs:
|
|||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install stable toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
- name: Install cargo-llvm-cov
|
||||
uses: taiki-e/install-action@v2
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
tool: cargo-llvm-cov
|
||||
|
||||
- name: Run cargo test
|
||||
uses: actions-rs/cargo@v1
|
||||
- name: Run tests
|
||||
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
command: test
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
files: lcov.info
|
||||
fail_ci_if_error: true
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ bin/
|
|||
|
||||
# Test binary, built with `go test -c`
|
||||
*.test
|
||||
lcov.info
|
||||
|
||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||
*.out
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
coverage:
|
||||
precision: 2
|
||||
round: down
|
||||
range: "80...100"
|
||||
status:
|
||||
project:
|
||||
default:
|
||||
enabled: no
|
||||
patch:
|
||||
default:
|
||||
enabled: no
|
||||
|
||||
comment:
|
||||
layout: "reach, diff, flags, files"
|
||||
behavior: default
|
||||
require_changes: false
|
||||
branches:
|
||||
- main
|
||||
Loading…
Reference in New Issue