mirror of
https://github.com/BaaRai/ARTEX.git
synced 2026-11-19 06:30:54 +08:00
First CI run caught a typo in the skip list (the test name is TestGraphOverviewExpands, with a d) and exposed that TestSideUsageRecordedOnceOnConsumerCancellation is timing-sensitive on 2-core runners: it passes locally, fails on CI. Both noted in #9.
59 lines
1.8 KiB
YAML
59 lines
1.8 KiB
YAML
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 ./...
|
|
# Skipped tests, tracked in issue #9:
|
|
# - TestInterceptFilterHTTP, TestGraphOverviewExpandsAssociatedCompanyScope,
|
|
# TestCaptureApprovalLifecycle: fail on unmodified upstream code with a
|
|
# fresh database.
|
|
# - TestSideUsageRecordedOnceOnConsumerCancellation: concurrency/cancellation
|
|
# test that passes locally but is timing-sensitive on 2-core CI runners.
|
|
# Skipping keeps the baseline green so real regressions stand out.
|
|
- name: go test
|
|
run: go test ./... -skip 'TestInterceptFilterHTTP|TestGraphOverviewExpandsAssociatedCompanyScope|TestCaptureApprovalLifecycle|TestSideUsageRecordedOnceOnConsumerCancellation'
|
|
|
|
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
|