Run ROM-free CI on the available Forgejo runner (#45)

This commit is contained in:
kawa committed 2026-10-03 18:15:51 +02:00
1 parent f34068f7df
commit 4082a9a2d3
3 files changed
+39 -21

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
name: Checks
on: [push, pull_request, workflow_dispatch]
permissions:
contents: read
jobs:
web:
# The shared Docker-Builder1 runner advertises this label.
runs-on: docker-build
container:
image: node:22-bookworm
timeout-minutes: 20
env:
# Keep ROM-dependent tests local, even if the runner has a ROM elsewhere.
CRYSTAL_ROM_PATH: /nonexistent/crystal-ci.gbc
steps:
- uses: https://github.com/actions/checkout@v4
with:
persist-credentials: false
- name: Verify the no-ROM test environment
run: test ! -e "$CRYSTAL_ROM_PATH"
- run: npm ci
- run: npm run check:vendor
- name: Synthetic unit tests
run: npm test -- --maxWorkers=2
- run: npm run build
- run: npm run check:release
- run: npm run build:reference
- run: npx playwright install --with-deps chromium webkit
- name: Browser tests without a ROM
run: npm run test:e2e -- --workers=2
-21
View File
@@ -1,21 +0,0 @@
name: Checks
on: [push, pull_request]
permissions:
contents: read
jobs:
web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npm run check:vendor
- run: npm test
- run: npm run build
- run: npm run check:release
- run: npm run build:reference
- run: npx playwright install --with-deps chromium webkit
- run: npm run test:e2e
+9
View File
@@ -56,6 +56,15 @@ npm run check:vendor
Local-ROM tests use `Pokemon - Crystal Version (UE) (V1.1) [C][!].gbc` at the root, or `CRYSTAL_ROM_PATH`. They skip when absent; no test downloads a ROM. Game files, private reference builds and gameplay screenshots must remain ignored.
[CI checks](https://git.azuze.fr/kawa/Crystal/actions?workflow=checks.yml) run on pushes and pull requests, or manually from Actions. The [workflow](.forgejo/workflows/checks.yml) uses the shared `docker-build` runner with Node 22 in a Debian container. It installs from the lockfile, runs synthetic unit and Chromium/WebKit browser tests, builds both applications, and checks vendor integrity and native release isolation. `CRYSTAL_ROM_PATH` points to a verified absent file, so ROM-dependent tests skip; `check:reference` remains a local check requiring the private ROM and reference build.
To reproduce the CI test selection locally:
```sh
CRYSTAL_ROM_PATH=/nonexistent/crystal-ci.gbc npm test -- --maxWorkers=2
CRYSTAL_ROM_PATH=/nonexistent/crystal-ci.gbc npm run test:e2e -- --workers=2
```
`git config core.hooksPath .githooks` keeps the forge's project board in step with commits: `Closes #N` in a message moves card N to Fait and closes it, any other `#N` moves it to En cours, and a commit on `main` without a reference adds a closed card to Fait. `[no-card]` skips a commit. See [project-board.mjs](scripts/project-board.mjs).
The [full port plan](docs/PLAN.md) covers remaining game systems, save slots, the world map, Pokédex, internet Link, friends and optional mobile step support for egg hatching. See the [architecture](docs/ARCHITECTURE.md) and [routine map and verification](docs/NATIVE_PORT.md) for module boundaries and reference checks.