update cypress workflow #7
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: App Workflow | ||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [20.x] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Install dependencies | ||
run: yarn --frozen-lockfile | ||
- name: Run unit tests | ||
run: yarn test | ||
- name: Check linting | ||
run: yarn lint | ||
cypress-run: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Run end-to-end tests | ||
uses: actions/checkout@v4 | ||
uses: cypress-io/github-action@v6 | ||
with: | ||
config-file: cypress.config.ts | ||
start: yarn dev |