-
Notifications
You must be signed in to change notification settings - Fork 0
140 lines (123 loc) · 4.41 KB
/
Copy pathplaywright.yml
File metadata and controls
140 lines (123 loc) · 4.41 KB
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
133
134
135
136
137
138
139
140
name: Playwright Tests
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
workflow_dispatch:
inputs:
rems-setup-branch:
description: 'rems set up branch'
required: true
default: 'dev'
rems-intermediary-branch:
description: 'rems intermediary branch'
required: true
default: 'dev'
request-generator-branch:
description: 'request generator branch'
required: true
default: 'dev'
pims-branch:
description: 'pims branch'
required: true
default: 'dev'
rems-admin-branch:
description: 'rems admin branch'
required: true
default: 'dev'
rems-smart-on-fhir-branch:
description: 'rems smart on fhir branch'
required: true
default: 'dev'
rems-test-ehr-branch:
description: 'rems test-ehr branch'
required: true
default: 'dev'
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Output Workflow Inputs
run: |
echo 'Input Variables (defaults to main if not specified):'
echo 'rems set up branch: ${{ github.event.inputs.rems-setup-branch }}'
echo 'rems intermediary branch: ${{ github.event.inputs.rems-intermediary-branch }}'
echo 'test ehr branch: ${{ github.event.inputs.rems-test-ehr-branch }}'
echo 'request generator branch: ${{ github.event.inputs.request-generator-branch }}'
echo 'rems admin branch: ${{ github.event.inputs.rems-admin-branch }}'
echo 'pims branch: ${{ github.event.inputs.pims-branch }}'
echo 'rems smart on fhir branch: ${{ github.event.inputs.rems-smart-on-fhir-branch }}'
- name: Checkout rems-setup
uses: actions/checkout@v4
with:
repository: mcode/rems-setup
path: rems-setup
ref: ${{ github.event.inputs.rems-setup-branch }}
- name: Checkout rems-intermediary repo
uses: actions/checkout@v4
with:
repository: mcode/rems-intermediary
path: rems-intermediary
submodules: true
ref: ${{ github.event.inputs.rems-intermediary-branch }}
- name: Checkout test-ehr repo
uses: actions/checkout@v4
with:
repository: mcode/test-ehr
path: test-ehr
ref: ${{ github.event.inputs.rems-test-ehr-branch }}
- name: Checkout request-generator repo
uses: actions/checkout@v4
with:
repository: mcode/request-generator
path: request-generator
ref: ${{ github.event.inputs.request-generator-branch }}
- name: Checkout rems-admin repo
uses: actions/checkout@v4
with:
repository: mcode/rems-admin
path: rems-admin
submodules: true
ref: ${{ github.event.inputs.rems-admin-branch }}
- name: Checkout pims repo
uses: actions/checkout@v4
with:
repository: mcode/pims
path: pims
ref: ${{ github.event.inputs.pims-branch }}
- name: Checkout rems-smart-on-fhir repo
uses: actions/checkout@v4
with:
repository: mcode/rems-smart-on-fhir
path: rems-smart-on-fhir
submodules: true
ref: ${{ github.event.inputs.rems-smart-on-fhir-branch }}
- name: Build containers
run: docker compose -f docker-compose-local-build.yml build --no-cache --pull
working-directory: ./rems-setup
env:
VSAC_API_KEY: ${{secrets.VSAC_API_KEY}}
- name: Start containers
run: docker compose -f docker-compose-local-build.yml up -d --wait --force-recreate
working-directory: ./rems-setup
env:
VSAC_API_KEY: ${{secrets.VSAC_API_KEY}}
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm ci
working-directory: ./rems-setup
- name: Install Playwright Browsers
run: npx playwright install --with-deps
working-directory: ./rems-setup
- name: Run Playwright tests
run: npx playwright test
working-directory: ./rems-setup
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: ./rems-setup/playwright-report/
retention-days: 30