Files
max-sixty__worktrunk/.github/workflows/coverage.yaml
T
Worktrunk Bot 9bcc071222 ci: bump pinned Nushell to 0.115.1 (#3972)
## Summary

Weekly pin bump: Nushell 0.115.0 → 0.115.1 across all seven pinned
sites. Split from the week's other pin bumps
([#3971](https://github.com/max-sixty/worktrunk/pull/3971)) because the
shell-integration suite runs `--all-features`, so a Nushell version
change can move PTY snapshots — on its own branch, a red matrix decides
only this bump.

Sites moved together, per the weekly checklist: the five
`hustcer/setup-nu` `version:` inputs (`coverage.yaml`, `nightly.yaml`,
`benchmarks.yaml`, and both
`.github/actions/{test,tend}-setup/action.yaml`), plus the two places
that pin Nushell outside `.github/` and are kept level with `test-setup`
— `.codex/cloud.sh`'s `NU_VERSION` and `Taskfile.yaml`'s `setup-web`.

## Verification

The version is the current upstream release (`nushell/nushell`
`0.115.1`, published 2026-08-23). This PR's own `test
(linux|macos|windows)` and `full-tests` legs are where the snapshot
question actually gets answered — I have not run the PTY suite against
0.115.1 locally, since the weekly runner installs no Nushell.

<details><summary>Upstream changes in 0.115.1</summary>

A patch release, mostly completion and config fixes. Nothing that
obviously touches the prompt or wrapper surfaces worktrunk's snapshots
capture, but the completion and REPL changes are the ones to watch if a
snapshot does move:

- `fix(config): merge keybindings by name and key instead of name alone`
(#18870)
- `feat(completions): add a background-completions opt-out` (#18764)
- `fix(completions): keep the REPL usable when a completer runs fzf or
input list` (#18881)
- `Completor Fixes` (#18868)
- `allow $ans to still work after invalid operation` (#18863)
- `fix update to work better with custom values` (#18865)
- `allow boolean comparison with semver` (#18854)
- `Update h2 do to RUSTSEC-2026-0258` (#18875)

</details>

Co-authored-by: worktrunk-bot <254187624+worktrunk-bot@users.noreply.github.com>
2026-08-31 11:36:14 -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.9.0"
- 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.115.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 }}