Fix bug: no store the sync dag block #6264
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: Code Coverage Report | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
code_coverage_report: | |
name: Generate code coverage report | |
runs-on: self-hosted | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: setup environment | |
run: bash ./scripts/dev_setup.sh -b -t -y -m | |
- run: rustup component add llvm-tools-preview | |
- uses: taiki-e/install-action@v1 | |
with: | |
tool: cargo-llvm-cov,nextest | |
- name: Run code coverage | |
env: | |
RUST_LOG: error | |
run: cargo llvm-cov nextest --build-jobs 8 --lib --lcov --test-threads 12 --no-fail-fast --output-path target/lcov.info | |
- name: Upload coverage to Codecov, attempt 1 | |
uses: codecov/codecov-action@v1 | |
id: upload_code_coverage_report_1 | |
continue-on-error: true | |
with: | |
file: ./target/lcov.info | |
flags: unittests | |
fail_ci_if_error: false | |
verbose: true | |
# retry upload to resolve random upload failure caused by github and codecov | |
# https://github.com/starcoinorg/starcoin/pull/3693#issuecomment-1230963051 | |
- name: Wait on failure 1 | |
if: steps.upload_code_coverage_report_1.outcome == 'failure' | |
run: | | |
sleep 120s | |
- name: Upload coverage to Codecov, attempt 2 | |
id: upload_code_coverage_report_2 | |
if: steps.upload_code_coverage_report_1.outcome == 'failure' | |
uses: codecov/codecov-action@v3 | |
continue-on-error: true | |
with: | |
file: ./target/lcov.info | |
flags: unittests | |
fail_ci_if_error: false | |
verbose: true | |
- name: Wait on failure 2 | |
if: steps.upload_code_coverage_report_2.outcome == 'failure' | |
run: | | |
sleep 360s | |
- name: Upload coverage to Codecov, attempt 3 | |
id: upload_code_coverage_report_3 | |
if: steps.upload_code_coverage_report_2.outcome == 'failure' | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ./target/lcov.info | |
flags: unittests | |
fail_ci_if_error: false | |
verbose: true |