Add support for Cypress v10 =< #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v2 | |
- id: set-matrix | |
name: Prepare | |
run: echo "::set-output name=matrix::$(node -p "JSON.stringify(require('./package.json').peerDependencies['cypress'].split(' || '))")" | |
- run: npm -v | |
test: | |
needs: prepare-versions | |
runs-on: ubuntu-20.04 | |
container: | |
image: cypress/base:14.17.0 | |
# Why exactly 1001? See https://github.com/actions/checkout/issues/211 and https://github.com/actions/runner/issues/691. | |
options: --user 1001 | |
strategy: | |
matrix: | |
cypress-version: ${{fromJson(needs.prepare-versions.outputs.matrix)}} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Cache TypeScript installs | |
uses: actions/cache@v2 | |
with: | |
path: ~/.dts | |
key: dts | |
- name: Cache Cypress binaries | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/Cypress | |
key: cypress@${{ matrix.cypress-version }} | |
- name: Dependencies (1) | |
run: npm install | |
env: | |
CYPRESS_INSTALL_BINARY: "0" | |
- name: Dependencies (2) | |
run: npm install --no-save cypress@${{ matrix.cypress-version }} | |
- name: Build | |
run: npm run build | |
- name: Test | |
run: npm run test | |
- name: Version | |
run: npx cypress --version |