-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update github workflow to upload test coverage reports (#759)
* update github workflow to upload coverage reports * avoid using xtask * use relative path for codecov CI workflow * improve relative paths * update relative paths * update path * use coverage for fuzz * update lcov path * use release flag for fuzz tests and grcov * use grcov github action * use grcov config * use grcov github action test suggestion * revert to source based code coverage * create tmp directory * use release for fuzz grcov * update codecov lcov file path * use tmp runner folder for coverage data * correct runner path in gh actions * use github actions default env var RUNNER_TEMP * gh action tmp folder and fail_ci_if_error true * correct file path * add own job for test and coverage upload * optimise github actions * change github workflow * fix github actions workflow * provide flag for github action codecov * use debug profile for tests for better cov reports * add fuzz coverage * remove fuzz coverage * add RUST_BACKTRACE to cargo fuzz * update cargo test comment
- Loading branch information
Showing
4 changed files
with
65 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,18 +27,20 @@ jobs: | |
- uses: actions-rs/[email protected] | ||
with: | ||
crate: taplo-cli | ||
|
||
- name: Cache Dependencies | ||
uses: Swatinem/rust-cache@v1 | ||
|
||
- name: Format | ||
run: ./scripts/tests/format.sh --check | ||
|
||
tests: | ||
name: Tests | ||
checks: | ||
name: Checks | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
scripts: [ | ||
"clippy", | ||
"misc", | ||
"parachain", | ||
"standalone" | ||
] | ||
|
@@ -52,7 +54,7 @@ jobs: | |
- name: Cache Dependencies | ||
uses: Swatinem/rust-cache@v1 | ||
|
||
- name: Tests | ||
- name: Checks | ||
run: ./scripts/tests/${{ matrix.scripts }}.sh | ||
benchmark: | ||
name: Quick check benchmarks | ||
|
@@ -63,8 +65,46 @@ jobs: | |
|
||
- name: Install rust toolchain | ||
run: rustup show | ||
|
||
- run: ./scripts/benchmarks/quick_check.sh | ||
|
||
tests: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
target: wasm32-unknown-unknown | ||
default: true | ||
override: true | ||
profile: minimal | ||
components: rustfmt, clippy, llvm-tools-preview | ||
|
||
- uses: actions-rs/[email protected] | ||
with: | ||
crate: grcov | ||
use-tool-cache: true | ||
|
||
- name: Cache Dependencies | ||
uses: Swatinem/rust-cache@v1 | ||
|
||
- name: Tests | ||
run: ./scripts/tests/misc.sh | ||
|
||
- name: Upload to codecov.io | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
files: ${{ runner.temp }}/zeitgeist-test-coverage.lcov | ||
fail_ci_if_error: true | ||
flags: tests | ||
verbose: true | ||
name: unit-tests | ||
|
||
fuzz: | ||
name: Fuzz | ||
runs-on: ubuntu-latest | ||
|
@@ -80,4 +120,7 @@ jobs: | |
crate: cargo-fuzz | ||
use-tool-cache: true | ||
|
||
- name: Cache Dependencies | ||
uses: Swatinem/rust-cache@v1 | ||
|
||
- run: ./scripts/tests/fuzz.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters