-
Notifications
You must be signed in to change notification settings - Fork 8
48 lines (41 loc) · 1.07 KB
/
migration.yml
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
name: Test Migrations
on:
push:
branches: [ dev, master ]
pull_request:
branches: [ dev, master ]
jobs:
migrations:
runs-on: ubuntu-latest
container: node:12.13
services:
postgres:
image: postgres:10.6
env:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: database
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- name: Cache YARN dependencies
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install Modules
run: yarn --no-progress --non-interactive --frozen-lockfile
- name: Run Migrations
run: yarn migrate
env:
VL_DB_DATABASE: database
VL_DB_USER: user
VL_DB_PASSWORD: password
VL_DB_HOST: postgres
VL_DB_PORT: 5432