Skip to content

refactor: ๐Ÿšš Reorganize package and repository actions into sepaโ€ฆ #18

refactor: ๐Ÿšš Reorganize package and repository actions into sepaโ€ฆ

refactor: ๐Ÿšš Reorganize package and repository actions into sepaโ€ฆ #18

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