Merge pull request #32 from HeyyCzer/impl-testing #3
This file contains hidden or 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 and Test Next.js with Cypress | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: npm install | |
- name: Build Next.js application | |
run: npm run build | |
- name: Start Next.js application in background | |
run: npm run start & | |
- name: Wait for application to be ready | |
run: npx wait-on http://localhost:3000 | |
- name: Run Cypress tests | |
run: npx cypress run |