-
Notifications
You must be signed in to change notification settings - Fork 6
86 lines (78 loc) · 2.17 KB
/
test.js.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
name: Run yarn test
on:
push:
branches-ignore:
- 'master'
- 'production'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.11.1]
redis-version: [6]
services:
postgres:
image: postgis/postgis:12-3.0
env:
POSTGRES_USER: frap
POSTGRES_PASSWORD: frap
POSTGRES_DB: frap-dev
ports:
- 5442:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v2
- name: Use Node.js 20.11.1
uses: actions/setup-node@v2
with:
node-version: '20.11.1'
always-auth: true
auth-token: ${{secrets.ACCESS_TOKEN}}
registry-url: 'https://npm.pkg.github.com'
scope: '@openforis'
- name: Start Redis Queue
uses: supercharge/[email protected]
with:
redis-version: ${{ matrix.redis-version }}
redis-container-name: redis-queue
- name: Start Redis Cache
uses: supercharge/[email protected]
with:
redis-version: ${{ matrix.redis-version }}
redis-port: 6389
redis-container-name: redis-data
- run: yarn install --network-timeout 1000000
env:
NODE_AUTH_TOKEN: ${{ secrets.ACCESS_TOKEN }}
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- run: yarn migration-public:run
env:
PGHOST: localhost
PGPORT: 5442
PGDATABASE: frap-dev
PGUSER: frap
PGPASSWORD: frap
- run: yarn build
env:
CI: true
PGHOST: localhost
PGPORT: 5442
PGDATABASE: frap-dev
PGUSER: frap
PGPASSWORD: frap
- run: yarn test
env:
CI: true
PGHOST: localhost
PGPORT: 5442
PGDATABASE: frap-dev
PGUSER: frap
PGPASSWORD: frap
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30