Files
homebrewery-oidc/.gitea/workflows/ci.yml
T
archimedes-bot BotandClaude Opus 5.5 022ae1daef
PR Check / limit-pull-requests (pull_request_target) Skipped
CI / App (npm ci + Build, ESLint, Stylelint, Jest) (pull_request) Successful in 1m21s
ci: Gitea Actions für Lint, Tests und Image-Build
ci.yml führt bei PRs und Pushes auf main die Upstream-Skripte aus
(npm ci inkl. Build, lint:dry, stylelint:dry, test). image.yml baut das
unveränderte Upstream-Dockerfile bei Pushes auf main und Tags v* und
pusht nach git.morlana.online/f.weber/homebrewery-oidc. .github/ bleibt
unverändert.

Closes #4

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 12:22:25 +00:00

61 lines
1.9 KiB
YAML

# Fork-CI für Pull Requests und main (Gitea #4, FLW-82).
# Nutzt ausschließlich die Upstream-npm-Skripte; die Upstream-CI unter .github/ und
# .circleci/ bleibt unverändert (Merges aus naturalcrit/homebrewery konfliktfrei).
# Läuft auf jedem Gitea act_runner mit dem Label ubuntu-latest.
name: CI
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
# package.json verlangt Node >=26.4.0 und npm >=10.8 <12; das Lockfile zieht das
# npm-Paket "node" ^26.13.0. Lokal verifiziert mit Node 26.13.1 / npm 11.20.0.
NODE_VERSION: 26.13.1
jobs:
app:
name: App (npm ci + Build, ESLint, Stylelint, Jest)
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: ${{ env.NODE_VERSION }}
package-manager-cache: false
# npm-Cache nur mit Repo-Variable CI_CACHE=true: Ist der Cache-Server des
# act_runner aus dem Job-Container nicht erreichbar, kostet jeder
# Cache-Schritt mehrere Minuten Timeout.
- uses: actions/cache@v6
if: vars.CI_CACHE == 'true'
with:
path: ~/.npm
key: npm-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
restore-keys: npm-${{ runner.os }}-
# postinstall führt "npm run build" (vite build) aus, prüft also auch den Build.
- name: Abhängigkeiten und Build (npm ci)
run: npm ci --no-audit --no-fund
# Upstream hat derzeit nur Warnungen (keine Fehler); Warnungen brechen nicht ab.
- name: ESLint (npm run lint:dry)
run: npm run lint:dry
- name: Stylelint (npm run stylelint:dry)
run: npm run stylelint:dry
# Kommt ohne MongoDB aus (Mongoose wird in den Specs gemockt).
- name: Jest (npm test)
run: npm test