diff --git a/.github/workflows/common/codecov/action.yml b/.github/workflows/common/codecov/action.yml index 0f978122dd..084a4634b1 100644 --- a/.github/workflows/common/codecov/action.yml +++ b/.github/workflows/common/codecov/action.yml @@ -3,8 +3,14 @@ description: Runs cargo llvm-cov runs: using: "composite" steps: + - name: Inside Composite 1 + shell: bash + run: echo "Inside Composite before llvm" - name: Install cargo-llvm-cov uses: taiki-e/install-action@cargo-llvm-cov + - name: Inside Composite 2 + shell: bash + run: echo "Inside Composite post llvm" - name: Generate code coverage shell: bash run: | diff --git a/.github/workflows/merge-pr.yml b/.github/workflows/merge-pr.yml index 85a8599bc5..bec4e50227 100644 --- a/.github/workflows/merge-pr.yml +++ b/.github/workflows/merge-pr.yml @@ -66,14 +66,30 @@ jobs: name: Merge - Calculate Code Coverage # This job currently fails on EKS runners and must be run on standalone until # https://www.pivotaltracker.com/story/show/185045668 is resolved. - runs-on: [self-hosted, Linux, X64, build, v1] + runs-on: [self-hosted, Linux, X64, build, v2] container: ghcr.io/libertydsnp/frequency/ci-base-image:1.0.0 steps: - name: Check Out Repo uses: actions/checkout@v4 - - name: Generate and Upload Code Coverage - id: codecov - uses: ./.github/workflows/common/codecov + - name: Install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov + - name: Set Swap Space + uses: ./.github/workflows/common/swap + with: + swap-size-gb: 20 + - name: Generate code coverage + shell: bash + run: | + cargo llvm-cov -v --no-fail-fast --workspace --lcov --output-path lcov.info \ + --ignore-filename-regex "^.*\/(node\/|runtime\/|mock\.rs|weights(\.rs)?|benchmarking\.rs|runtime-api/src/lib\.rs).*$" \ + --exclude "frequency,frequency-cli,frequency-runtime,frequency-service" \ + --features frequency-lint-check + - name: Upload to codecov.io + uses: codecov/codecov-action@v3 + with: + files: lcov.info + fail_ci_if_error: false # optional (default = false) + verbose: true # optional (default = false) publish-ci-base-image: needs: changes diff --git a/.github/workflows/verify-pr-commit.yml b/.github/workflows/verify-pr-commit.yml index 8f93a6e204..2ed5c97f8c 100644 --- a/.github/workflows/verify-pr-commit.yml +++ b/.github/workflows/verify-pr-commit.yml @@ -261,18 +261,30 @@ jobs: calc-code-coverage: needs: changes - if: needs.changes.outputs.rust == 'true' + # if: needs.changes.outputs.rust == 'true' name: Calculate Code Coverage # This job currently fails on EKS runners and must be run on standalone until # https://www.pivotaltracker.com/story/show/185045668 is resolved. - runs-on: [self-hosted, Linux, X64, build, v1] + runs-on: [self-hosted, Linux, X64, build, v2] container: ghcr.io/libertydsnp/frequency/ci-base-image:1.0.0 steps: - name: Check Out Repo uses: actions/checkout@v4 - - name: Generate and Upload Code Coverage - id: codecov - uses: ./.github/workflows/common/codecov + - name: Install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov + - name: Generate code coverage + shell: bash + run: | + cargo llvm-cov -v --no-fail-fast --workspace --lcov --output-path lcov.info \ + --ignore-filename-regex "^.*\/(node\/|runtime\/|mock\.rs|weights(\.rs)?|benchmarking\.rs|runtime-api/src/lib\.rs).*$" \ + --exclude "frequency,frequency-cli,frequency-runtime,frequency-service" \ + --features frequency-lint-check + - name: Upload to codecov.io + uses: codecov/codecov-action@v3 + with: + files: lcov.info + fail_ci_if_error: false # optional (default = false) + verbose: true # optional (default = false) # Workaround to handle skipped required check inside matrix # https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks