Skip to content

Commit 3273724

Browse files
committed
ci: run e2e tests in same container
1 parent 17e41b5 commit 3273724

File tree

1 file changed

+6
-45
lines changed

1 file changed

+6
-45
lines changed

.github/workflows/nodejs.yml

Lines changed: 6 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -43,60 +43,21 @@ jobs:
4343
run: npm ci
4444
- name: run unit tests
4545
run: npm run test:ci
46-
env:
47-
CI: true
48-
NODE_OPTIONS: --max-old-space-size=4096
4946
- name: build demo site
5047
run: npm run build:demo
51-
env:
52-
NODE_OPTIONS: --max-old-space-size=4096
53-
- uses: actions/upload-artifact@master
54-
with:
55-
name: dev-test-website-${{ runner.os }}-${{ matrix.node-version }}
56-
path: dev-test
57-
58-
e2e-with-cypress:
59-
needs: [changes, build]
60-
runs-on: ubuntu-latest
61-
62-
strategy:
63-
matrix:
64-
node-version: [18.x, 20.x]
65-
fail-fast: false
66-
67-
if: ${{ needs.changes.outputs.cms == 'true' }}
68-
steps:
69-
- uses: actions/checkout@v3
70-
- name: Use Node.js
71-
uses: actions/setup-node@v3
72-
with:
73-
node-version: ${{ matrix.node-version }}
74-
check-latest: true
75-
cache: 'npm'
76-
- uses: actions/download-artifact@master
77-
with:
78-
name: dev-test-website-${{ runner.os }}-18.x
79-
path: dev-test
80-
- name: npm install
81-
run: |
82-
node --version
83-
npm --version
84-
yarn --version
85-
npm install
86-
- name: e2e test
87-
run: |
88-
npm run test:e2e:run-ci
48+
- name: run e2e tests
49+
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20.x'
50+
run: npm run test:e2e:run-ci
8951
env:
9052
IS_FORK: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true }}
9153
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
9254
NODE_OPTIONS: --max-old-space-size=4096
93-
MACHINE_COUNT: 2
94-
MACHINE_INDEX: ${{ matrix.node-version }}
9555
TZ: Europe/Amsterdam
9656
- uses: actions/upload-artifact@v3
97-
if: ${{ always() }}
57+
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20.x' && failure()
9858
with:
99-
name: cypress-results-${{ matrix.node-version }}
59+
name: cypress-results
10060
path: |
10161
cypress/screenshots
10262
cypress/videos
63+

0 commit comments

Comments
 (0)