From 53c2bca3503be7e7641bfda669bded1ada6f7d0a Mon Sep 17 00:00:00 2001 From: apoorvsadana <95699312+apoorvsadana@users.noreply.github.com> Date: Fri, 9 Aug 2024 14:20:32 +0530 Subject: [PATCH 1/2] added coverall --- .github/workflows/test-bridge.yml | 36 +++++++++++++------------------ 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/.github/workflows/test-bridge.yml b/.github/workflows/test-bridge.yml index 3f6c3c7..2a9f74b 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,22 @@ jobs: echo "Running madara...." ./run_madara.sh - - name: Check if secret is accessible - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + - 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 From 5738ae9d1369bcf4a82bc608040a0369b0648c5b Mon Sep 17 00:00:00 2001 From: apoorvsadana <95699312+apoorvsadana@users.noreply.github.com> Date: Fri, 9 Aug 2024 14:24:11 +0530 Subject: [PATCH 2/2] fix workflow --- .github/workflows/test-bridge.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test-bridge.yml b/.github/workflows/test-bridge.yml index 2a9f74b..29a1f76 100644 --- a/.github/workflows/test-bridge.yml +++ b/.github/workflows/test-bridge.yml @@ -35,6 +35,9 @@ jobs: echo "Running madara...." ./run_madara.sh + - uses: taiki-e/install-action@cargo-llvm-cov + - uses: taiki-e/install-action@nextest + - name: Clean workspace run: | cargo llvm-cov clean --workspace