IronRDP/.github/workflows/coverage.yml
Raphaël Larivière 2cedc05722
Some checks are pending
CI / Check formatting (push) Waiting to run
CI / Check typos (push) Waiting to run
CI / Checks [linux] (push) Blocked by required conditions
CI / Checks [macos] (push) Blocked by required conditions
CI / Checks [windows] (push) Blocked by required conditions
CI / Fuzzing (push) Blocked by required conditions
CI / Web Client (push) Blocked by required conditions
CI / FFI (push) Blocked by required conditions
CI / Success (push) Blocked by required conditions
Coverage / Coverage Report (push) Waiting to run
Release crates / Open release PR (push) Waiting to run
Release crates / Release crates (push) Waiting to run
ci(npm): migrate publishing to OIDC authentication (#1026)
Issue: DEVOPS-3952
2025-10-30 08:40:10 -04:00

50 lines
1.5 KiB
YAML

name: Coverage
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:
env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
jobs:
coverage:
name: Coverage Report
runs-on: ubuntu-latest
# Running the coverage job is only supported on the official repo itself, not on forks
# (because $GITHUB_TOKEN only have read permissions when run on a fork)
# We would need something like Codecov integration to handle forks properly
# https://github.com/taiki-e/cargo-llvm-cov#continuous-integration
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v4
- name: Rust cache
uses: Swatinem/rust-cache@v2.7.3
- name: Prepare runner
run: cargo xtask cov install -v
- name: Generate PR report
if: ${{ github.event.number != '' }}
run: cargo xtask cov report-gh --repo "${{ github.repository }}" --pr "${{ github.event.number }}" -v
env:
GH_TOKEN: ${{ github.token }}
- name: Configure Git Identity
if: ${{ github.ref == 'refs/heads/master' }}
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
- name: Update coverage data
if: ${{ github.ref == 'refs/heads/master' }}
run: cargo xtask cov update -v
env:
GH_TOKEN: ${{ secrets.DEVOLUTIONSBOT_TOKEN }}