Skip to content

ci: split release checks and share test workers - #487

Merged
hughgrigg merged 2 commits into
mainfrom
ci/hg/faster-release-checks
Aug 7, 2026
Merged

ci: split release checks and share test workers#487
hughgrigg merged 2 commits into
mainfrom
ci/hg/faster-release-checks

Conversation

@hughgrigg

@hughgrigg hughgrigg commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

The release job ran every check end to end on a GitHub-hosted runner and took around sixteen minutes, most of it the test step. Its checks now run as four parallel jobs on the Blacksmith runners pr.yml uses, while the publish job keeps its GitHub-hosted runner so the npm OIDC credential stays off third-party infrastructure. Separately, vitest no longer isolates each test file: a worker per file reparsed the same AWS SDK clients hundreds of times, leaving the suite spending about five times longer importing modules than running tests. Sharing the worker takes it from 106s to 33s locally for a quarter of the CPU, with coverage unchanged to the digit, and it is safe because state lives on SimAws instances rather than module scope and nothing calls vi.mock — the whole suite passes in a single shared process and in shuffled file order.

Summary by CodeRabbit

  • Chores

    • Improved release validation by separating linting, testing, building, and packaging into independent checks.
    • Added stricter release permissions and reproducible installation settings.
    • Releases now proceed only after all validation checks pass.
  • Tests

    • Updated test execution to share the same worker context, improving consistency for stateful simulator tests.

The release job ran every check end to end on a GitHub-hosted runner and
took around sixteen minutes, most of it the test step. Its checks now run
as four parallel jobs on the Blacksmith runners pr.yml uses, while the
publish job keeps its GitHub-hosted runner so the npm OIDC credential
stays off third-party infrastructure. Separately, vitest no longer
isolates each test file: a worker per file reparsed the same AWS SDK
clients hundreds of times, leaving the suite spending about five times
longer importing modules than running tests. Sharing the worker takes it
from 106s to 33s locally for a quarter of the CPU, with coverage
unchanged to the digit, and it is safe because state lives on SimAws
instances rather than module scope and nothing calls vi.mock — the whole
suite passes in a single shared process and in shuffled file order.
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 59ba7422-5f7e-4ac7-bd08-0a69b43bc21b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The release workflow now runs lint, test, build, and package checks in separate jobs before publishing. Vitest now shares workers and module state across test files.

Changes

Release validation and test execution

Layer / File(s) Summary
Shared test execution
.github/workflows/release.yml, vitest.config.ts
The test job uses frozen installs and coverage. Vitest sets isolate: false so test files share worker and module state.
Independent validation jobs
.github/workflows/release.yml
Lint, build, examples, and package checks run in separate jobs with read-only contents access.
Release gating and publishing
.github/workflows/release.yml
The release job waits for all validation jobs. Semantic-release determines the version and performs publishing, tagging, and GitHub Release creation.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes both main changes: splitting release checks and sharing Vitest test workers.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/hg/faster-release-checks

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/release.yml:
- Line 85: Add blacksmith-4vcpu-ubuntu-2404 and blacksmith-8vcpu-ubuntu-2404 to
self-hosted-runner.labels in .github/actionlint.yaml so actionlint accepts the
runner labels used by all four entries in .github/workflows/release.yml at lines
85, 114, 133, and 156; no direct changes are required in release.yml.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b4d63821-654c-4c60-886f-fbaa06b1fee8

📥 Commits

Reviewing files that changed from the base of the PR and between 67b9d7c and 3558c53.

📒 Files selected for processing (2)
  • .github/workflows/release.yml
  • vitest.config.ts

jobs:
lint:
name: Release lint
runs-on: blacksmith-4vcpu-ubuntu-2404

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate actionlint configuration and inspect runner-label declarations.
fd -H -t f -i 'actionlint\.ya?ml' . || true
rg -n -C 3 'self-hosted-runner|blacksmith-(4|8)vcpu-ubuntu-2404' . || true

Repository: KensioSoftware/yulin

Length of output: 158


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- workflow ---'
sed -n '1,220p' .github/workflows/release.yml

printf '%s\n' '--- relevant repository files ---'
git ls-files | rg '(^|/)(actionlint|\.github|Makefile|package\.json|\.pre-commit-config|Taskfile|justfile)' | head -200

printf '%s\n' '--- actionlint references and runner configuration ---'
rg -n -i -C 4 'actionlint|runner-label|runs-on|blacksmith|self-hosted' .github . 2>/dev/null | head -300

