-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (38 loc) · 1.13 KB
/
atlas-ci.yaml
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
# https://atlasgo.io/integrations/github-actions
name: atlas-ci
on:
# Run whenever code is changed in the master branch,
# change this to your root branch.
push:
branches:
- main
# Run on PRs where something changed under the `path/to/migration/dir/` directory.
pull_request:
paths:
- 'atlas/migrations/*'
jobs:
lint:
services:
# Spin up a postgres:10 container to be used as the dev-database for analysis.
postgres10:
image: postgres:16
env:
POSTGRES_DB: test
POSTGRES_PASSWORD: pass
ports:
- 5430:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.7
with:
fetch-depth: 0 # Mandatory unless "latest" is set below.
- uses: ariga/atlas-action@v1
with:
dir: atlas/migrations
dir-format: atlas # Or: golang-migrate, liquibase, flyway, goose, dbmate
dev-url: postgres://postgres:pass@localhost:5430/test?sslmode=disable