test(tui): make a test suite for mecomp-tui #164
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: 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 required cargo | |
run: cargo install cargo-tarpaulin | |
- name: Run cargo-tarpaulin | |
run: cargo tarpaulin | |
--out Xml --skip-clean | |
--workspace | |
--features mock_playback | |
- name: Upload to codecov.io | |
uses: codecov/codecov-action@v4.5.0 | |
with: | |
token: ${{secrets.CODECOV_TOKEN}} | |
fail_ci_if_error: true | |
- name: Archive code coverage results | |
uses: actions/upload-artifact@v4.3.3 | |
with: | |
name: code-coverage-report | |
path: cobertura.xml |