File tree 3 files changed +39
-36
lines changed
3 files changed +39
-36
lines changed Original file line number Diff line number Diff line change
1
+ name: .Tests
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ ### Required
7
+ target:
8
+ description: PR number, test or prod
9
+ required: true
10
+ type: string
11
+
12
+ jobs:
13
+ cypress-e2e:
14
+ name: Cypress end to end test
15
+ needs: [deploys]
16
+ runs-on: ubuntu-22.04
17
+ strategy:
18
+ matrix:
19
+ browser: [chrome, edge]
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+ - uses: cypress-io/github-action@v5
23
+ name: Cypress run
24
+ with:
25
+ config: pageLoadTimeout=10000,baseUrl=https://pubcode-${{ inputs.target }}.apps.silver.devops.gov.bc.ca/
26
+ working-directory: ./frontend
27
+ browser: ${{ matrix.browser }}
28
+ - uses: actions/upload-artifact@v3
29
+ if: failure()
30
+ with:
31
+ name: cypress-screenshots
32
+ path: ./frontend/cypress/screenshots
33
+ if-no-files-found: ignore # 'warn' or 'error' are also available, defaults to `warn`
Original file line number Diff line number Diff line change 96
96
cypress-e2e :
97
97
name : Cypress end to end test
98
98
needs : [deploys]
99
- runs-on : ubuntu-22.04
100
- strategy :
101
- matrix :
102
- browser : [ chrome, firefox, edge ]
103
- steps :
104
- - uses : actions/checkout@v4
105
- - uses : cypress-io/github-action@v5
106
- name : Cypress run
107
- with :
108
- config : pageLoadTimeout=10000,baseUrl=https://pubcode-test.apps.silver.devops.gov.bc.ca/
109
- working-directory : ./frontend
110
- browser : ${{ matrix.browser }}
111
- - uses : actions/upload-artifact@v3
112
- if : failure()
113
- with :
114
- name : cypress-screenshots
115
- path : ./frontend/cypress/screenshots
116
- if-no-files-found : ignore # 'warn' or 'error' are also available, defaults to `warn`
99
+ uses : ./.github/workflows/.tests.yml
100
+ with :
101
+ target : test
117
102
118
103
deploys-prod :
119
104
name : PROD Deployments
Original file line number Diff line number Diff line change @@ -115,21 +115,6 @@ jobs:
115
115
cypress-e2e :
116
116
name : Cypress end to end test
117
117
needs : [deploys]
118
- runs-on : ubuntu-22.04
119
- strategy :
120
- matrix :
121
- browser : [chrome, edge]
122
- steps :
123
- - uses : actions/checkout@v4
124
- - uses : cypress-io/github-action@v5
125
- name : Cypress run
126
- with :
127
- config : pageLoadTimeout=10000,baseUrl=https://pubcode-${{ github.event.number }}.apps.silver.devops.gov.bc.ca/
128
- working-directory : ./frontend
129
- browser : ${{ matrix.browser }}
130
- - uses : actions/upload-artifact@v3
131
- if : failure()
132
- with :
133
- name : cypress-screenshots
134
- path : ./frontend/cypress/screenshots
135
- if-no-files-found : ignore # 'warn' or 'error' are also available, defaults to `warn`
118
+ uses : ./.github/workflows/.tests.yml
119
+ with :
120
+ target : ${{ github.event.number }}
You can’t perform that action at this time.
0 commit comments