-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (37 loc) · 1.24 KB
/
setup.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
name: setup and install
env:
NODE_VERSION: 22
DISPLAY: ""
CONTENTFUL_SPACE_ID: ${{ secrets.CONTENTFUL_SPACE_ID }}
CONTENTFUL_ACCESS_TOKEN: ${{ secrets.CONTENTFUL_ACCESS_TOKEN }}
permissions: read-all
on:
workflow_call:
inputs:
test-command:
required: true
type: string
jobs:
call-workflow:
runs-on: ubuntu-latest
steps:
- name: checkout ${{ env.GITHUB_REF }}
uses: actions/checkout@v3
#- name: tmate session
# uses: mxschmitt/action-tmate@v3
- name: pull images
run: docker compose pull
- name: gatsby - npm install
run: docker compose run --rm -u root gatsby ci
- name: cypress - npm install
run: docker compose run --rm -u root e2e_client ci
- name: gatsby dev
run: docker compose -f docker-compose.yml -f docker-compose.actions.yml up --wait gatsby
- name: run test
run: docker compose -f docker-compose.yml -f docker-compose.actions.yml run --rm e2e_client run ${{ inputs.test-command }}
- name: Upload image diff outputs
uses: actions/upload-artifact@v3
with:
name: e2e image output directory
path: cypress/cypress/snapshots/
if: inputs.test-command == 'e2e' && failure()