randomness #6: dkg manager update from randomnet #29347
Workflow file for this run
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: "Test_Coverage" | |
on: | |
# Trigger if any of the conditions | |
# 1. Daily at 12am UTC from the main branch, or | |
# 2. PR with a specific label (see below) | |
schedule: | |
- cron: "0 0 * * *" | |
pull_request: | |
types: [labeled] | |
workflow_dispatch: | |
workflow_call: | |
env: | |
CARGO_INCREMENTAL: "0" | |
CARGO_TERM_COLOR: always | |
# cancel redundant builds | |
concurrency: | |
# cancel redundant builds on PRs (only on PR, not on branches) | |
group: ${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.ref) || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
rust-unit-coverage: | |
if: | | |
contains(github.event.pull_request.labels.*.name, 'CICD:run-coverage') || | |
${{ github.event_name == 'schedule' && github.ref_name == 'main' }} | |
# Note the tests run slowly due to instrutmentation. It takes CI 10 hrs | |
timeout-minutes: 720 | |
runs-on: high-perf-docker | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # get all the history because cargo xtest --change-since origin/main requires it. | |
- uses: aptos-labs/aptos-core/.github/actions/rust-setup@main | |
- run: rustup component add llvm-tools-preview | |
- uses: taiki-e/install-action@6f1ebcd9e21315fc37d7f7bc851dfcc8356d7da3 # [email protected] | |
with: | |
tool: nextest,cargo-llvm-cov | |
- run: docker run --detach -p 5432:5432 cimg/postgres:14.2 | |
- run: cargo llvm-cov --ignore-run-fail --workspace --exclude smoke-test --exclude aptos-testcases --lcov --jobs 32 --output-path lcov_unit.info -vv | |
env: | |
INDEXER_DATABASE_URL: postgresql://postgres@localhost/postgres | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: lcov_unit | |
path: lcov_unit.info | |
rust-smoke-coverage: | |
if: | | |
contains(github.event.pull_request.labels.*.name, 'CICD:run-coverage') || | |
${{ github.event_name == 'schedule' && github.ref_name == 'main' }} | |
timeout-minutes: 240 | |
runs-on: high-perf-docker | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # get all the history because cargo xtest --change-since origin/main requires it. | |
- uses: aptos-labs/aptos-core/.github/actions/rust-setup@main | |
- run: rustup component add llvm-tools-preview | |
- uses: taiki-e/install-action@6f1ebcd9e21315fc37d7f7bc851dfcc8356d7da3 # [email protected] | |
with: | |
tool: nextest,cargo-llvm-cov | |
- run: docker run --detach -p 5432:5432 cimg/postgres:14.2 | |
- run: cargo llvm-cov --ignore-run-fail --package smoke-test --lcov --output-path lcov_smoke.info -vv | |
env: | |
INDEXER_DATABASE_URL: postgresql://postgres@localhost/postgres | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: lcov_smoke | |
path: lcov_smoke.info | |
upload-to-codecov: | |
if: (contains(github.event.pull_request.labels.*.name, 'CICD:run-coverage') || ${{ github.event_name }} == 'schedule') && !cancelled() | |
needs: [ rust-unit-coverage, rust-smoke-coverage ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: lcov_unit | |
- uses: actions/download-artifact@v3 | |
with: | |
name: lcov_smoke | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # pin@v3 | |
with: | |
files: lcov_unit.info,lcov_smoke.info | |
fail_ci_if_error: true |