Skip to content

ci: run lint, tests, and production build on PRs and main - #35

Merged
rosspeili merged 3 commits into
ARPAHLS:mainfrom
AUDOSt0ck1ng:ci/lint-and-build
Aug 7, 2026
Merged

ci: run lint, tests, and production build on PRs and main#35
rosspeili merged 3 commits into
ARPAHLS:mainfrom
AUDOSt0ck1ng:ci/lint-and-build

Conversation

@AUDOSt0ck1ng

@AUDOSt0ck1ng AUDOSt0ck1ng commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Refs #4.

What

Adds .github/workflows/ci.yml: on pull_request and push to main, run npm cinpm run lintnpm testnpm run build in avatar/ on ubuntu-latest.

  • npm cache enabled via actions/setup-node with cache-dependency-path: avatar/package-lock.json.
  • concurrency + cancel-in-progress so superseded pushes on the same ref stop instead of queueing.
  • ELECTRON_SKIP_BINARY_DOWNLOAD: 1 — nothing here launches Electron, and the tested modules deliberately avoid require('electron'), so the ~100 MB binary is dead weight. This is what keeps npm ci at ~10s.
  • permissions: contents: read only.
  • No dist:win, as the issue asks.

Total runtime is ~27s: checkout 5s, setup-node 2s, install 10s, lint 1s, test 0.3s, build 5s.

Deviations from the issue, flagged for your call

Node 22 instead of Node 20. avatar/package.json is on Vite 7, which requires ^20.19.0 || >=22.12.0. node-version: 20 would resolve to the latest 20.x and technically satisfy that, but 22 is the current LTS and leaves more headroom. Happy to drop to 20 if you would rather match the issue exactly — it is a one-line change.

avatar/ instead of avatar-demo/. The directory was renamed in 5531413, after the issue was filed.

Also runs npm test. The issue asks for lint + build only. The 26 existing electron/*.test.cjs suites run in 0.26s, so including them is effectively free and catches VRoid Hub OAuth/client regressions. Easy to drop if you want the workflow to match the issue scope exactly.

No README badge. The issue lists it as an optional follow-up; left for a separate PR once this is stable.

Depends on #34

main is currently red on lint, so this workflow fails on its first run until #34 lands. Please merge #34 first — after that this PR reduces to the single ci.yml commit.

Verification

Both commits ran green on the fork: run 31142107649 — lint, 26/26 tests, and build all pass, no annotations.

The second commit bumps actions/checkout and actions/setup-node to v5. v4 declares the node20 runtime, which GitHub now force-runs on Node 24 and emits a deprecation warning for on every run; v5 declares node24 natively. No input changes — node-version, cache, and cache-dependency-path are identical between v4 and v5.

🤖 Generated with Claude Code

AUDOSt0ck1ng and others added 3 commits August 7, 2026 13:53
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>
…PAHLS#34, ARPAHLS#35)

Record Unreleased notes for ESLint coverage and GitHub Actions CI, add the README CI badge, mark roadmap CI done, document the workflow in project layout, and expand CONTRIBUTING for changelog style, CI gates, and human/AI ripple-effect guidance.
@rosspeili
rosspeili merged commit 3787d79 into ARPAHLS:main Aug 7, 2026
1 check passed
@rosspeili

Copy link
Copy Markdown
Contributor

Thanks @AUDOSt0ck1ng, the CI workflow looks solid.

Pushed a small follow-up on this branch (149f73e) so we don’t need extra PRs for the obvious ripples:

For future PRs, please keep those ripples in mind (changelog, docs, roadmap, README badges when relevant) — CONTRIBUTING now spells that out more explicitly. Optional: close #36 as superseded by the badge in this PR.

Appreciate the careful callouts on Node 22 and including npm test. <3 Moving to next reviews.

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