docs: add CI status badge to the README badge row - #36
Closed
AUDOSt0ck1ng wants to merge 4 commits into
Closed
Conversation
…g errors
`npm run lint` covered only src/ and the two root config files: the flat
config's single block matched `**/*.{js,jsx}`, so every `electron/*.cjs`
file — main, preload, and the VRoid Hub modules — was parsed with zero
rules applied, and `scripts/*.mjs` was never matched at all. Linting was
also red on main, so it could not be used as a gate.
Config:
- Scope the renderer block to `src/` (browser globals + React rules).
- Add an `electron/**/*.cjs` block: commonjs, Node globals, recommended.
The suites need no extra globals — they require('node:test').
- Add blocks for `*.config.js` and `scripts/**` with Node globals.
- Move `--max-warnings=0` into the `lint` script so local and CI agree.
Fixes surfaced by the wider net:
- VoicePanel destructured an unused `audioFile`; the file input is
uncontrolled and only needs the setter. Dropped the prop at the call
site too.
- VrmAvatar read `group.current` in effect cleanup. Capture the group
once and use it for both attach and detach, so a swap detaches from
the group it attached to.
- make-icons dropped a dead `installerAssets` array that duplicated the
sizes already inlined in the PowerShell block — a trap if someone
edited one and not the other.
Coverage: 40 → 55 files. lint, build, and the 26 electron tests pass.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Closes #4. Label sync was the only workflow, so renderer and Electron regressions could land with no automated signal. - Node 22 (Vite 7 needs ^20.19.0 || >=22.12.0), npm cache keyed on avatar/package-lock.json. - Runs `npm test` as well as lint and build: the 26 Electron unit tests existed but nothing ever ran them. - Skips the Electron binary download — the tested modules deliberately avoid require('electron'), so ~100 MB is dead weight here. - No dist:win: Windows-specific and slow, deferred as the issue suggests. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
v4 declares the node20 runtime, which GitHub now force-runs on Node 24 and warns about on every run. v5 declares node24 natively. No input changes: node-version, cache, and cache-dependency-path are unchanged between v4 and v5. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Shows whether main currently passes lint, tests, and build without having to open the Actions tab. Uses the shields.io dynamic endpoint rather than GitHub's native badge.svg so the style matches the four flat-square badges already in that row; the trade-off is that the colour is status-driven (green or red) and cannot be a pastel like its neighbours. `?branch=main` is required — without it the badge reflects the most recent run on any ref, including in-review PRs, which makes it meaningless as a signal about main. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2 tasks
Contributor
|
Thanks @AUDOSt0ck1ng, closing as superseded. The CI badge landed on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge after #35
This is the optional follow-up noted in #4 ("Badge on README once stable"). It should not be merged until #35 has landed and the CI workflow has run on
mainat least once.Merging it early is not harmful, but the badge will render as a grey
CI: no statusuntilci.ymlexists onARPAHLS/avatar— the shields endpoint has no workflow to read. Confirmed against the live endpoint:.../ARPAHLS/avatar/ci.yml?branch=main→CI: no status(today)ci.ymlalready exists →CI: passingFull chain: #34 → #35 → this. GitHub shows the earlier commits here until those merge; this PR reduces to the single README line once they do.
What
One line added to the existing badge row in
README.md:Why shields.io instead of GitHub's native badge
GitHub's own
actions/workflows/ci.yml/badge.svgis dark grey with square corners and a fixed layout, which sits badly next to the fourflat-squarepastel badges already in that row. The shields.io dynamic endpoint acceptsstyle=flat-squareso it matches.The trade-off: unlike its neighbours — which use the static
/badge/endpoint with hardcoded pastel hex values likeb8d4f0— this one uses the dynamic status endpoint, so shields picks the colour from the actual result. It will be standard green or red, not a pastel. There is no way to have both live status and a custom palette. Happy to switch to the native badge instead if you would rather not mix the two styles.Note on
?branch=mainRequired. Without it the badge reflects the most recent run on any ref, including open PRs, so a contributor's failing branch would show the project as red. Pinning to
mainis what makes it a statement about the default branch.🤖 Generated with Claude Code