mirror of
https://github.com/Xevion/Pac-Man.git
synced 2025-12-05 23:15:40 -06:00
Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 5 to 6 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
74 lines
1.9 KiB
YAML
74 lines
1.9 KiB
YAML
name: Code Coverage
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUST_TOOLCHAIN: nightly
|
|
|
|
jobs:
|
|
coverage:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
|
|
- 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
|
|
working-directory: pacman
|
|
|
|
- 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
|
|
working-directory: pacman
|
|
|
|
- name: Check Coveralls Token
|
|
run: |
|
|
if [ -z "${{ secrets.COVERALLS_REPO_TOKEN }}" ]; then
|
|
echo "::warning::COVERALLS_REPO_TOKEN not available - coverage upload skipped (common for Dependabot PRs)"
|
|
else
|
|
echo "COVERALLS_REPO_TOKEN is available - will upload coverage"
|
|
fi
|
|
|
|
- name: Coveralls upload
|
|
if: ${{ secrets.COVERALLS_REPO_TOKEN != '' }}
|
|
uses: coverallsapp/github-action@v2
|
|
with:
|
|
github-token: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
|
path-to-lcov: lcov.info
|
|
debug: true
|