diff --git a/.github/workflows/test-bridge.yml b/.github/workflows/test-bridge.yml index 3a044f8..38da66e 100644 --- a/.github/workflows/test-bridge.yml +++ b/.github/workflows/test-bridge.yml @@ -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 @@ -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 & @@ -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/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/Readme.md b/Readme.md index 914ccbf..80aa41f 100644 --- a/Readme.md +++ b/Readme.md @@ -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