-
Notifications
You must be signed in to change notification settings - Fork 2
66 lines (55 loc) · 1.47 KB
/
ci.yaml
File metadata and controls
66 lines (55 loc) · 1.47 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
60
61
62
63
64
65
66
name: test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: "true"
- uses: trim21/actions/setup-go@master
with:
cache-namespace: test
- uses: sigoden/install-binary@v1
with:
repo: gotestyourself/gotestsum
tag: v1.13.0
- run: gotestsum --hide-summary=skipped --format-hide-empty-pkg
sqlc:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_USER: pg-user
POSTGRES_PASSWORD: pg-password
POSTGRES_DB: db_test
ports:
- '5432:5432'
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v6
with:
submodules: "true"
- uses: sqlc-dev/setup-sqlc@v4
with:
sqlc-version: '1.30.0'
- run: env
- run: sudo apt install postgresql-client -y
- run: psql postgresql://pg-user:pg-password@127.0.0.1:5432/db_test?sslmode=disable -a -f db/schema.sql
- run: sqlc diff
env:
PG_DSN: postgresql://pg-user:pg-password@127.0.0.1:5432/db_test?sslmode=disable
- run: sqlc vet
env:
PG_DSN: postgresql://pg-user:pg-password@127.0.0.1:5432/db_test?sslmode=disable