Repository: KensioSoftware/yulin

Length of output: 16245


🌐 Web query:

actionlint 1.7.12 unknown runner label self-hosted-runner configuration Blacksmith blacksmith-4vcpu-ubuntu-2404

💡 Result:

To resolve the actionlint error regarding the unknown runner label "blacksmith-4vcpu-ubuntu-2404", you must explicitly whitelist this custom label in your project's actionlint configuration file [1][2]. Actionlint flags this as an error because it is not part of its built-in list of recognized GitHub-hosted runner labels [2]. To fix this, create or update the file.github/actionlint.yaml in your repository with the following configuration [1][3][4]: #.github/actionlint.yaml self-hosted-runner: labels: - blacksmith-4vcpu-ubuntu-2404 If you use multiple Blacksmith runner labels, you can list them all under the labels section [5][6][7]: #.github/actionlint.yaml self-hosted-runner: labels: - blacksmith-4vcpu-ubuntu-2404 - blacksmith-8vcpu-ubuntu-2404 # Add other labels as needed By adding these definitions, actionlint will recognize these as valid self-hosted runner labels and stop reporting the [runner-label] error [1][8][9][10].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

if command -v actionlint >/dev/null 2>&1; then
  actionlint --version
  actionlint .github/workflows/release.yml || true
else
  echo "actionlint is not installed"
fi

printf '%s\n' '--- hidden config files ---'
find . -maxdepth 3 -type f \( -iname '*actionlint*' -o -name '.yamllint*' \) -print

Repository: KensioSoftware/yulin

Length of output: 4001


🌐 Web query:

site:github.com/rhysd/actionlint docs/config.md self-hosted-runner labels actionlint.yaml location

💡 Result:

The configuration file for actionlint, named actionlint.yaml or actionlint.yml, is typically placed in the.github directory of your repository [1][2]. Regarding the specific configuration for self-hosted runners, the labels are defined under the self-hosted-runner section in your actionlint configuration file [3][2]. This allows actionlint to recognize your custom runner labels when validating workflows [4]. The configuration supports glob patterns for flexible label matching [3][4]. Example configuration structure: self-hosted-runner: labels: - linux-runner-1 - custom-gpu-* For most setups, placing the file at.github/actionlint.yaml is sufficient [1][2]. If you are using specialized tools like Super-Linter, you may need to check that specific tool's documentation for its required configuration file location, as it may differ from the default expected by actionlint [1][5]. You can generate a default configuration file using the actionlint -init-config command [1].

Citations:


Configure actionlint for the Blacksmith runner labels.

Add blacksmith-4vcpu-ubuntu-2404 and blacksmith-8vcpu-ubuntu-2404 under self-hosted-runner.labels in .github/actionlint.yaml. actionlint 1.7.12 rejects all four runs-on entries without this configuration.

🧰 Tools
🪛 actionlint (1.7.12)

[error] 85-85: label "blacksmith-4vcpu-ubuntu-2404" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2025-vs2026", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xlarge", "macos-latest-large", "macos-26-intel", "macos-26-xlarge", "macos-26-large", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xlarge", "macos-14-large", "macos-14", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)

📍 Affects 1 file
  • .github/workflows/release.yml#L85-L85 (this comment)
  • .github/workflows/release.yml#L114-L114
  • .github/workflows/release.yml#L133-L133
  • .github/workflows/release.yml#L156-L156
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml at line 85, Add blacksmith-4vcpu-ubuntu-2404
and blacksmith-8vcpu-ubuntu-2404 to self-hosted-runner.labels in
.github/actionlint.yaml so actionlint accepts the runner labels used by all four
entries in .github/workflows/release.yml at lines 85, 114, 133, and 156; no
direct changes are required in release.yml.

Source: Linters/SAST tools

actionlint checks runs-on against the GitHub-hosted labels it ships with,
so the Blacksmith machines the workflows ask for read as typos and any
change to a workflow comes back with an error against each one. Nothing
here runs actionlint as a check; this is for the editors and review
tooling that do.
@hughgrigg
hughgrigg enabled auto-merge (squash) August 7, 2026 16:50
@hughgrigg
hughgrigg merged commit ee79761 into main Aug 7, 2026
6 checks passed
@hughgrigg
hughgrigg deleted the ci/hg/faster-release-checks branch August 7, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant