Skip to content

Bump next from 14.2.22 to 15.1.3 in the npm_and_yarn group across 1 directory #2808

Bump next from 14.2.22 to 15.1.3 in the npm_and_yarn group across 1 directory

Bump next from 14.2.22 to 15.1.3 in the npm_and_yarn group across 1 directory #2808

Workflow file for this run

name: Cypress and Percy Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
cypress-run:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
env:
AIRTABLE_READ_ONLY_TOKEN: ${{ secrets.AIRTABLE_READ_ONLY_TOKEN }}
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
ENCRYPTION_SECRET_KEY: "a-random-key-so-that-ci-builds-dont-fail"
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "20.11.1"
- name: Install Dependencies
run: npm ci
- name: Build Project
run: npm run build
- name: Start Server
run: |
npm start &
echo "Waiting for server to start..."
npx wait-on http://localhost:3000
- name: Determine Test Type
id: test-type
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
BRANCH_NAME="${{ github.head_ref }}"
COMMIT_MESSAGE="${{ github.event.pull_request.title }}"
else
BRANCH_NAME="${{ github.ref_name }}"
COMMIT_MESSAGE="${{ github.event.head_commit.message }}"
fi
if [[ "$BRANCH_NAME" == cms/* ]] || [[ "$COMMIT_MESSAGE" == *"[skip percy]"* ]]; then
echo "skip_percy=true" >> $GITHUB_OUTPUT
else
echo "skip_percy=false" >> $GITHUB_OUTPUT
fi
- name: Run Cypress Tests without Percy
if: steps.test-type.outputs.skip_percy == 'true'
run: npm run test:cypress
- name: Run Cypress Tests with Percy
if: steps.test-type.outputs.skip_percy == 'false'
run: npm run test:cypress:percy