Run tests in the build step #29
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: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20.10.0 | |
- name: Install Dependencies | |
run: npm install | |
- name: Lint with ESLint | |
run: npm run lint | |
- name: Format with Prettier | |
run: npm run format | |
- name: Run tests | |
uses: cypress-io/github-action@v6 | |
with: | |
start: npm run dev | |
browser: chrome |