refactor: π§βπ» Rename structure to avoid ambiguity #17
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 Test Coverage | |
on: | |
push: | |
paths: | |
- '.github/workflows/code_test_coverage.yml' # Run when this workflow changes | |
- '**/src/**' | |
branches: [main] | |
pull_request: | |
paths: | |
- '.github/workflows/code_test_coverage.yml' # Run when this workflow changes | |
- '**/src/**' | |
branches: [main] | |
workflow_dispatch: # Run when manually triggered | |
workflow_call: # Run when called by another workflow | |
jobs: | |
coverage_job: | |
name: π Code Test Coverage Job | |
strategy: | |
fail-fast: true | |
matrix: | |
platform: | |
- linux | |
# - windows | |
# - apple | |
cpu_architecture: [x86_64] | |
include: | |
- platform: linux | |
cicd_runner: ubuntu-latest | |
# - platform: windows | |
# cicd_runner: windows-latest | |
# - platform: apple | |
# cicd_runner: macos-latest | |
- compilation_target: x86_64-unknown-linux-gnu | |
cpu_architecture: x86_64 | |
platform: linux | |
toolchain: gnu | |
# - compilation_target: x86_64-pc-windows-msvc | |
# cpu_architecture: x86_64 | |
# platform: windows | |
# toolchain: msvc | |
# - compilation_target: x86_64-apple-darwin | |
# cpu_architecture: x86_64 | |
# platform: apple | |
# toolchain: darwin | |
runs-on: ${{ matrix.cicd_runner }} | |
if: | | |
!startsWith(github.event.head_commit.message, 'style:') | |
&& !startsWith(github.event.head_commit.message, 'style(') | |
&& !startsWith(github.event.head_commit.message, 'chore:') | |
&& !startsWith(github.event.head_commit.message, 'chore(') | |
steps: | |
- name: βοΈ Install Ubuntu Dependencies Step | |
id: dependencies_install_step | |
if: ${{ matrix.compilation_target == 'x86_64-unknown-linux-gnu' }} | |
uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: libgtk-4-dev | |
version: 1.0 | |
- name: π Generate Code Coverage Step | |
id: coverage_generation_step | |
uses: pax-hub/rust-github-action@main | |
env: | |
RUSTDOCFLAGS: "--enable-index-page -Zunstable-options" | |
with: | |
subcommand: llvm-cov | |
arguments: '--all-features --workspace --lcov --output-path lcov.info' | |
rust_release_channel: nightly | |
use_cross: false | |
compilation_target: ${{ matrix.compilation_target }} | |
- name: π Upload coverage to Codecov Step | |
id: coverage_upload_step | |
uses: codecov/codecov-action@v3 | |
with: | |
files: lcov.info | |
fail_ci_if_error: true |