Refactor form validation logic and rename utility functions for clarity #68
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-test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Install NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20.8.0' | |
cache: 'pnpm' | |
- name: Install NodeJS dependencies | |
run: pnpm install | |
- name: Run linting | |
run: pnpm lint:ci | |
- name: Run type check | |
run: pnpm types:check | |
test: | |
runs-on: ubuntu-latest | |
needs: lint | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Install NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
cache: 'pnpm' | |
- name: Install NodeJS dependencies | |
run: pnpm install | |
- name: Run tests | |
run: pnpm test:ci |