Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat : added test coverage #8

Merged
merged 14 commits into from
Aug 8, 2024
28 changes: 27 additions & 1 deletion .github/workflows/test-bridge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ on:
workflow_dispatch:
workflow_call:

env:
CARGO_TERM_COLOR: always

jobs:
test_bridge:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

# selecting a toolchain either by action or manual `rustup` calls should happen
# before the plugin, as the cache uses the current rustc version as its cache key
Expand All @@ -20,6 +25,10 @@ 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 @@ -30,7 +39,24 @@ jobs:
echo "Running madara...."
./run_madara.sh

- name: Check if secret is accessible
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
if [ -n "CODECOV_TOKEN" ]; then
echo "Secret is accessible"
else
echo "Secret is not accessible"
exit 1
fi

- name: Run tests
run: |
echo "Running test...."
RUST_LOG=info cargo test -- --nocapture
cargo tarpaulin --out Html
sleep 5 # sleeping for few secs to ensure the coverage file is generated.

- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 2 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Madara Bootstrapper 👾

[![codecov](https://codecov.io/gh/madara-alliance/madara-bootstrapper/graph/badge.svg?token=EHCDHVPLNN)](https://codecov.io/gh/madara-alliance/madara-bootstrapper)

Madara Bootstrapper is a tool that helps to deploy the **Token Bridge** & **Eth Bridge** contract
between a madara/katana Appchain and another L2 or L1 network. It will also declare wallet
contracts from **OpenZappelin**, **Argent** and **Braavos**. You can find the full list of contracts
Expand Down
Loading