mirror of
https://github.com/Xevion/Pac-Man.git
synced 2025-12-06 03:15:48 -06:00
57 lines
1.4 KiB
YAML
57 lines
1.4 KiB
YAML
name: Code Coverage
|
|
|
|
on: ["push", "pull_request"]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUST_TOOLCHAIN: nightly
|
|
|
|
jobs:
|
|
coverage:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Install Rust toolchain
|
|
uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
toolchain: ${{ env.RUST_TOOLCHAIN }}
|
|
components: llvm-tools-preview
|
|
|
|
- name: Rust Cache
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Cache vcpkg
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: target/vcpkg
|
|
key: A-vcpkg-${{ runner.os }}-${{ hashFiles('Cargo.toml', 'Cargo.lock') }}
|
|
restore-keys: |
|
|
A-vcpkg-${{ runner.os }}-
|
|
|
|
- name: Vcpkg Linux Dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libltdl-dev
|
|
|
|
- name: Vcpkg
|
|
run: |
|
|
cargo install cargo-vcpkg
|
|
cargo vcpkg -v build
|
|
|
|
- uses: taiki-e/install-action@cargo-llvm-cov
|
|
- uses: taiki-e/install-action@nextest
|
|
- uses: taiki-e/install-action@just
|
|
|
|
- name: Generate coverage report
|
|
run: |
|
|
just coverage-lcov
|
|
|
|
- name: Coveralls upload
|
|
uses: coverallsapp/github-action@v2
|
|
with:
|
|
github-token: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
|
path-to-lcov: lcov.info
|
|
debug: true
|