@@ -2,7 +2,7 @@ name: build
2
2
3
3
on :
4
4
push :
5
- branches : [ $default-branch ]
5
+ branches : [$default-branch]
6
6
pull_request : {}
7
7
8
8
jobs :
20
20
- run : npm run build
21
21
22
22
test-e2e :
23
- name : E2E tests
23
+ name : E2E tests (Chrome & Electron)
24
24
needs : [build]
25
25
runs-on : ubuntu-latest
26
26
container : cypress/browsers:node14.15.0-chrome86-ff82
32
32
# pass GitHub token to allow accurately detecting a build vs a re-run build
33
33
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34
34
strategy :
35
+ fail-fast : false
35
36
matrix :
36
37
cwd : [angularjs-ng-file-upload, react-dropzone, react-html5-input, shadow-dom-native]
37
38
70
71
browser : chrome
71
72
headless : true
72
73
wait-on : ${{ env.app_host }}
73
- # - name: Run Firefox tests
74
- # uses: cypress-io/github-action@v2
75
- # with:
76
- # working-directory: ./recipes/${{ matrix.cwd }}
77
- # install: false
78
- # record: true
79
- # group: '${{ matrix.cwd }}/Firefox'
80
- # browser: firefox
81
- # headless: false
82
- # wait-on: ${{ env.app_host }}
83
- # - name: Run Firefox headless tests
84
- # uses: cypress-io/github-action@v2
85
- # with:
86
- # working-directory: ./recipes/${{ matrix.cwd }}
87
- # install: false
88
- # record: true
89
- # group: '${{ matrix.cwd }}/Firefox (headless)'
90
- # ci-build-id: '${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}'
91
- # browser: firefox
92
- # headless: true
93
- # wait-on: ${{ env.app_host }}
94
74
- name : Run Electron tests
95
75
uses : cypress-io/github-action@v2
96
76
with :
@@ -113,3 +93,56 @@ jobs:
113
93
browser : electron
114
94
headless : true
115
95
wait-on : ${{ env.app_host }}
96
+
97
+ test-e2e-firefox :
98
+ name : E2E tests (Firefox)
99
+ needs : [build]
100
+ runs-on : ubuntu-latest
101
+ container :
102
+ image : cypress/browsers:node14.16.0-chrome89-ff86
103
+ options : --user 1001
104
+
105
+ env :
106
+ app_host : ' http://localhost:3000'
107
+ # pass the Dashboard record key as an environment variable
108
+ CYPRESS_RECORD_KEY : ${{ secrets.CYPRESS_RECORD_KEY }}
109
+ # pass GitHub token to allow accurately detecting a build vs a re-run build
110
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
111
+ strategy :
112
+ matrix :
113
+ cwd : [angularjs-ng-file-upload, react-dropzone, react-html5-input, shadow-dom-native]
114
+
115
+ steps :
116
+ - uses : actions/checkout@v2
117
+ - uses : gerred/actions/current-time@master
118
+ - run : npm ci
119
+ - run : npm run build
120
+ - name : Install dependencies and verify Cypress
121
+ uses : cypress-io/github-action@v2
122
+ with :
123
+ working-directory : ./recipes/${{ matrix.cwd }}
124
+ runTests : false
125
+ - name : Run web application
126
+ run : npm start & # & helps to run daemonized app
127
+ working-directory : ./recipes/${{ matrix.cwd }}
128
+ - name : Run Firefox tests
129
+ uses : cypress-io/github-action@v2
130
+ with :
131
+ working-directory : ./recipes/${{ matrix.cwd }}
132
+ install : false
133
+ record : true
134
+ group : ' ${{ matrix.cwd }}/Firefox'
135
+ browser : firefox
136
+ headless : false
137
+ wait-on : ${{ env.app_host }}
138
+ - name : Run Firefox headless tests
139
+ uses : cypress-io/github-action@v2
140
+ with :
141
+ working-directory : ./recipes/${{ matrix.cwd }}
142
+ install : false
143
+ record : true
144
+ group : ' ${{ matrix.cwd }}/Firefox (headless)'
145
+ ci-build-id : ' ${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}'
146
+ browser : firefox
147
+ headless : true
148
+ wait-on : ${{ env.app_host }}
0 commit comments