From edb14d3aea1f69102812e2797b88a82ee6857dd5 Mon Sep 17 00:00:00 2001 From: Matthew Jackson <1085847+MattJackson@users.noreply.github.com> Date: Tue, 25 Aug 2026 18:55:26 -0700 Subject: [PATCH] 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. --- .github/workflows/ci.yml | 46 ++++++++++++++++++++++++++++++++++++++++ README.md | 12 +++++++++++ codecov.yml | 19 +++++++++++++++++ 3 files changed, 77 insertions(+) create mode 100644 README.md create mode 100644 codecov.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ac9a07..71f9190 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -181,6 +181,52 @@ jobs: - run: cargo build --tests 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: # 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 diff --git a/README.md b/README.md new file mode 100644 index 0000000..545f0cc --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ +# freemkv-keysources + +[![codecov](https://codecov.io/gh/freemkv/freemkv-keysources/branch/dev/graph/badge.svg)](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). diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..079774b --- /dev/null +++ b/codecov.yml @@ -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/**"