Skip to content

Commit

Permalink
chore: add lint aciton
Browse files Browse the repository at this point in the history
  • Loading branch information
sehyunc committed Sep 5, 2024
1 parent 76a4eb1 commit 004c9da
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Code Quality

on:
pull_request:
branches: [main]

jobs:
code-quality:
name: Lint, Format, and Type Check
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: actions/setup-node@v4
with:
node-version: "20"

- uses: pnpm/action-setup@v2
with:
version: 9.1.4

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run linting
run: pnpm run lint

- name: Run formatting check
run: pnpm prettier --check .

- name: Run type checking
run: pnpm run typecheck

0 comments on commit 004c9da

Please sign in to comment.