-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (47 loc) · 1.5 KB
/
e2e.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
name: 'Test Preview Environment'
on:
pull_request:
branches:
- master
jobs:
check:
name: 'Get Preview Environment URL'
runs-on: ubuntu-latest
timeout-minutes: 30
outputs:
env_status: ${{ steps.wait.outputs.env_status }}
env_url: ${{ steps.wait.outputs.env_url }}
steps:
- uses: actions/checkout@v2
- uses: pascalvaccaro/[email protected]
id: admin
with:
SERVICE_NAME: admin
- uses: pascalvaccaro/[email protected]
if: ${{ steps.admin.outputs.env_status == 'success' }}
id: wait
with:
SERVICE_NAME: website
e2e:
name: 'Run end-to-end test suite with Cypress'
runs-on: ubuntu-latest
timeout-minutes: 15
needs: check
if: ${{ needs.check.outputs.env_status == 'success' && startsWith(needs.check.outputs.env_url, 'https://') }}
strategy:
fail-fast: false
matrix:
containers: [1, 2]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "16"
- name: Install dependencies
run: npm install
- name: Run Cypress suite
run: npx cy2 run --record --key myKey --parallel --ci-build-id ${{ github.run_id }}-${{ github.run_attempt }}
env:
CYPRESS_BASE_URL: ${{ needs.check.outputs.env_url }}
# Uncomment the line below once you configured and deployed your Sorry-Cypress Dashboard
# CYPRESS_API_URL: <your_director_api_url>