ci: split release checks and share test workers - #487
Conversation
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.
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe 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. ChangesRelease validation and test execution
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (2)
.github/workflows/release.ymlvitest.config.ts
| jobs: | ||
| lint: | ||
| name: Release lint | ||
| runs-on: blacksmith-4vcpu-ubuntu-2404 |
There was a problem hiding this comment.
📐 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' . || trueRepository: 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 -300Repository: 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:
- 1: https://github.com/akin-ozer/cc-devops-skills/blob/main/devops-skills-plugin/skills/github-actions-validator/references/runners.md
- 2: https://github.com/rhysd/actionlint/blob/main/README.md
- 3: Lint GitHub Actions workflows with actionlint compiler-explorer/ruby-builder#3
- 4: https://github.com/rhysd/actionlint/blob/main/docs/config.md
- 5: https://github.com/thoughtlead-io/iris/blob/main/.github/actionlint.yaml
- 6: https://github.com/DavesFromTheGrave/Local-Auto-Claw/blob/main/.github/actionlint.yaml
- 7: https://fossies.org/linux/dgraph/.github/actionlint.yaml
- 8: fix(e2e-test): update runner to run on self-hosted instances usebruno/bruno#8524
- 9: [CI] Add issue/PR pytest command workflow fla-org/flash-linear-attention#843
- 10: statxc/gittensory@9e1c351
🏁 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*' \) -printRepository: 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:
- 1: https://github.com/rhysd/actionlint/blob/v1.7.12/docs/config.md
- 2: https://github.com/rhysd/actionlint/blob/main/config.go
- 3: https://github.com/rhysd/actionlint/blob/main/docs/config.md
- 4: https://github.com/rhysd/actionlint/blob/main/CHANGELOG.md
- 5: Location for actionlint.yaml may be wrong rhysd/actionlint#32
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.
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
Tests