From 9968449651959fd956709b28fbbf334298da2226 Mon Sep 17 00:00:00 2001 From: Yury Akudovich Date: Fri, 13 Oct 2023 11:38:10 +0200 Subject: [PATCH] Revert "disabled coverage CI test (#5)" This reverts commit 1d943aeebe74bf80a87232db1d62fc4464268014. --- .github/workflows/coverage.yaml | 43 +++++++++++++++++++++++++++++++++ codecov.yml | 17 +++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 .github/workflows/coverage.yaml create mode 100644 codecov.yml diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml new file mode 100644 index 00000000..76265567 --- /dev/null +++ b/.github/workflows/coverage.yaml @@ -0,0 +1,43 @@ +name: coverage + +on: + pull_request: + branches: [ "*" ] + +jobs: + check: + name: Rust project + runs-on: ubuntu-latest + + defaults: + run: + working-directory: ./node + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Install stable toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + + - name: Run cargo-tarpaulin + uses: actions-rs/tarpaulin@v0.1 + with: + version: '0.15.0' + args: '--manifest-path node/Cargo.toml -- --test-threads 1' + env: + RUST_LOG: 'network=trace,sync_blocks=trace,consensus=trace' + + - name: Upload to codecov.io + uses: codecov/codecov-action@v1.0.2 + with: + token: ${{secrets.CODECOV_TOKEN}} + + - name: Archive code coverage results + uses: actions/upload-artifact@v1 + with: + name: code-coverage-report + path: cobertura.xml diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000..7fe44e38 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,17 @@ +coverage: + range: "10...90" + status: + # We might gate PRs based on coverage diffs, + # but we don't want that for now + project: + default: + informational: true + patch: + default: + informational: true + +comment: + require_changes: true + +github_checks: + annotations: false \ No newline at end of file