From 74e85bc945d90115941affd2a02d4ec8722252a6 Mon Sep 17 00:00:00 2001 From: BaaRai <130491490+BaaRai@users.noreply.github.com> Date: Sat, 10 Oct 2026 17:36:38 +0200 Subject: [PATCH] Add CI: go build/vet/test with postgres, web typecheck and static build Closes #9. Go job runs the test suite against a postgres:16 service container, skipping the three tests that fail on unmodified upstream code with a fresh database (documented in the issue). Web job runs tsc --noEmit and the static export build. --- .github/workflows/ci.yml | 54 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..5d2a603 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,54 @@ +name: ci + +on: + push: + branches: [main] + pull_request: + +jobs: + go: + runs-on: ubuntu-latest + services: + postgres: + image: postgres:16-alpine + env: + POSTGRES_USER: artex + POSTGRES_PASSWORD: testpass + POSTGRES_DB: artextest + ports: + - 5432:5432 + options: >- + --health-cmd "pg_isready -U artex" + --health-interval 5s + --health-timeout 5s + --health-retries 10 + env: + ARTEX_PG_DSN: postgres://artex:testpass@localhost:5432/artextest?sslmode=disable + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + - run: go build ./... + - run: go vet ./... + # The three skipped tests fail on unmodified upstream code with a fresh + # database too (tracked in issue #9); skipping them keeps the baseline + # green so real regressions stand out. + - name: go test + run: go test ./... -skip 'TestInterceptFilterHTTP|TestGraphOverviewExpansAssociatedCompanyScope|TestCaptureApprovalLifecycle' + + web: + runs-on: ubuntu-latest + defaults: + run: + working-directory: web + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: "22" + cache: npm + cache-dependency-path: web/package-lock.json + - run: npm ci + - run: npx tsc --noEmit + - run: npm run build:static