Skip to content

Commit

Permalink
added coverall (#10)
Browse files Browse the repository at this point in the history
* added coverall

* fix workflow
  • Loading branch information
apoorvsadana authored Aug 12, 2024
1 parent 83cd8b6 commit f198dec
Showing 1 changed file with 18 additions and 21 deletions.
39 changes: 18 additions & 21 deletions .github/workflows/test-bridge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 &>/dev/null &
Expand All @@ -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

0 comments on commit f198dec

Please sign in to comment.