-
-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (83 loc) · 2.54 KB
/
main.yml
File metadata and controls
96 lines (83 loc) · 2.54 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
name: DSW E2E Tests
on:
push:
repository_dispatch:
workflow_dispatch:
inputs:
server_image:
description: 'Wizard Server image'
required: false
default: 'dswbot/wizard-server:develop'
client_image:
description: 'Wizard Client image'
required: false
default: 'dswbot/wizard-client:develop'
docworker_image:
description: 'Document Worker image'
required: false
default: 'dswbot/document-worker:develop'
jobs:
dsw-e2e:
name: Run DSW E2E Tests
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
containers: [1, 2, 3, 4]
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup Chrome
uses: browser-actions/setup-chrome@v2
with:
chrome-version: 139
- name: Set variables from repository dispatch
if: github.event_name == 'repository_dispatch'
uses: allenevans/set-env@v4.0.0
with:
SERVER_IMAGE: ${{ github.event.client_payload.server_image }}
CLIENT_IMAGE: ${{ github.event.client_payload.client_image }}
DOCWORKER_IMAGE: ${{ github.event.client_payload.docworker_image }}
- name: Set variables from workflow dispatch
if: github.event_name == 'workflow_dispatch'
uses: allenevans/set-env@v4.0.0
with:
SERVER_IMAGE: ${{ github.event.inputs.server_image }}
CLIENT_IMAGE: ${{ github.event.inputs.client_image }}
DOCWORKER_IMAGE: ${{ github.event.inputs.docworker_image }}
- name: Set etc/hosts
run: |
echo "127.0.0.1 minio" | sudo tee -a /etc/hosts
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: 24
- name: Prepare
run: |
npm ci
make clean
make init
- name: Start DS Wizard
run: |
make start
- name: Run Cypress
uses: cypress-io/github-action@v7
if: env.CYPRESS_RECORD_KEY != ''
with:
browser: chrome-for-testing
headed: false
record: true
parallel: true
group: 'DSW E2E Test @ GitHub Actions'
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run Cypress (no record)
uses: cypress-io/github-action@v7
if: env.CYPRESS_RECORD_KEY == ''
with:
browser: chrome-for-testing
headed: false
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}