mirror of
https://github.com/db9979/wibosim.git
synced 2026-12-05 13:10:47 +01:00
- Wiederherstellungsprobe (restoreprobe.js + Worker): neueste Kopie außer Haus bzw. lokale Sicherung wöchentlich bei geschlossener Börse in temporären Ordner kopieren, Prüfsumme, integrity_check, Tabellen zählen, Spielstand probeweise laden; Karte „Sicherung außer Haus“ mit „Jetzt prüfen“, Audit-Log, Warnung bei Fehlschlag - Ausfall-Meldungen (sysalerts.js): Sicherung, Probe, Speicher, Sprachmodell, Takt-Fehler, langer Takt; E-Mail, Posteingang, Taby über den Admin-Browser; Entprellung, Entwarnung, Testknopf; /healthz, Healthcheck in docker-compose, Cron-Anleitung in docs/BETRIEB.md - Mehrfachkonten (multiacct.js): Geräte-/Anschluss-Hash, Werte-Verschiebung im Orderbuch, Fonds-Einzahlungen, Battle-Absprachen, gekoppelte Anmeldungen; Punktwert mit Begründung, „gesehen/okay“ im Admin, Aufbewahrung begrenzt - Browser-Smoketest (scripts/smoke.mjs) als eigener CI-Job mit Chromium-Cache Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUhQVoPUusUzxgxLWkK
105 lines
3.2 KiB
YAML
105 lines
3.2 KiB
YAML
name: CI
|
||
|
||
on:
|
||
push:
|
||
branches: [main]
|
||
tags: ['v*']
|
||
pull_request:
|
||
workflow_dispatch:
|
||
|
||
concurrency:
|
||
group: ci-${{ github.ref }}
|
||
cancel-in-progress: true
|
||
|
||
jobs:
|
||
test:
|
||
runs-on: ubuntu-latest
|
||
defaults:
|
||
run:
|
||
working-directory: server
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
- uses: actions/setup-node@v4
|
||
with:
|
||
node-version: 22
|
||
cache: npm
|
||
cache-dependency-path: server/package-lock.json
|
||
- run: npm ci
|
||
- run: npm test
|
||
|
||
smoke:
|
||
# Browser-Smoketest (scripts/smoke.mjs): eigener Job, läuft parallel zu „test“ und bremst ihn nicht.
|
||
# Playwright ist kein Teil der Abhängigkeiten – hier nur für diesen Lauf installiert, Chromium wird zwischengespeichert.
|
||
runs-on: ubuntu-latest
|
||
timeout-minutes: 6
|
||
defaults:
|
||
run:
|
||
working-directory: server
|
||
env:
|
||
PLAYWRIGHT_VERSION: 1.63.0
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
- uses: actions/setup-node@v4
|
||
with:
|
||
node-version: 22
|
||
cache: npm
|
||
cache-dependency-path: server/package-lock.json
|
||
- run: npm ci
|
||
- run: npm install --no-save --no-audit --no-fund playwright@${{ env.PLAYWRIGHT_VERSION }}
|
||
- id: pwcache
|
||
uses: actions/cache@v4
|
||
with:
|
||
path: ~/.cache/ms-playwright
|
||
key: playwright-${{ runner.os }}-${{ env.PLAYWRIGHT_VERSION }}-chromium-shell
|
||
- if: steps.pwcache.outputs.cache-hit != 'true'
|
||
run: npx playwright install --with-deps --only-shell chromium
|
||
- if: steps.pwcache.outputs.cache-hit == 'true'
|
||
run: npx playwright install-deps chromium
|
||
- run: node scripts/smoke.mjs --shots smoke-shots
|
||
- if: failure()
|
||
uses: actions/upload-artifact@v4
|
||
with:
|
||
name: smoke-screenshots
|
||
path: server/smoke-shots
|
||
retention-days: 7
|
||
|
||
image:
|
||
# Multi-Arch-Image (amd64 + arm64 für den Raspberry Pi) nach ghcr.io – nur nach erfolgreichen Tests und Smoketest auf main/Tags
|
||
needs: [test, smoke]
|
||
if: github.event_name != 'pull_request'
|
||
runs-on: ubuntu-latest
|
||
permissions:
|
||
contents: read
|
||
packages: write
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
- uses: docker/setup-qemu-action@v3
|
||
- uses: docker/setup-buildx-action@v3
|
||
- uses: docker/login-action@v3
|
||
with:
|
||
registry: ghcr.io
|
||
username: ${{ github.actor }}
|
||
password: ${{ secrets.GITHUB_TOKEN }}
|
||
- id: built
|
||
run: echo "at=$(date -u +%Y-%m-%dT%H:%M:%SZ)" >> "$GITHUB_OUTPUT"
|
||
- id: meta
|
||
uses: docker/metadata-action@v5
|
||
with:
|
||
images: ghcr.io/${{ github.repository }}
|
||
tags: |
|
||
type=raw,value=latest,enable={{is_default_branch}}
|
||
type=sha,format=short
|
||
type=semver,pattern={{version}}
|
||
- uses: docker/build-push-action@v6
|
||
with:
|
||
context: .
|
||
platforms: linux/amd64,linux/arm64
|
||
push: true
|
||
tags: ${{ steps.meta.outputs.tags }}
|
||
labels: ${{ steps.meta.outputs.labels }}
|
||
build-args: |
|
||
VERSION=${{ github.sha }}
|
||
BUILT_AT=${{ steps.built.outputs.at }}
|
||
cache-from: type=gha
|
||
cache-to: type=gha,mode=max
|