Files
landwelle/.github/workflows/ci.yml
T
OpenGenesis (MPL 2.0) a6eb693c32 fix: harden Landwelle cron jobs, job snapshots and build guard v1.5.74
* fix(ai): atomically claim cron tasks and isolate job status snapshots

* test(ai): verify independent job snapshots, retention and atomic cron claim

* fix(build): detect obsolete untracked Go files before compilation

* chore(release): mark Landwelle v1.5.74

* chore(release): mark Landwelle v1.5.74

* docs: document v1.5.74 fixes and deferred architecture

* docs: add operational release notes for v1.5.74

* ci: prove stale local Go files are rejected before ARM build

* fix(build): restore script and correct untracked-source guard

* fix(build): use correctly escaped Go-source pattern
2026-10-21 15:42:36 +02:00

104 lines
2.5 KiB
YAML

name: Landwelle CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
concurrency:
group: landwelle-ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Go tests and vet
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24.4'
cache: true
- name: Verify modules
run: go mod verify
- name: Test
run: go test ./...
- name: Vet
run: go vet ./...
build-arm64:
name: ARM64 production build
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24.4'
cache: true
- name: Build portal
env:
CGO_ENABLED: '0'
GOOS: linux
GOARCH: arm64
run: go build -trimpath -o /tmp/landwelle-portal-linux-arm64 .
- name: Build migrator
env:
CGO_ENABLED: '0'
GOOS: linux
GOARCH: arm64
run: go build -trimpath -o /tmp/landwelle-migrate-linux-arm64 ./cmd/migrate
- name: Build adminpass
env:
CGO_ENABLED: '0'
GOOS: linux
GOARCH: arm64
run: go build -trimpath -o /tmp/landwelle-adminpass-linux-arm64 ./cmd/adminpass
frontend-static:
name: JavaScript and deployment-script checks
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate JavaScript syntax
run: |
find web/assets -name '*.js' -print0 | while IFS= read -r -d '' file; do
node --check "$file"
done
- name: Validate shell scripts
run: |
find scripts -name '*.sh' -print0 | while IFS= read -r -d '' file; do
bash -n "$file"
done
- name: Refuse unexpected local Go files
run: |
trap 'rm -f destination_one_ci_sentinel.go' EXIT
printf 'package main\n' > destination_one_ci_sentinel.go
if ./scripts/build-pi.sh > /tmp/landwelle-build-guard.log 2>&1; then
echo "Build unexpectedly accepted an untracked Go source" >&2
exit 1
fi
grep -q destination_one_ci_sentinel.go /tmp/landwelle-build-guard.log