Skip to content

docs: add CI status badge to the README badge row - #36

Closed
AUDOSt0ck1ng wants to merge 4 commits into
ARPAHLS:mainfrom
AUDOSt0ck1ng:docs/ci-badge
Closed

docs: add CI status badge to the README badge row#36
AUDOSt0ck1ng wants to merge 4 commits into
ARPAHLS:mainfrom
AUDOSt0ck1ng:docs/ci-badge

Conversation

@AUDOSt0ck1ng

Copy link
Copy Markdown
Collaborator

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 main at least once.

Merging it early is not harmful, but the badge will render as a grey CI: no status until ci.yml exists on ARPAHLS/avatar — the shields endpoint has no workflow to read. Confirmed against the live endpoint:

  • .../ARPAHLS/avatar/ci.yml?branch=mainCI: no status (today)
  • same query against the fork, where ci.yml already exists → CI: passing

Full 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:

<a href="https://github.com/ARPAHLS/avatar/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/ARPAHLS/avatar/ci.yml?branch=main&style=flat-square&label=CI" alt="CI" /></a>

Why shields.io instead of GitHub's native badge

GitHub's own actions/workflows/ci.yml/badge.svg is dark grey with square corners and a fixed layout, which sits badly next to the four flat-square pastel badges already in that row. The shields.io dynamic endpoint accepts style=flat-square so it matches.

The trade-off: unlike its neighbours — which use the static /badge/ endpoint with hardcoded pastel hex values like b8d4f0 — 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=main

Required. 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 main is what makes it a statement about the default branch.

🤖 Generated with Claude Code

AUDOSt0ck1ng and others added 4 commits August 7, 2026 00:06
…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>
@rosspeili

Copy link
Copy Markdown
Contributor

Thanks @AUDOSt0ck1ng, closing as superseded. The CI badge landed on main with #35 (maintainer follow-up), same shields.io URL and ?branch=main. No need to merge this separately.

@rosspeili rosspeili closed this Aug 7, 2026
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.

2 participants