Bump @typescript-eslint/parser from 7.5.0 to 7.8.0 #195
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: Run Cypress on push | |
on: | |
push: | |
branches-ignore: | |
- main | |
workflow_dispatch: | |
jobs: | |
generate_file_list: | |
name: Generate file list | |
runs-on: ubuntu-latest | |
outputs: | |
spec: ${{ steps.list_files.outputs.spec }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: List Files | |
id: list_files | |
run: | | |
# List all the .cy.js files in the cypress/e2e directory | |
# and output their file names without the extension | |
ls cypress/e2e/*.cy.js | xargs -I{} basename {} .cy.js | jq -Rrs "split(\"\n\") | map(select(length > 0)) | tojson" | tee /tmp/spec.json | |
echo "spec=$(cat /tmp/spec.json)" >> "$GITHUB_OUTPUT" | |
npm_install: | |
name: Install Node modules | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Cache node modules | |
uses: actions/cache@v4 | |
id: cache-node-modules | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }} | |
- name: Install npm dependencies | |
if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
run: npm ci | |
test: | |
name: WordPress (${{ matrix.spec }}) | |
concurrency: | |
group: cypress - ${{ github.event.pull_request.number || github.ref }} - ${{ matrix.spec }} | |
cancel-in-progress: true | |
runs-on: ubuntu-latest | |
needs: [npm_install, generate_file_list] | |
strategy: | |
fail-fast: false | |
matrix: | |
spec: ${{ fromJson(needs.generate_file_list.outputs.spec) }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Restore node modules cache | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: ${{ runner.os }}-node-modules- | |
- name: Build | |
run: | | |
npx eslint --max-warnings 0 . | |
npm run build | |
- name: Start server | |
run: | | |
npx wp-env start | |
echo "WordPress version: `npx wp-env run cli core version`" | |
- name: Cypress run | |
uses: cypress-io/github-action@v6 | |
with: | |
spec: cypress/e2e/${{ matrix.spec }}.cy.js | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: cypress/screenshots | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: cypress-videos | |
path: cypress/videos |