This repository has been archived by the owner on Dec 9, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
83 lines (76 loc) · 2.05 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
79
80
81
82
83
name: 'E2E'
on:
workflow_call:
inputs:
affected:
description: >
Run for affected projects.
required: false
default: true
type: boolean
node_version:
description: >
Optionally define the version of Node to install.
required: false
default: 'lts/*'
type: string
save_cache:
description: >
Should the cache be saved upon completion?
required: false
default: false
type: boolean
secrets:
NX_CLOUD_ACCESS_TOKEN:
description: 'The NX Cloud API token'
required: true
NX__TRIPPIN__API_KEY:
description: 'The Trippin API Key'
required: true
concurrency:
group: e2e--${{ github.workflow }}--${{ github.ref }}
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
NX__TRIPPIN__API_KEY: ${{ secrets.NX__TRIPPIN__API_KEY }}
jobs:
e2e:
name: E2E - ${{ matrix.e2e }}
strategy:
max-parallel: 4
matrix:
e2e:
- e2e
- e2e-serve
- e2e-serve-dev
- e2e-start
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
with:
fetch-depth: 0
- name: Setup Job
uses: ./.github/actions/setup-job
with:
browsers: 'true'
node_version: ${{ inputs.node_version }}
save_cache: '${{ inputs.save_cache }}'
- name: Affected ${{ matrix.e2e }}
if: inputs.affected == true
uses: cypress-io/github-action@v5
with:
install: false
command: |
pnpm nx affected \
--target=${{ matrix.e2e }} \
--parallel=1
- name: ${{ matrix.e2e }}
if: inputs.affected != true
uses: cypress-io/github-action@v5
with:
install: false
command: |
pnpm nx run-many \
--target=${{ matrix.e2e }} \
--parallel=1 \
--all