From 7e4745cc93ecb4fd85bec4516e0e787520fe053a Mon Sep 17 00:00:00 2001 From: Igor Papandinas <26460174+ipapandinas@users.noreply.github.com> Date: Fri, 17 Jan 2025 18:49:59 +0100 Subject: [PATCH] CI: bump tarpaulin version (#1408) * Bump tarpaulin version For test coverage * Remove deprecated actions-rs/tarpaulin * fix: '--exclude-files' flag seems not working, downgrading version * Testing with multiple flags * Update rust-toolchain.toml * Update coverage.yaml * Fix * Revert "Update rust-toolchain.toml" This reverts commit b82e47f66be3cdc12ede52479c35899333922061. * Update .github/workflows/coverage.yaml Co-authored-by: Ermal Kaleci * Update coverage.yaml * Add TODO comment --------- Co-authored-by: Dino Pacandi Co-authored-by: Ermal Kaleci --- .github/workflows/coverage.yaml | 16 ++++++++++------ tarpaulin.toml | 13 +++++++++++++ 2 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 tarpaulin.toml diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index ee1b2ef35c..91bf3fe813 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -43,12 +43,16 @@ jobs: - name: Install deps run: sudo apt -y install protobuf-compiler - - name: Run all tests & Generate report - uses: actions-rs/tarpaulin@v0.1 - with: - version: 0.22.0 - args: '--workspace --features try-runtime,runtime-benchmarks -e astar-collator xcm-tools local-runtime shibuya-runtime shiden-runtime astar-runtime integration-tests --exclude-files vendor/* bin/* runtime/* tests/* **/mock.rs **/weights.rs precompiles/utils/*' - out-type: Xml + # TODO: Use `cargo install` with a specific version during the next PolkadotSDK uplift and Rust toolchain version upgrade. + - name: Install Tarpaulin + run: | + curl -L -o tarpaulin.tar.gz https://github.com/xd009642/tarpaulin/releases/download/0.31.4/cargo-tarpaulin-x86_64-unknown-linux-gnu.tar.gz + tar -zxvf tarpaulin.tar.gz -C $HOME/.cargo/bin + cargo tarpaulin --version + + - name: Run Tarpaulin + run: | + cargo tarpaulin --features try-runtime,runtime-benchmarks - name: Code Coverage Summary Report uses: irongut/CodeCoverageSummary@v1.2.0 diff --git a/tarpaulin.toml b/tarpaulin.toml new file mode 100644 index 0000000000..0e07cb86b6 --- /dev/null +++ b/tarpaulin.toml @@ -0,0 +1,13 @@ +[default-astar] + +name = "default-astar" +manifest-path = "./Cargo.toml" + +workspace = true +out = ["Xml"] + +# List of packages to exclude from testing. +exclude = ["astar-collator", "xcm-tools", "local-runtime", "shibuya-runtime", "shiden-runtime", "astar-runtime", "integration-tests"] + +# List of file paths to exclude from testing. +exclude-files = ["vendor/*", "bin/*", "runtime/*", "tests/*", "**/mock.rs", "**/weights.rs"]