-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (55 loc) · 1.56 KB
/
Copy pathci.yaml
File metadata and controls
59 lines (55 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.26"
- name: Vet
run: go vet ./...
- name: Unit + golden tests (race)
run: go test -race ./...
- name: Benchmarks compile
run: go test -bench=. -benchtime=1x -run=^$ ./internal/compile/
e2e:
runs-on: ubuntu-latest
services:
postgres:
# PostGIS-enabled: the fixture schema creates the extension for the
# spatial e2e coverage.
image: postgis/postgis:16-3.4
env:
POSTGRES_USER: pdbq
POSTGRES_PASSWORD: pdbq
POSTGRES_DB: pdbq_test
ports: ["5433:5432"]
options: >-
--health-cmd "pg_isready -U pdbq"
--health-interval 2s
--health-timeout 2s
--health-retries 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.26"
- name: Load fixture schema
run: |
sudo apt-get install -y --no-install-recommends postgresql-client
PGPASSWORD=pdbq psql -h localhost -p 5433 -U pdbq -d pdbq_test -f db/init/01-schema.sql
- name: E2E tests
env:
PDBQ_TEST_DATABASE_URL: postgres://pdbq:pdbq@localhost:5433/pdbq_test
run: go test -race -count=1 ./test/
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build image
run: docker build .