Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 9 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,18 @@
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Test
run: cargo test
- name: Install cargo-tarpaulin
run: cargo install cargo-tarpaulin
- name: Run coverage
run: cargo tarpaulin --out lcov
- name: Install CodeScene coverage tool
if: env.CS_ACCESS_TOKEN
run: |
set -euo pipefail
curl -fsSL -o install-cs-coverage-tool.sh https://downloads.codescene.io/enterprise/cli/install-cs-coverage-tool.sh
if [ -n "${CODESCENE_CLI_SHA256:-}" ]; then
echo "${CODESCENE_CLI_SHA256} install-cs-coverage-tool.sh" | sha256sum -c -
fi
bash install-cs-coverage-tool.sh -y
rm install-cs-coverage-tool.sh
id: coverage
uses: leynos/shared-actions/.github/actions/ratchet-coverage@v1.2.1

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'CI' step
Uses Step: coverage
uses 'leynos/shared-actions/.github/actions/ratchet-coverage' with ref 'v1.2.1', not a pinned commit hash
with:
args: --workspace --lcov --output-path lcov.info
- name: Upload coverage data to CodeScene
if: env.CS_ACCESS_TOKEN
run: cs-coverage upload --format "lcov" --metric "line-coverage" "lcov.info"
uses: leynos/shared-actions/.github/actions/upload-codescene-coverage@v1.2.1

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'CI' step
Uses Step
uses 'leynos/shared-actions/.github/actions/upload-codescene-coverage' with ref 'v1.2.1', not a pinned commit hash
with:
format: lcov
access-token: ${{ env.CS_ACCESS_TOKEN }}
installer-checksum: ${{ env.CODESCENE_CLI_SHA256 }}
- name: Upload coverage data to Codecov
# v5.4.3
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24
Expand Down
10 changes: 6 additions & 4 deletions docs/multi-layered-testing-strategy.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ reviewers. This approach ensures that we establish a baseline of correctness
with simple tests before moving on to the more complex and subtle failure modes
that can emerge in an asynchronous, high-concurrency system.

Code coverage is measured with `cargo tarpaulin`. The CI workflow uploads the
generated `lcov.info` report to Codecov using a pinned version of the Codecov
GitHub Action (`18283e04ce6e62d37312384ff67231eb8fd56d24`, corresponding to
v5.4.3) to make coverage visible across pull requests.
Code coverage is measured with `cargo llvm-cov`. The `ratchet-coverage` action
builds on this tool—not `cargo-tarpaulin`—and fails if coverage drops. The
resulting `lcov.info` is uploaded to Codecov using a pinned version of the
Codecov GitHub Action (`18283e04ce6e62d37312384ff67231eb8fd56d24`, corresponding
to v5.4.3). The same report is also sent to CodeScene via the
`upload-codescene-coverage@v1.2.0` action.

## 2. Layer 1: Foundational Correctness (Unit & Integration)

Expand Down
Loading