-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (61 loc) · 1.98 KB
/
main.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
name: FAIRDataPoint E2E Tests
on:
push:
repository_dispatch:
workflow_dispatch:
inputs:
server_image:
description: 'FDP image'
required: false
default: 'fairdata/fairdatapoint:develop'
client_image:
description: 'FDP-Client image'
required: false
default: 'datastewardshipwizard/fairdatapoint-client:develop'
jobs:
dsw-e2e:
name: Run FAIRDataPoint E2E Tests
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
containers: [1, 2, 3, 4]
steps:
- uses: actions/checkout@v2
- name: Set variables from repository dispatch
if: github.event_name == 'repository_dispatch'
uses: allenevans/[email protected]
with:
SERVER_IMAGE: ${{ github.event.client_payload.server_image }}
CLIENT_IMAGE: ${{ github.event.client_payload.client_image }}
- name: Set variables from workflow dispatch
if: github.event_name == 'workflow_dispatch'
uses: allenevans/[email protected]
with:
SERVER_IMAGE: ${{ github.event.inputs.server_image }}
CLIENT_IMAGE: ${{ github.event.inputs.client_image }}
- name: Prepare
run: |
docker login -u "$PRIVATE_REGISTRY_USERNAME" -p "$PRIVATE_REGISTRY_PASSWORD" "$PRIVATE_REGISTRY_URL"
make clean
make init
env:
PRIVATE_REGISTRY_URL: ${{ secrets.PRIVATE_REGISTRY_URL }}
PRIVATE_REGISTRY_USERNAME: ${{ secrets.PRIVATE_REGISTRY_USERNAME }}
PRIVATE_REGISTRY_PASSWORD: ${{ secrets.PRIVATE_REGISTRY_PASSWORD }}
- name: Start FAIRDataPoint toolset
run: |
make start
make wait
- name: Run Cypress
uses: cypress-io/github-action@v2
with:
browser: chrome
headless: true
record: true
parallel: true
group: 'FDP E2E Test @ GitHub Actions'
env:
CYPRESS_RETRIES: 3
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}