chore: add new linting script (#77) #334
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: Check | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
push: | |
branches: | |
- main | |
jobs: | |
lint: | |
name: Prettier, ESLint, and TypeScript | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm i | |
- name: Check Prettier | |
run: pnpm prettier | |
- name: Check ESLint | |
run: pnpm lint | |
- name: Check TypeScript | |
run: pnpm typecheck | |
test: | |
name: Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm i | |
- name: Check Tests | |
run: pnpm test |