-
Notifications
You must be signed in to change notification settings - Fork 20
49 lines (42 loc) · 1.43 KB
/
cypress.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
name: Cypress component testing
on:
pull_request:
branches:
- master
- dev
concurrency:
# New commit on branch cancels running workflows of the same branch
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
state:
# cypress checks for "release branch" run in cypress-release-branch.yml file
if: ${{ !startsWith(github.head_ref, 'release') }}
uses: ./.github/workflows/change-detection.yml
secrets: inherit
cypress:
needs: state
if: ${{ fromJSON(needs.state.outputs.STATE).HAS_PACKAGES_CYPRESS_RUN }}
strategy:
fail-fast: false
matrix:
# [Note]
# Важно что бы массив был со значениями, где `""` экранируются, например -> ["\"b2c\""]
# Можно для этого использовать JSON.stringify()
scope: ${{ fromJson(needs.state.outputs.STATE).PACKAGES_CYPRESS_RUN }}
uses: ./.github/workflows/cypress-common.yml
with:
scope: ${{ matrix.scope }}
secrets: inherit
cypress-react-17:
needs: state
if: ${{ fromJSON(needs.state.outputs.STATE).HAS_PACKAGES_CYPRESS_RUN }}
strategy:
fail-fast: false
matrix:
scope: ${{ fromJson(needs.state.outputs.STATE).PACKAGES_CYPRESS_RUN }}
uses: ./.github/workflows/cypress-common.yml
with:
scope: ${{ matrix.scope }}
with-react-17: true
secrets: inherit