-
Notifications
You must be signed in to change notification settings - Fork 2
73 lines (63 loc) · 1.92 KB
/
acceptance.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
name: Acceptance tests
on:
- push
env:
ADDON_NAME: "@plonegovbr/volto-network-block"
ADDON_PATH: "volto-network-block"
jobs:
meta:
runs-on: ubuntu-latest
outputs:
VOLTO_VERSION: ${{ steps.vars.outputs.VOLTO_VERSION }}
CURRENT_DIR: ${{ steps.vars.outputs.CURRENT_DIR }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set Env Vars
id: vars
run: |
echo "VOLTO_VERSION=`python .github/helper.py volto_version`" >> $GITHUB_OUTPUT
echo "CURRENT_DIR=`pwd`" >> $GITHUB_OUTPUT
acceptance:
runs-on: ubuntu-latest
needs:
- meta
env:
CURRENT_DIR: ${{ needs.meta.outputs.CURRENT_DIR }}
VOLTO_VERSION: ${{ needs.meta.outputs.VOLTO_VERSION }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Install Cypress
run: |
cd acceptance
yarn
- name: "Cypress: Acceptance tests"
uses: cypress-io/github-action@v5
env:
BABEL_ENV: production
CYPRESS_RETRIES: 2
CYPRESS_DEFAULT_COMMAND_TIMEOUT: 10000
with:
parallel: false
browser: chrome
working-directory: acceptance
spec: cypress/tests/*.js
install: false
start: |
docker compose -f docker-compose.yml --profile prod up
wait-on: 'npx wait-on --httpTimeout 20000 http-get://localhost:55001/plone http://localhost:3000'
# Upload Cypress screenshots
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots-acceptance
path: acceptance/cypress/screenshots
# Upload Cypress videos
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-videos-acceptance
path: acceptance/cypress/videos