卫戍协议:盟约 web remake — initial import

Online co-op browser remake of Arknights' Stronghold Protocol: Alliance
(client-simulated combat, official waves/bonds/items/strategies, 3D board,
facing wheel, operator loadout, official emotes, deployment scripts).
This commit is contained in:
sganggs committed 2026-09-29 16:21:31 +08:00
commit 01a44cd288
408 files changed
+308986

No files matched your search

+67
View File
@@ -0,0 +1,67 @@
name: CI
on:
push:
pull_request:
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test:
name: test (${{ matrix.os }}, node ${{ matrix.node }})
runs-on: ${{ matrix.os }}
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
# 22 and 24 = the maintained LTS lines (24 is what `winget install OpenJS.NodeJS.LTS` installs today)
node: [22, 24]
env:
# Browser/E2E suites gate themselves on these (and on a local Chrome + downloaded game assets, which CI never
# has): keep them off explicitly. Suites that need .cache/gamedata, public/assets or data/local-assets.json skip.
SP_E2E: '0'
SP_REAL_E2E: '0'
RENDER_E2E: '0'
NO_COLOR: '1'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: npm
- name: Install (npm ci → postinstall copies public/vendor)
run: npm ci --no-audit --no-fund
- name: Setup check (no downloads)
run: node tools/setup.mjs --check --no-local
- name: Unit & integration tests
run: node --test
# Linux is the reference platform; Windows results are informative until the suite is proven there.
continue-on-error: ${{ matrix.os == 'windows-latest' }}
- name: Server smoke test (boot, /healthz, index.html, doctor)
shell: bash
run: |
node server/index.js > server.log 2>&1 &
pid=$!
ok=
for i in $(seq 1 30); do
if curl -fsS http://127.0.0.1:3000/healthz; then ok=1; break; fi
sleep 1
done
echo
[ -n "$ok" ] || { cat server.log; exit 1; }
curl -fsS http://127.0.0.1:3000/ | grep -qi '<html'
curl -fsS -o /dev/null http://127.0.0.1:3000/vendor/pixi.min.js
node tools/doctor.mjs || true
kill $pid || true