1name: build
2
3on: [push, pull_request]
4
5jobs:
6 build:
7 uses: charmbracelet/meta/.github/workflows/build.yml@main
8
9 snapshot:
10 uses: charmbracelet/meta/.github/workflows/snapshot.yml@main
11 secrets:
12 goreleaser_key: ${{ secrets.GORELEASER_KEY }}
13
14 test_postgres:
15 services:
16 postgres:
17 image: postgres
18 ports:
19 - 5432:5432
20 env:
21 POSTGRES_PASSWORD: postgres
22 options: >-
23 --health-cmd pg_isready
24 --health-interval 10s
25 --health-timeout 5s
26 --health-retries 5
27 runs-on: ubuntu-latest
28 steps:
29 - name: Checkout code
30 uses: actions/checkout@v4
31 - name: Install Go
32 uses: actions/setup-go@v4
33 with:
34 go-version: ^1
35 cache: true
36 - name: Download Go modules
37 run: go mod download
38 - name: Test
39 run: go test ./...
40 env:
41 DB_DRIVER: postgres
42 DB_DATA_SOURCE: postgres://postgres:postgres@localhost/postgres?sslmode=disable