Skip to content

Commit fd4e873

Browse files
authored
Merge pull request #296 from abramenal/chore/enable-ff-tests
chore: enable Firefox testing
2 parents 1ae2d71 + 37d0fe5 commit fd4e873

File tree

1 file changed

+56
-23
lines changed

1 file changed

+56
-23
lines changed

.github/workflows/build.yml

+56-23
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: build
22

33
on:
44
push:
5-
branches: [ $default-branch ]
5+
branches: [$default-branch]
66
pull_request: {}
77

88
jobs:
@@ -20,7 +20,7 @@ jobs:
2020
- run: npm run build
2121

2222
test-e2e:
23-
name: E2E tests
23+
name: E2E tests (Chrome & Electron)
2424
needs: [build]
2525
runs-on: ubuntu-latest
2626
container: cypress/browsers:node14.15.0-chrome86-ff82
@@ -32,6 +32,7 @@ jobs:
3232
# pass GitHub token to allow accurately detecting a build vs a re-run build
3333
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3434
strategy:
35+
fail-fast: false
3536
matrix:
3637
cwd: [angularjs-ng-file-upload, react-dropzone, react-html5-input, shadow-dom-native]
3738

@@ -70,27 +71,6 @@ jobs:
7071
browser: chrome
7172
headless: true
7273
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 }}
9474
- name: Run Electron tests
9575
uses: cypress-io/github-action@v2
9676
with:
@@ -113,3 +93,56 @@ jobs:
11393
browser: electron
11494
headless: true
11595
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

Comments
 (0)