Skip to content

Commit

Permalink
Run UI tests separately for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
jhpratt committed Jun 13, 2022
1 parent 21b439f commit 9a3f985
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -384,10 +384,11 @@ jobs:
curl -LsSf https://github.com/taiki-e/cargo-llvm-cov/releases/latest/download/cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin
- name: Generate coverage report
run: cargo llvm-cov --all-features --workspace --lcov -- --test-threads=1 > lcov.txt
env:
# Don't run these anywhere else as the results can depend on the exact compiler used.
RUSTFLAGS: "--cfg __ui_tests"
run: |
cargo llvm-cov clean --workspace
cargo llvm-cov --no-report --all-features -- --test-threads=1
RUSTFLAGS="--cfg __ui_tests" cargo llvm-cov --no-report --tests --all-features -- compile_fail
cargo llvm-cov --no-run --lcov > lcov.txt
- name: Upload coverage report
uses: codecov/codecov-action@v1
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ serde_test = "1.0.126"
quickcheck_macros = "1.0.0"

[target.'cfg(__ui_tests)'.dev-dependencies]
trybuild = "=1.0.34"
trybuild = "1.0.63"

[target.'cfg(bench)'.dev-dependencies]
criterion = "0.3.5"
Expand Down

0 comments on commit 9a3f985

Please sign in to comment.