Skip to content

Avoid plain & strict install in examples-branch #558

Avoid plain & strict install in examples-branch

Avoid plain & strict install in examples-branch #558

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
prepare-versions:
runs-on: ubuntu-latest
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-latest
container:
image: cypress/browsers:latest
strategy:
matrix:
cypress-version: ${{fromJson(needs.prepare-versions.outputs.matrix)}}
steps:
- uses: actions/setup-node@v4
with:
node-version: 18
- 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 --engine-strict && \
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: Versions
run: |
npx cypress --version
node --version
npm --version
windows:
runs-on: windows-latest
env:
NPM_CONFIG_CACHE: ${{ github.workspace }}/.npm
CYPRESS_CACHE_FOLDER: ${{ github.workspace }}/.cypress
steps:
- uses: actions/setup-node@v4
with:
node-version: 18
- 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 --engine-strict
- 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
- name: Versions
run: |
npx cypress --version
node --version
npm --version