Skip to content

feat: update cargo files to use workspace package #2210

feat: update cargo files to use workspace package

feat: update cargo files to use workspace package #2210

Workflow file for this run

name: Coverage
on:
push:
branches:
- main
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
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-api/src/grpc/generated/*' \
--ignore 'crates/topos-test-sdk/src/grpc/behaviour/*' \
--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