-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (63 loc) · 2.33 KB
/
app.e2e_tests.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
name: End to end tests
on:
push:
branches:
- main
- development
pull_request:
branches:
- main
- development
jobs:
tests:
runs-on: self-hosted
strategy:
# don't fail the entire matrix on failure
fail-fast: false
matrix:
test-platform: [firefox]
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: ./.github/prepare-action
with:
openai-api-key: ${{ secrets.OPENAI_API_KEY }}
app-debug: false
wp-username: ${{ secrets.WP_USERNAME }}
wp-password: ${{ secrets.WP_PASSWORD }}
node-version: 16.x
- name: Cypress run
uses: cypress-io/github-action@v6
with:
start: npm run web
browser: ${{ matrix.test-platform }}
- name: Upload screenshots of failed tests
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
retention-days: 1
- name: Download the screenshots artifact
uses: actions/download-artifact@v2
if: always()
with:
name: cypress-screenshots
path: cypress/screenshots
# See: https://github.com/marketplace/actions/pull-request-artifact
- name: Add artifacts to current pull request
uses: gavv/pull-request-artifacts@v2
if: always()
with:
# Commit hash that triggered PR
commit: ${{ github.event.pull_request.head.sha }}
# Token for current repo (used to post PR comment)
repo-token: ${{ secrets.GITHUB_TOKEN }}
# Optional, uncomment to use non-default title and style.
comment-title: 'Cypress screenshot artifacts'
comment-style: list
# Whitespace-separated list of files to upload
artifacts: |
cypress-screenshots
- uses: ./.github/cleanup-action
if: always()