Lint and E2E tests #3
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: Lint and E2E tests | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- master | |
jobs: | |
lint-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js 20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
cache: 'npm' | |
cache-dependency-path: 'package-lock.json' | |
- name: Install dependencies | |
uses: cypress-io/github-action@v6 | |
with: | |
runTests: false | |
- name: Lint | |
run: npm run lint | |
- name: E2E tests | |
uses: cypress-io/github-action@v6 | |
with: | |
install: false | |
config: baseUrl=http://localhost:3000/ | |
start: npm run dev | |
wait-on: 'http://localhost:3000' |