forked from Klaveness-Digital/cypress-cucumber-preprocessor
-
-
Notifications
You must be signed in to change notification settings - Fork 149
82 lines (78 loc) · 2.33 KB
/
build.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Build
on: [push, pull_request]
jobs:
prepare-versions:
runs-on: ubuntu-20.04
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v4
- id: set-matrix
name: Prepare
run: echo "matrix=$(node -p "JSON.stringify(require('./package.json').peerDependencies['cypress'].split(' || '))")" >> $GITHUB_OUTPUT
- run: npm -v
test:
needs: prepare-versions
runs-on: ubuntu-20.04
container:
image: cypress/browsers:node-20.5.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
strategy:
matrix:
cypress-version: ${{fromJson(needs.prepare-versions.outputs.matrix)}}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache NPM modules
uses: actions/cache@v4
with:
path: ~/.npm
key: npm-linux@${{ matrix.cypress-version }}
- name: Cache Cypress binaries
uses: actions/cache@v4
with:
path: ~/.cache/Cypress
key: cypress-linux@${{ matrix.cypress-version }}
- name: Change owner
run: "chown root: ."
- name: Dependencies
env:
CYPRESS_INSTALL_BINARY: "0"
run: |
npm install --force && \
npm install --no-save cypress@${{ matrix.cypress-version }} && \
env -u CYPRESS_INSTALL_BINARY npx cypress install
- name: Build
run: npm run build
- name: Test
run: npm run test
- name: Version
run: npx cypress --version
windows:
runs-on: windows-latest
env:
NPM_CONFIG_CACHE: ${{ github.workspace }}/.npm
CYPRESS_CACHE_FOLDER: ${{ github.workspace }}/.cypress
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache NPM modules
uses: actions/cache@v4
with:
path: .npm
key: npm-windows
- name: Cache Cypress binaries
uses: actions/cache@v4
with:
path: .cypress
key: cypress-windows
- name: Dependencies
shell: bash
run: npm install
- name: Build
run: npm run build
# https://github.com/webpack/webpack/issues/12759
- name: Remove Webpack test
run: rm features/loaders/webpack.feature
- name: Test
run: npm run test:integration