This repository has been archived by the owner on Oct 31, 2024. It is now read-only.
fix: add build optimizations, increase channel size, add local cache #2633
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Coverage | |
on: | |
push: | |
branches: | |
- main | |
- "!release/**" | |
paths: crates/** | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
paths: crates/** | |
workflow_dispatch: | |
jobs: | |
codecov: | |
name: Code coverage | |
runs-on: ubuntu-latest-16-core | |
if: ${{ ! startsWith(github.head_ref, 'release') }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/install-rust | |
with: | |
components: llvm-tools-preview | |
tools: grcov,nextest,protoc | |
AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID}} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY}} | |
- name: Build | |
env: | |
RUSTFLAGS: "-Cinstrument-coverage" | |
RUSTDOCFLAGS: "-Cinstrument-coverage" | |
run: cargo build --all | |
- name: Run tests | |
env: | |
RUST_LOG: info | |
RUSTFLAGS: "-Cinstrument-coverage" | |
RUSTDOCFLAGS: "-Cinstrument-coverage" | |
LLVM_PROFILE_FILE: "codecov-instrumentation-%p-%m.profraw" | |
run: cargo nextest run --workspace --exclude topos-sequencer-subnet-runtime | |
- name: Run grcov | |
run: | | |
grcov . --binary-path target/debug/ -s . \ | |
-t lcov \ | |
--branch \ | |
--ignore-not-existing \ | |
--ignore 'crates/topos-test-sdk/src/grpc/behaviour/*' \ | |
--ignore 'crates/topos-core/src/api/grpc/generated/*' \ | |
--ignore '../**' \ | |
--ignore '/*' \ | |
-o coverage.lcov | |
- name: Upload to codecov.io | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
verbose: true |