Merge pull request #2404 from joelanman/main #3618
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: Tests | |
on: | |
push: | |
branches: | |
- main | |
- support/* | |
pull_request: | |
jobs: | |
tests: | |
strategy: | |
fail-fast: false # continue other tests if one test in matrix fails | |
matrix: | |
node-version: [16.x, 18.x, 20.x] | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
name: Test kit on Node v${{ matrix.node-version }} (${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 25 | |
env: | |
CYPRESS_CACHE_FOLDER: ~/.cache/Cypress | |
steps: | |
- run: | | |
git config --global core.autocrlf false | |
git config --global core.eol lf | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Use Node v${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
cache: 'npm' | |
node-version: ${{ matrix.node-version }} | |
- name: Cache Cypress binary | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/Cypress | |
key: cypress-${{ runner.os }}-cypress-${{ hashFiles('**/package.json') }} | |
- run: npm ci | |
- run: npm run test:unit && npm run test:integration | |
env: | |
CI: true | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |