refactor(libs/cli): create_child #93
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: coverage | |
on: | |
push: | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
grcov: | |
name: Coverage | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
toolchain: | |
- nightly | |
cargo_flags: | |
- "--all-features" | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: latest | |
- name: Install npm dependencies | |
run: npm ci | |
- name: Build WebUI | |
run: npm run build | |
- name: Setup ffmpeg | |
uses: AnimMouse/setup-ffmpeg@v1 | |
- name: Show version information | |
run: | | |
ffmpeg -version | |
ffprobe -version | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.toolchain }} | |
override: true | |
- name: Install grcov | |
uses: actions-rs/[email protected] | |
with: | |
crate: grcov | |
version: latest | |
use-tool-cache: true | |
- name: Test | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --all --no-fail-fast ${{ matrix.cargo_flags }} | |
env: | |
CARGO_INCREMENTAL: "0" | |
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort -Cdebug-assertions=off' | |
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort -Cdebug-assertions=off' | |
- name: Generate coverage data | |
run: | | |
grcov target/debug/ \ | |
--branch \ | |
--llvm \ | |
--source-dir . \ | |
--output-path lcov.info \ | |
--ignore='/**' \ | |
--ignore='C:/**' \ | |
--ignore='../**' \ | |
--ignore-not-existing \ | |
--excl-line "#\\[derive\\(" \ | |
--excl-br-line "#\\[derive\\(" \ | |
--excl-start "#\\[cfg\\(test\\)\\]" \ | |
--excl-br-start "#\\[cfg\\(test\\)\\]" \ | |
--commit-sha ${{ github.sha }} \ | |
--service-job-id ${{ github.job }} \ | |
--service-name "GitHub Actions" \ | |
--service-number ${{ github.run_id }} | |
- name: Upload coverage to codecov.io | |
uses: codecov/codecov-action@v4 | |
with: | |
file: lcov.info | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} | |