Files
WeatherTool/.gitea/workflows/ci.yml
T
b0txec 2c78ae8286
CI / backend (push) Successful in 1m28s
CI / frontend (push) Successful in 56s
Install a real Node 20 in the backend CI job, not Debian bullseye's default
Node got installed (previous fix worked) but actions/checkout@v4's bundled
JS uses modern syntax (class static blocks) requiring Node >=16.11.
hseeberger/scala-sbt is Debian bullseye-based, whose default apt "nodejs"
package is a stale Node 12 -- SyntaxError: Unexpected token '{' at "static
{". HOP's own image is bookworm-based (newer default), which is why they
never hit this. Use NodeSource's setup script to get an actual current Node
20 regardless of the distro's packaged version.
2026-08-24 22:11:47 +03:00

48 lines
1.1 KiB
YAML

name: CI
on:
push:
branches:
- codex/staging-baseline
pull_request:
branches:
- codex/staging-baseline
workflow_dispatch:
jobs:
backend:
runs-on: docker
container:
image: hseeberger/scala-sbt:17.0.2_1.6.2_2.13.8
steps:
- name: Install checkout runtime
run: |
apt-get update
apt-get install --yes --no-install-recommends curl ca-certificates git
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt-get install --yes --no-install-recommends nodejs
rm -rf /var/lib/apt/lists/*
- uses: actions/checkout@v4
- name: sbt test
run: sbt -batch test
frontend:
runs-on: docker
container:
image: node:20-bookworm
defaults:
run:
working-directory: web
steps:
- uses: actions/checkout@v4
- name: npm ci
run: npm ci
- name: typecheck
run: npm run typecheck
- name: build
run: npm run build
- name: audit (full)
run: npm audit
- name: audit (production only)
run: npm audit --omit=dev