From 6a841c32a538be015e05aff943dfa3f0dca41378 Mon Sep 17 00:00:00 2001 From: Arun Jangra Date: Wed, 7 Aug 2024 19:36:07 +0530 Subject: [PATCH 01/14] feat : added test coverage --- .github/workflows/test-bridge.yml | 15 ++++++++++++++- Readme.md | 2 ++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-bridge.yml b/.github/workflows/test-bridge.yml index 3a044f8..496e05c 100644 --- a/.github/workflows/test-bridge.yml +++ b/.github/workflows/test-bridge.yml @@ -5,6 +5,9 @@ on: workflow_dispatch: workflow_call: +env: + CARGO_TERM_COLOR: always + jobs: test_bridge: runs-on: macos-latest @@ -20,6 +23,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 & @@ -33,4 +40,10 @@ jobs: - name: Run tests run: | echo "Running test...." - RUST_LOG=info cargo test -- --nocapture + cargo tarpaulin --out Html + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ./tarpaulin-report.html 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 From 635ecfecae5e21f37cfd06570bb35a5cacc55f0c Mon Sep 17 00:00:00 2001 From: Arun Jangra Date: Wed, 7 Aug 2024 20:02:56 +0530 Subject: [PATCH 02/14] feat : updated github ci --- .github/workflows/test-bridge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-bridge.yml b/.github/workflows/test-bridge.yml index 496e05c..6384071 100644 --- a/.github/workflows/test-bridge.yml +++ b/.github/workflows/test-bridge.yml @@ -43,7 +43,7 @@ jobs: cargo tarpaulin --out Html - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4.0.1 with: token: ${{ secrets.CODECOV_TOKEN }} files: ./tarpaulin-report.html From ed063345b476821a65b81bf143a9b98be9801c77 Mon Sep 17 00:00:00 2001 From: Arun Jangra Date: Wed, 7 Aug 2024 20:34:32 +0530 Subject: [PATCH 03/14] feat : updated codecov step --- .github/workflows/test-bridge.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-bridge.yml b/.github/workflows/test-bridge.yml index 6384071..0372a45 100644 --- a/.github/workflows/test-bridge.yml +++ b/.github/workflows/test-bridge.yml @@ -44,6 +44,5 @@ jobs: - name: Upload coverage to Codecov uses: codecov/codecov-action@v4.0.1 - with: - token: ${{ secrets.CODECOV_TOKEN }} - files: ./tarpaulin-report.html + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} From 4b5f109190f13e5bdc31c0732bfc70fcf61799f3 Mon Sep 17 00:00:00 2001 From: Arun Jangra Date: Wed, 7 Aug 2024 21:12:05 +0530 Subject: [PATCH 04/14] feat : updated codecov step --- .github/workflows/test-bridge.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test-bridge.yml b/.github/workflows/test-bridge.yml index 0372a45..2fef371 100644 --- a/.github/workflows/test-bridge.yml +++ b/.github/workflows/test-bridge.yml @@ -44,5 +44,7 @@ jobs: - name: Upload coverage to Codecov uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} From a67ba164a8641948538cae9d73cad2c527ab762e Mon Sep 17 00:00:00 2001 From: Arun Jangra Date: Thu, 8 Aug 2024 00:16:23 +0530 Subject: [PATCH 05/14] update : ci --- .github/workflows/test-bridge.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-bridge.yml b/.github/workflows/test-bridge.yml index 2fef371..04f97f7 100644 --- a/.github/workflows/test-bridge.yml +++ b/.github/workflows/test-bridge.yml @@ -43,8 +43,9 @@ jobs: cargo tarpaulin --out Html - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4.0.1 - with: - token: ${{ secrets.CODECOV_TOKEN }} + uses: codecov/codecov-action@v4 env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} + with: + verbose: true + fail_ci_if_error: true From 2b0bc5ebdb402794c3ab3aa79dd483ea2de8575d Mon Sep 17 00:00:00 2001 From: Arun Jangra Date: Thu, 8 Aug 2024 16:12:31 +0530 Subject: [PATCH 06/14] update : codecov ci step --- .github/workflows/test-bridge.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test-bridge.yml b/.github/workflows/test-bridge.yml index 04f97f7..7aa16de 100644 --- a/.github/workflows/test-bridge.yml +++ b/.github/workflows/test-bridge.yml @@ -41,11 +41,10 @@ jobs: run: | echo "Running test...." cargo tarpaulin --out Html + sleep 5 # sleeping for few secs to ensure the coverage file is generated. - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} with: verbose: true fail_ci_if_error: true From 1ec40ac04971727a7f38a12f86e59dc8e38f774b Mon Sep 17 00:00:00 2001 From: Arun Jangra Date: Thu, 8 Aug 2024 16:46:37 +0530 Subject: [PATCH 07/14] update : codecov ci step --- .github/workflows/test-bridge.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-bridge.yml b/.github/workflows/test-bridge.yml index 7aa16de..e5af6e9 100644 --- a/.github/workflows/test-bridge.yml +++ b/.github/workflows/test-bridge.yml @@ -37,14 +37,19 @@ jobs: echo "Running madara...." ./run_madara.sh + - name: Check if token is accessible + run: | + echo "Token : ${{ secrets.CODECOV_TOKEN }} here" + - name: Run tests run: | echo "Running test...." cargo tarpaulin --out Html sleep 5 # sleeping for few secs to ensure the coverage file is generated. - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 with: - verbose: true - fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} From 4f52df36f8169bc765526cb86d9ea3ab3b9f728b Mon Sep 17 00:00:00 2001 From: Arun Jangra Date: Thu, 8 Aug 2024 16:54:28 +0530 Subject: [PATCH 08/14] temp commit to check if secret is accessible --- .github/workflows/test-bridge.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-bridge.yml b/.github/workflows/test-bridge.yml index e5af6e9..becc7db 100644 --- a/.github/workflows/test-bridge.yml +++ b/.github/workflows/test-bridge.yml @@ -37,9 +37,16 @@ jobs: echo "Running madara...." ./run_madara.sh - - name: Check if token is accessible + - name: Check if secret is accessible + env: + SECRET_TO_CHECK: ${{ secrets.CODECOV_TOKEN }} run: | - echo "Token : ${{ secrets.CODECOV_TOKEN }} here" + if [ -n "$SECRET_TO_CHECK" ]; then + echo "Secret is accessible" + else + echo "Secret is not accessible" + exit 1 + fi - name: Run tests run: | @@ -49,7 +56,7 @@ jobs: - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v4.0.1 - with: - token: ${{ secrets.CODECOV_TOKEN }} env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + with: + token: ${{ secrets.CODECOV_TOKEN }} From 7502cfa3db7e858d9725a879dcea4fc74ff391a5 Mon Sep 17 00:00:00 2001 From: Arun Jangra Date: Thu, 8 Aug 2024 16:56:47 +0530 Subject: [PATCH 09/14] temp commit to check if secret is accessible --- .github/workflows/test-bridge.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-bridge.yml b/.github/workflows/test-bridge.yml index becc7db..d6fda0c 100644 --- a/.github/workflows/test-bridge.yml +++ b/.github/workflows/test-bridge.yml @@ -39,9 +39,9 @@ jobs: - name: Check if secret is accessible env: - SECRET_TO_CHECK: ${{ secrets.CODECOV_TOKEN }} + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} run: | - if [ -n "$SECRET_TO_CHECK" ]; then + if [ -n "CODECOV_TOKEN" ]; then echo "Secret is accessible" else echo "Secret is not accessible" From 9c47caf7c6f884754527865768fda8a766c746b4 Mon Sep 17 00:00:00 2001 From: Arun Jangra Date: Thu, 8 Aug 2024 18:01:17 +0530 Subject: [PATCH 10/14] feat : added temp coverage file --- .github/workflows/test-bridge.yml | 11 +- tarpaulin-report.html | 671 ++++++++++++++++++++++++++++++ 2 files changed, 679 insertions(+), 3 deletions(-) create mode 100644 tarpaulin-report.html diff --git a/.github/workflows/test-bridge.yml b/.github/workflows/test-bridge.yml index d6fda0c..4f58da1 100644 --- a/.github/workflows/test-bridge.yml +++ b/.github/workflows/test-bridge.yml @@ -20,6 +20,12 @@ jobs: - uses: Swatinem/rust-cache@v2 + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3.1.0 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: /home/runner/work/madara-orchestrator/madara-orchestrator/tarpaulin-report.html + - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 @@ -55,8 +61,7 @@ jobs: 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 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + uses: codecov/codecov-action@v3.1.0 with: token: ${{ secrets.CODECOV_TOKEN }} + files: /home/runner/work/madara-orchestrator/madara-orchestrator/tarpaulin-report.html diff --git a/tarpaulin-report.html b/tarpaulin-report.html new file mode 100644 index 0000000..1ffcda6 --- /dev/null +++ b/tarpaulin-report.html @@ -0,0 +1,671 @@ + + + + + + + +
+ + + + + + \ No newline at end of file From ddf5d2c4aebfc4cef54ced9efddebabd468c05f0 Mon Sep 17 00:00:00 2001 From: Arun Jangra Date: Thu, 8 Aug 2024 18:04:47 +0530 Subject: [PATCH 11/14] feat : added temp coverage file --- .github/workflows/test-bridge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-bridge.yml b/.github/workflows/test-bridge.yml index 4f58da1..cbf764e 100644 --- a/.github/workflows/test-bridge.yml +++ b/.github/workflows/test-bridge.yml @@ -24,7 +24,7 @@ jobs: uses: codecov/codecov-action@v3.1.0 with: token: ${{ secrets.CODECOV_TOKEN }} - files: /home/runner/work/madara-orchestrator/madara-orchestrator/tarpaulin-report.html + files: /Users/runner/work/madara-bootstrapper/madara-bootstrapper/tarpaulin-report.html - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 From 942797a4d821dd77268821d99065bde2606accae Mon Sep 17 00:00:00 2001 From: Arun Jangra Date: Thu, 8 Aug 2024 18:12:55 +0530 Subject: [PATCH 12/14] feat : added temp coverage file --- .github/workflows/test-bridge.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-bridge.yml b/.github/workflows/test-bridge.yml index cbf764e..ee9c842 100644 --- a/.github/workflows/test-bridge.yml +++ b/.github/workflows/test-bridge.yml @@ -21,10 +21,12 @@ jobs: - uses: Swatinem/rust-cache@v2 - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v3.1.0 + uses: codecov/codecov-action@v4.0.1 with: token: ${{ secrets.CODECOV_TOKEN }} files: /Users/runner/work/madara-bootstrapper/madara-bootstrapper/tarpaulin-report.html + retries: 5 + retry_delay: 30 - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 From 777eb342ade71a719ee70a9a8547b9e6a16580ed Mon Sep 17 00:00:00 2001 From: Arun Jangra Date: Thu, 8 Aug 2024 18:18:16 +0530 Subject: [PATCH 13/14] feat : added temp coverage file --- .github/workflows/test-bridge.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-bridge.yml b/.github/workflows/test-bridge.yml index ee9c842..170e1c8 100644 --- a/.github/workflows/test-bridge.yml +++ b/.github/workflows/test-bridge.yml @@ -13,6 +13,8 @@ jobs: 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 @@ -25,8 +27,6 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} files: /Users/runner/work/madara-bootstrapper/madara-bootstrapper/tarpaulin-report.html - retries: 5 - retry_delay: 30 - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 From 7e0c8139f3695207518a6af1037f0b6489ea10af Mon Sep 17 00:00:00 2001 From: Arun Jangra Date: Thu, 8 Aug 2024 18:28:27 +0530 Subject: [PATCH 14/14] final changes --- .github/workflows/test-bridge.yml | 9 +- tarpaulin-report.html | 671 ------------------------------ 2 files changed, 1 insertion(+), 679 deletions(-) delete mode 100644 tarpaulin-report.html diff --git a/.github/workflows/test-bridge.yml b/.github/workflows/test-bridge.yml index 170e1c8..38da66e 100644 --- a/.github/workflows/test-bridge.yml +++ b/.github/workflows/test-bridge.yml @@ -22,12 +22,6 @@ jobs: - uses: Swatinem/rust-cache@v2 - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4.0.1 - with: - token: ${{ secrets.CODECOV_TOKEN }} - files: /Users/runner/work/madara-bootstrapper/madara-bootstrapper/tarpaulin-report.html - - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 @@ -63,7 +57,6 @@ jobs: sleep 5 # sleeping for few secs to ensure the coverage file is generated. - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v3.1.0 + uses: codecov/codecov-action@v4.0.1 with: token: ${{ secrets.CODECOV_TOKEN }} - files: /home/runner/work/madara-orchestrator/madara-orchestrator/tarpaulin-report.html diff --git a/tarpaulin-report.html b/tarpaulin-report.html deleted file mode 100644 index 1ffcda6..0000000 --- a/tarpaulin-report.html +++ /dev/null @@ -1,671 +0,0 @@ - - - - - - - -
- - - - - - \ No newline at end of file