Skip to content

Merge pull request #178 from AnthonyMichaelTDM/dependabot/github_acti… #399

Merge pull request #178 from AnthonyMichaelTDM/dependabot/github_acti…

Merge pull request #178 from AnthonyMichaelTDM/dependabot/github_acti… #399

name: Code coverage report
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
concurrency:
group: CodeCov-${{ github.ref }}
cancel-in-progress: true
jobs:
coverage:
name: Code coverage report (using tarpaulin)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y --no-install-recommends libasound2-dev pkg-config wget libavutil-dev libavformat-dev
- name: Set up mold linker
uses: rui314/setup-mold@v1
- name: Install Rust toolchain
run: |
rustup show
rustup -V
rustup set profile minimal
rustup toolchain install stable
rustup override set stable
- name: Setup cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: install cargo-tarpaulin
uses: taiki-e/install-action@v2
with:
tool: cargo-tarpaulin
- name: Run cargo-tarpaulin
run: cargo tarpaulin
--out Xml --skip-clean
--workspace
--profile tarpaulin
--features mock_playback
- name: Upload to codecov.io
uses: codecov/codecov-action@v5.0.6
with:
token: ${{secrets.CODECOV_TOKEN}}
fail_ci_if_error: true
- name: Archive code coverage results
uses: actions/upload-artifact@v4.4.3
with:
name: code-coverage-report
path: cobertura.xml