-
Notifications
You must be signed in to change notification settings - Fork 1
132 lines (117 loc) · 2.85 KB
/
github-actions.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: Node.js CI
on:
push:
paths:
- frontend/**
- queue/**
- server/**
- packages/**
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
services:
postgres:
image: postgis/postgis
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: zlv
ports:
- 5432:5432
redis:
image: redis:7.2.4-alpine
ports:
- 6379:6379
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
s3:
image: adobe/s3mock:3.5.2
ports:
- 9090:9090
env:
initialBuckets: "zerologementvacant"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Enable Corepack
run: corepack enable
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- name: Install
run: yarn install --immutable
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
- name: Build
run: yarn build
env:
DISABLE_ESLINT_PLUGIN: true
METABASE_TOKEN: token
- name: Lint
run: yarn lint
- name: Test
run: yarn test
env:
LOG_LEVEL: fatal
REACT_APP_API_URL: http://localhost:3001
- name: Test database migrations
run: yarn workspace @zerologementvacant/server run test:migrations --run-in-band
deploy-front-staging:
uses: ./.github/workflows/deploy.yml
needs: [build]
with:
app: Front staging
alias: front-staging
branch: main
environment: Staging
secrets: inherit
deploy-api-staging:
uses: ./.github/workflows/deploy.yml
needs: [build]
with:
app: API staging
alias: api-staging
branch: main
secrets: inherit
deploy-queue-staging:
uses: ./.github/workflows/deploy.yml
needs: [build]
with:
app: Queue staging
alias: queue-staging
branch: main
secrets: inherit
deploy-front-production:
uses: ./.github/workflows/deploy.yml
needs: [build]
with:
app: Front production
alias: front-production
branch: prod
environment: Production
secrets: inherit
deploy-api-production:
uses: ./.github/workflows/deploy.yml
needs: [build]
with:
app: API production
alias: api-production
branch: prod
secrets: inherit
deploy-queue-production:
uses: ./.github/workflows/deploy.yml
needs: [build]
with:
app: Queue production
alias: queue-production
branch: prod
secrets: inherit