-
Notifications
You must be signed in to change notification settings - Fork 6
71 lines (68 loc) · 1.98 KB
/
test.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
name: Test
on:
pull_request:
branches:
- develop
push:
branches:
- develop
tags:
- v*
env:
AERIE_PASSWORD: '${{secrets.AERIE_PASSWORD}}'
AERIE_USERNAME: '${{secrets.AERIE_USERNAME}}'
HASURA_GRAPHQL_ADMIN_SECRET: '${{secrets.HASURA_GRAPHQL_ADMIN_SECRET}}'
HASURA_GRAPHQL_JWT_SECRET: '${{secrets.HASURA_GRAPHQL_JWT_SECRET}}'
POSTGRES_PASSWORD: '${{secrets.POSTGRES_PASSWORD}}'
POSTGRES_USER: '${{secrets.POSTGRES_USER}}'
jobs:
test:
runs-on: ubuntu-latest
environment: test-workflow
steps:
- name: Checkout Repo (UI)
uses: actions/checkout@v3
- name: Setup Node (UI)
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
cache: npm
- name: Start Services (Aerie)
run: |
docker compose -f docker-compose-test.yml up -d
docker images
docker ps -a
- name: Install Dependencies (UI)
run: npm ci
- name: Build (UI)
run: npm run build
- name: Install Playwright Dependencies (Test - e2e)
run: npx playwright install chromium --with-deps
- name: Test (e2e)
run: npm run test:e2e
- name: Test (unit)
run: npm run test:unit
- name: Upload Results (Test - e2e)
if: always()
uses: actions/upload-artifact@v3
with:
name: Test Results
path: '**/e2e-test-results'
- name: Upload Results (Test - unit)
if: always()
uses: actions/upload-artifact@v3
with:
name: Test Results
path: '**/unit-test-results'
- name: Print Logs for Services (Aerie)
if: always()
run: docker compose -f docker-compose-test.yml logs -t
- name: Stop Services (Aerie)
if: always()
run: |
docker ps -a
docker compose -f docker-compose-test.yml down
docker ps -a
- name: Prune Volumes (Aerie)
if: always()
run: docker volume prune --force