Merge pull request #1557 from codersforcauses/cycle-memberships #62
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: Code checks | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
types: ["opened", "synchronize", "reopened", "edited"] | |
workflow_dispatch: | |
jobs: | |
format: | |
name: Run Prettier | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Add pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: latest | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
cache: "pnpm" | |
- name: Install dependencies | |
run: pnpm install | |
- name: Run Prettier | |
run: npm run format:check | |
lint: | |
name: Run ESLint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Add pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: latest | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
cache: "pnpm" | |
- name: Install dependencies | |
run: pnpm install | |
- name: Run Eslint | |
run: pnpm lint:dev | |
typecheck: | |
name: Check types | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Add pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: latest | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
cache: "pnpm" | |
- name: Install dependencies | |
run: pnpm install | |
- name: Run tsc | |
run: pnpm typecheck |