-
Notifications
You must be signed in to change notification settings - Fork 13
78 lines (73 loc) · 2.2 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
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
name: main-e2e-tests
on:
workflow_dispatch:
inputs:
smoketest:
required: true
description: "Is this a smoke test?"
default: "true"
url_parameter:
required: false
description: "Which URL to test?"
logLevel:
description: "Log level"
required: true
default: "warning"
type: choice
options:
- info
- warning
- debug
env:
CYPRESS_users: ${{ secrets.CYPRESS_USERS }}
CYPRESS_BASE_URL: ${{ inputs.url_parameter || secrets.CYPRESS_BASEURL }}
CYPRESS_host: ${{ inputs.url_parameter || secrets.CYPRESS_BASEURL }}
CYPRESS_ENVIRONMENT: ${{ github.base_ref }}
CYPRESS_authurls: ${{ secrets.CYPRESS_AUTHURLS }}
CYPRESS_creditcard: ${{ secrets.CYPRESS_CREDITCARD }}
CYPRESS_smoketest: ${{inputs.smoketest}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
smoke-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false # https://github.com/cypress-io/github-action/issues/48
steps:
# Checkout the PR branch
- name: Checkout Target Branch
uses: actions/checkout@v4
- name: E2E Smoke tests
uses: cypress-io/github-action@v6
id: smoke
continue-on-error: true
with:
summary-title: "E2E Smoke tests"
wait-on: "${{ env.CYPRESS_BASE_URL }}"
wait-on-timeout: 120
record: false
install-command: npm ci
working-directory: testing
spec: |
cypress/e2e/smoke/smoke-*-*.cy.ts
browser: chrome
# project: ./e2e
ci-build-id: ${{ github.event.number }}
- name: Run the reports
run: |
cd testing
npm run report
- name: Upload Test Reports
uses: actions/upload-artifact@v4
with:
name: smoke-test-results
path: testing/mochawesome-report/report.html
- name: Upload Videos
uses: actions/upload-artifact@v4
with:
name: result-videos
path: testing/cypress/videos/
- name: Upload Screenshots
uses: actions/upload-artifact@v4
with:
name: result-screenshots
path: testing/cypress/screenshots/