Skip to content

Commit

Permalink
Run tests with --release flag (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
muraca authored Dec 14, 2023
1 parent aa55bed commit 7cab61d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,19 @@ jobs:
cache-targets: true
cache-on-failure: true
- name: Run tests and print coverage data
run: cargo llvm-cov nextest --workspace
--exclude node-template --exclude parachain-template-node
--exclude derive-no-bound
run: |
cargo llvm-cov nextest --release --workspace \
--exclude node-template --exclude parachain-template-node \
--exclude derive-no-bound \
--json --output-path lcov.json --summary-only &&
echo "Lines coverage " && jq ".data[0].totals.lines.percent" lcov.json
perc=`jq ".data[0].totals.lines.percent" lcov.json` &&
echo Lines coverage: ${perc:0:5}%
# if the PR is on the same repo, the coverage data can be reported as a comment
- if: github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name == github.repository
name: Generate lcov report
run: cargo llvm-cov report --lcov --output-path lcov.info
--ignore-filename-regex "node/"
--ignore-filename-regex "node" --release
- if: github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name == github.repository
name: Report code coverage
Expand Down

0 comments on commit 7cab61d

Please sign in to comment.