Skip to content

fix(rpc): two-slot coinbase cache prevents eviction between fake and … #11928

fix(rpc): two-slot coinbase cache prevents eviction between fake and …

fix(rpc): two-slot coinbase cache prevents eviction between fake and … #11928

Workflow file for this run

name: Coverage
on:
push:
branches: [main]
# Ensures that only one workflow task will run at a time. Previous builds, if
# already in process, will get cancelled. Only the latest commit will be allowed
# to run, cancelling any workflows in between
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: read
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
RUST_LIB_BACKTRACE: 1
RUST_LOG: info
COLORBT_SHOW_HIDDEN: 1
jobs:
changes:
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
coverage: ${{ steps.filter.outputs.coverage || 'true' }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
if: github.event_name == 'pull_request'
with:
persist-credentials: false
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
id: filter
if: github.event_name == 'pull_request'
with:
filters: .github/path-filters.yml
run-coverage:
needs: changes
if: needs.changes.outputs.coverage == 'true'
# `contents: read` is intentionally omitted: this job uploads source to a
# public Codecov project, so missing checkout permission keeps it inert
# on private forks as a fail-closed safeguard.
permissions:
id-token: write
statuses: write
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
with:
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
with:
toolchain: stable
components: llvm-tools-preview
cache-on-failure: true
- uses: taiki-e/install-action@65851e10cd6c377f11a60e600abc07cb08643468 #v2.79.3
with:
tool: cargo-llvm-cov,nextest
- uses: ./.github/actions/setup-zebra-build
- name: Run coverage tests
run: |
cargo llvm-cov --no-report nextest
# TODO: Do we need --locked --release --features "default-release-binaries" here?
cargo llvm-cov report --lcov --output-path lcov.info
env:
# We set cases to 1, because some tests already run 1 case by default.
# We set maximum shrink iterations to 0, because we don't expect failures in coverage tests.
# Coverage tests are much slower than other tests, particularly in hot loops.
PROPTEST_CASES: 1
PROPTEST_MAX_SHRINK_ITERS: 0
- name: Upload coverage to Codecov
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 #v6.0.1
with:
files: lcov.info
coverage:
runs-on: ubuntu-latest
if: always()
needs:
- changes
- run-coverage
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe #v1.2.2
with:
jobs: ${{ toJSON(needs) }}
allowed-skips: run-coverage