Files
foundry-core/.gitea/workflows/check.yml
T
codex-bot 8cbd83f0e5
Foundry Go checks / check (push) Has been cancelled
Move Foundry Core to Go and add remote checks
2026-11-04 23:42:10 +08:00

36 lines
1.2 KiB
YAML

name: Foundry Go checks
on: [push, pull_request]
jobs:
check:
runs-on: ces-control
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: false
- name: Check formatting, test and build
run: |
set -eu
test -z "$(gofmt -l cmd internal)"
go test -mod=readonly ./...
go build -mod=readonly -o bin/foundry ./cmd/foundry
- name: Smoke test HTTP routes
env:
PUBLIC_ORIGIN: https://api.example.com
DATABASE_URL: postgres://foundry:fixture@127.0.0.1:5432/foundry
GOOGLE_CLIENT_ID: fixture
GOOGLE_CLIENT_SECRET: fixture
FOUNDRY_PROJECTS: '{"notes":"http://localhost:3000/auth/callback"}'
PORT: '18080'
run: |
set -eu
./bin/foundry &
server_pid=$!
trap 'kill "$server_pid" 2>/dev/null || true' EXIT
curl --silent --show-error --fail --retry 5 --retry-connrefused http://127.0.0.1:18080/healthz
status=$(curl --silent --show-error -o /dev/null -w '%{http_code}' http://127.0.0.1:18080/projects/notes/auth/me)
test "$status" = 401