Files
max-sixty__worktrunk/.github/workflows/coverage.yaml
Worktrunk Bot ec574b6c35 ci: bump pinned cargo-nextest 0.9.143 and worktrunk 0.72.0 (#3783)
## Summary

Weekly CI pin check found the following drift (these inline `version:`
strings are invisible to Dependabot — it follows `Cargo.toml` deps and
`uses: foo@vN` refs, not pinned versions inside `with:` blocks):

- `cargo-nextest`: 0.9.140 → 0.9.143 (MSRV 1.91, compatible with our
1.96) — pinned in `coverage.yaml`, `actions/test-setup`, and
`actions/claude-setup`; all three moved together.
- `worktrunk`: 0.71.0 → 0.72.0 (MSRV 1.96, compatible with our 1.96) —
the CI-installed `wt` that runs `wt hook pre-merge`, bumped to the
current release; pinned in `ci.yaml` (×2) and `nightly.yaml`.

## Already up to date

- `cargo-affected`: 0.4.0, `cargo-insta`: 1.48.0, `cargo-llvm-cov`:
0.8.7, `cargo-msrv`: 0.19.3, `cargo-udeps`: 0.1.61, `lychee`: 0.24.2
- `hustcer/setup-nu` (nushell): 0.114.1 — matches the current nushell
release across all four call sites
- Runner images: ubuntu-24.04, windows-2022

## Notes

- windows-2022 stays pinned
([actions/runner-images#12677](https://github.com/actions/runner-images/issues/12677)
— windows-2025 lacks the D: drive).
- **cargo-nextest 0.9.143 has nothing config-facing to adjust.** The
0.9.140 → 0.9.143 range is dynamic-library-search-path fixes (build-dir
layout v2, `build.build-dir`, `[[example]]` targets), archive filterset
fixes, an opt-in `junit.report-skipped` setting we don't set, and a
listing progress bar. The one behavior change — ordering the Cargo
artifact directory ahead of `deps` on the dylib search path, matching
Cargo since 1.93 — doesn't affect this repo, which links no `dylib`
dependency.
- **worktrunk 0.72.0 is only exercised through `wt hook pre-merge`** in
these three jobs, so the release's `wt merge` / `wt step push` two-tree
changes and the `branch_outcome` JSON rename don't reach CI. The
relevant one is the opposite direction: 0.72.0 fixes `wt` writing ANSI
to a pipe and exiting 101 on `Broken pipe`, which is exactly the non-tty
shape these jobs run in.
- **`zola` is deliberately left at 0.22.1** — see below.

## Deferred: zola 0.22.1 → 0.23.2

`taiki-e/install-action`'s `tool: zola@0.22.1` in `check-docs` (and the
matching pin in `publish-docs.yaml`) is behind, but 0.23.0 is not a
routine bump. Upstream calls it "probably the most breaking version of
Zola that will happen"
([CHANGELOG](https://github.com/getzola/zola/blob/master/CHANGELOG.md)):
**shortcodes are removed entirely** and Tera is updated to v2 with its
own [migration
guide](https://github.com/Keats/tera/blob/master/MIGRATION.md).
`docs/templates/shortcodes/` and `docs/templates/macros.html` both
exist, so this needs a real docs-site migration rather than a
version-string change, and it would land in the same PR as the live-site
publish pin. Left for a separate change; flagging it here so it isn't
silently skipped each week.

Co-authored-by: worktrunk-bot <254187624+worktrunk-bot@users.noreply.github.com>
2026-08-09 04:56:50 -07:00

85 lines
2.9 KiB
YAML

name: coverage
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
# Keyed per-commit on main, so a merge train can't cancel a queued upload:
# GitHub cancels the pending run whenever a newer one joins the group, and
# codecov picks a PR's base by walking back to the newest ancestor that has a
# report. A main commit that skips its upload therefore leaves later PRs
# comparing against a stale base. That's why coverage sits outside `ci`, whose
# group is shared with jobs that hold a run open for hours. PR runs still
# supersede their own.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
# Swatinem/rust-cache hashes CARGO*/RUST* into the cache key, so these track
# ci.yaml (.github/CLAUDE.md → Build environment).
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
RUSTFLAGS: -C debuginfo=0
jobs:
code-coverage:
runs-on: ubuntu-24.04
steps:
- name: 📂 Checkout code
uses: actions/checkout@v7
- uses: baptiste0928/cargo-install@v3
with:
crate: cargo-llvm-cov
version: "=0.8.7"
- uses: baptiste0928/cargo-install@v3
with:
crate: cargo-nextest
version: "=0.9.143"
- name: 💰 Cache
uses: Swatinem/rust-cache@v2
with:
# Own cache — coverage-instrumented builds differ from the shared test
# cache. Already main-gated; cache-bin:false matches everywhere else.
cache-bin: "false"
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Install shells (zsh, fish)
run: sudo apt-get update && sudo apt-get install -y zsh fish
- name: Install nushell
uses: hustcer/setup-nu@v3
with:
version: '0.114.1'
# Ensure nothing remains from caching
- run: cargo llvm-cov clean --workspace
- name: 📊 Generate coverage report
# Match the regular suite's process isolation. Cargo's in-process runner
# lets one busy PTY test delay another before it can paint its prompt.
run: cargo llvm-cov nextest --features shell-integration-tests --cobertura --output-path=cobertura.xml
- name: Upload code coverage results
uses: actions/upload-artifact@v7
with:
name: code-coverage-report
path: cobertura.xml
- name: Upload to codecov.io
uses: codecov/codecov-action@v7.0.0
with:
files: cobertura.xml
# Soft-fail on fork PRs: secrets aren't available there, so we rely on
# tokenless upload, which can hiccup. Keep hard-fail on the main repo.
# The head repo is what tells the two apart — `github.repository_owner`
# is the base repo's owner on a fork PR too.
fail_ci_if_error: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
token: ${{ secrets.CODECOV_TOKEN }}