From 7cab61dab73df3435cda481e77935d2b6a9dc851 Mon Sep 17 00:00:00 2001 From: Matteo Muraca <56828990+muraca@users.noreply.github.com> Date: Thu, 14 Dec 2023 16:47:40 +0100 Subject: [PATCH] Run tests with `--release` flag (#159) --- .github/workflows/ci.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4647a697..c94b1437d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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