From f198dec7920fb39a36681d05f40d08dfd1111c9a Mon Sep 17 00:00:00 2001 From: Apoorv Sadana <95699312+apoorvsadana@users.noreply.github.com> Date: Mon, 12 Aug 2024 17:28:12 +0530 Subject: [PATCH] added coverall (#10) * added coverall * fix workflow --- .github/workflows/test-bridge.yml | 39 ++++++++++++++----------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/.github/workflows/test-bridge.yml b/.github/workflows/test-bridge.yml index 3f6c3c7..29a1f76 100644 --- a/.github/workflows/test-bridge.yml +++ b/.github/workflows/test-bridge.yml @@ -25,10 +25,6 @@ jobs: - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 - - name: Install tarpauline - run: | - cargo install cargo-tarpaulin - - name: Run anvil run: | anvil /dev/null & @@ -39,24 +35,25 @@ jobs: echo "Running madara...." ./run_madara.sh - - name: Check if secret is accessible - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + - uses: taiki-e/install-action@cargo-llvm-cov + - uses: taiki-e/install-action@nextest + + - name: Clean workspace run: | - if [ -n "CODECOV_TOKEN" ]; then - echo "Secret is accessible" - else - echo "Secret is not accessible" - exit 1 - fi - - - name: Run tests + cargo llvm-cov clean --workspace + + - name: Run llvm-cov run: | - echo "Running test...." - cargo tarpaulin --out Xml - sleep 5 # sleeping for few secs to ensure the coverage file is generated. + cargo llvm-cov nextest --release --lcov --output-path lcov.info + + - name: Coveralls + uses: coverallsapp/github-action@v2 + with: + files: lcov.info + debug: true - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4.0.1 + - name: Upload coverage report to Coveralls + uses: coverallsapp/github-action@v2 with: - token: ${{ secrets.CODECOV_TOKEN }} + files: lcov.info + debug: true