1 parent a30aba0 commit 8d197d5Copy full SHA for 8d197d5
1 file changed
.github/workflows/test.yml
@@ -16,6 +16,21 @@ jobs:
16
name: Test
17
runs-on: ubuntu-latest
18
19
+ services:
20
+ postgres:
21
+ image: postgres:12-alpine
22
+ env:
23
+ POSTGRES_USER: postgres
24
+ POSTGRES_PASSWORD: postgres
25
+ POSTGRES_DB: sandbox
26
+ ports:
27
+ - 5433:5432
28
+ options: >-
29
+ --health-cmd pg_isready
30
+ --health-interval 10s
31
+ --health-timeout 5s
32
+ --health-retries 5
33
+
34
steps:
35
- name: Checkout
36
uses: actions/checkout@v2
@@ -25,5 +40,14 @@ jobs:
40
with:
41
go-version: 1.17
42
43
+ - name: Install golang-migrate
44
+ run: |
45
+ curl -L https://github.com/golang-migrate/migrate/releases/download/v4.14.1/migrate.linux-amd64.tar.gz | tar xvz
46
+ sudo mv migrate.linux-amd64 /usr/bin/migrate
47
+ which migrate
48
49
+ - name: Run migrations
50
+ run: make migrateup
51
52
- name: Test
53
run: go test -v ./...
0 commit comments