mirror of
https://github.com/freemkv/freemkv-keysources.git
synced 2026-10-07 18:13:11 +00:00
ci: add non-required Codecov coverage job, config, and README badge
Add an additive coverage job to ci.yml that mirrors the test job's sibling-checkout layout and pinned 1.97.0 toolchain, runs cargo llvm-cov, and uploads to Codecov tokenlessly (fail_ci_if_error:false). Nothing in the release cascade depends on it. Also add codecov.yml (informational, no PR comment) and a README with the coverage badge.
This commit is contained in:
@@ -181,6 +181,52 @@ jobs:
|
|||||||
- run: cargo build --tests
|
- run: cargo build --tests
|
||||||
working-directory: freemkv-keysources
|
working-directory: freemkv-keysources
|
||||||
|
|
||||||
|
# Additive, NON-REQUIRED coverage. Mirrors the `test` job's sibling-checkout
|
||||||
|
# layout and pinned toolchain (nothing in the release cascade depends on it,
|
||||||
|
# and codecov upload is tokenless with fail_ci_if_error:false, so a flaky
|
||||||
|
# upload never reddens the run). `--locked` is deliberately absent here for
|
||||||
|
# the same reason it is in `test`: Cargo.lock is gitignored, so there is no
|
||||||
|
# lockfile to lock against on a fresh runner.
|
||||||
|
coverage:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
path: freemkv-keysources
|
||||||
|
- uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
repository: freemkv/libfreemkv
|
||||||
|
ref: "${{ github.ref_name == 'qa' && 'qa' || 'dev' }}"
|
||||||
|
path: libfreemkv
|
||||||
|
- uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
repository: freemkv/freemkv-unlock
|
||||||
|
ref: "${{ github.ref_name == 'qa' && 'qa' || 'dev' }}"
|
||||||
|
path: freemkv-unlock
|
||||||
|
- name: Resolve siblings from their dev tips
|
||||||
|
shell: bash
|
||||||
|
working-directory: freemkv-keysources
|
||||||
|
run: |
|
||||||
|
mkdir -p .cargo
|
||||||
|
cat > .cargo/config.toml <<'EOF'
|
||||||
|
[patch.crates-io]
|
||||||
|
libfreemkv = { path = "../libfreemkv" }
|
||||||
|
EOF
|
||||||
|
- uses: dtolnay/rust-toolchain@1.97.0
|
||||||
|
with:
|
||||||
|
components: llvm-tools-preview
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
workspaces: freemkv-keysources
|
||||||
|
- uses: taiki-e/install-action@cargo-llvm-cov
|
||||||
|
- run: cargo llvm-cov --workspace --lcov --output-path lcov.info
|
||||||
|
working-directory: freemkv-keysources
|
||||||
|
- uses: codecov/codecov-action@v5
|
||||||
|
with:
|
||||||
|
files: freemkv-keysources/lcov.info
|
||||||
|
slug: freemkv/freemkv-keysources
|
||||||
|
fail_ci_if_error: false
|
||||||
|
|
||||||
check-windows:
|
check-windows:
|
||||||
# dev is the FAST lane: this job still runs, but on the release-candidate
|
# dev is the FAST lane: this job still runs, but on the release-candidate
|
||||||
# branches rather than on every push to dev. Nothing is deleted and no
|
# branches rather than on every push to dev. Nothing is deleted and no
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# freemkv-keysources
|
||||||
|
|
||||||
|
[](https://codecov.io/gh/freemkv/freemkv-keysources)
|
||||||
|
|
||||||
|
Pluggable AACS key sources (keydb, online key service) for
|
||||||
|
[libfreemkv](https://github.com/freemkv/libfreemkv). Each source looks a disc up
|
||||||
|
and hands libfreemkv its terminal Unit Keys via `get_unit_keys`; the library
|
||||||
|
does all derivation.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
MIT — see [LICENSE](LICENSE).
|
||||||
+19
@@ -0,0 +1,19 @@
|
|||||||
|
# Coverage is informational only: it never blocks a merge or a release. The
|
||||||
|
# release cascade is gated by ci.yml / qa.yml and the local precommit, not by
|
||||||
|
# a coverage threshold.
|
||||||
|
coverage:
|
||||||
|
status:
|
||||||
|
project:
|
||||||
|
default:
|
||||||
|
informational: true
|
||||||
|
patch:
|
||||||
|
default:
|
||||||
|
informational: true
|
||||||
|
|
||||||
|
# No PR comment noise; the badge and the Codecov UI are enough.
|
||||||
|
comment: false
|
||||||
|
|
||||||
|
# Exclude non-product code from the coverage denominator.
|
||||||
|
ignore:
|
||||||
|
- "tests/**"
|
||||||
|
- "ci/**"
|
||||||
Reference in New Issue
Block a user