Some checks failed
CI / test-and-build (push) Failing after 1m18s
- .gitea/workflows/ci.yml: on push/PR, runs npm ci, svelte-check, offline regression tests, and a static (no-Overpass) build, then verifies output - scripts/test.mjs: offline test suite — validates manifest + GeoJSON structure and asserts fuzzy-search regressions against committed data - package.json: add 'test' and 'build:static' scripts - osm-data.mjs: tag OSM layers layerType='mixed' in the manifest
42 lines
1.0 KiB
YAML
42 lines
1.0 KiB
YAML
name: CI
|
|
|
|
# Runs tests on every push (commit) to any branch, and on pull requests.
|
|
"on":
|
|
push:
|
|
branches: ['**']
|
|
pull_request:
|
|
branches: ['**']
|
|
|
|
jobs:
|
|
test-and-build:
|
|
runs-on: host
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
# 1) Static/type checks (svelte-check). Fast, no network.
|
|
- name: Type & Svelte checks
|
|
run: npm run check
|
|
|
|
# 2) Data-integrity + search regressions against committed data.
|
|
# Runs offline; does NOT hit the Overpass API (avoids rate limits).
|
|
- name: Run tests
|
|
run: npm test
|
|
|
|
# 3) Build the static site using committed static/data (no live fetch).
|
|
- name: Static build
|
|
run: npm run build:static
|
|
|
|
- name: Verify build output
|
|
run: |
|
|
test -f build/index.html
|
|
test -d build/data
|
|
echo "Build output OK" |