Add GitHub link #26
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: Formatter, linter & type checker | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
setUp: | |
name: Set up environment | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: npm ci | |
prettier: | |
name: Run Prettier | |
runs-on: ubuntu-latest | |
needs: setUp | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install dependencies (cached) | |
run: npm ci --prefer-offline | |
- name: Run Prettier | |
run: npm run prettier | |
nextLint: | |
name: Run ESLint | |
runs-on: ubuntu-latest | |
needs: setUp | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install dependencies (cached) | |
run: npm ci --prefer-offline | |
- name: Run ESLint | |
run: npm run lint | |
typescript: | |
name: TypeScript check | |
runs-on: ubuntu-latest | |
needs: setUp | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install dependencies (cached) | |
run: npm ci --prefer-offline | |
- name: TypeScript check | |
run: npm run tsc |