Skip to content

Commit

Permalink
feat: update workflows to run biome checks (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
duongdev committed Jul 8, 2024
1 parent 86c0457 commit 05bb0d8
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 5 deletions.
40 changes: 38 additions & 2 deletions .github/workflows/api_build.yaml → .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Build API
name: Checks

on:
- push
- pull_request
- workflow_dispatch

jobs:
Expand Down Expand Up @@ -42,3 +41,40 @@ jobs:

- name: Build
run: pnpm api:build

lint:
name: Lint
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- name: Biome lint
run: pnpm run -r "check"
3 changes: 2 additions & 1 deletion apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"prisma:generate": "prisma generate",
"prisma:reset": "prisma migrate reset --force",
"prisma:studio": "prisma studio",
"postinstall": "prisma generate"
"postinstall": "prisma generate",
"check": "biome check"
},
"dependencies": {
"@6pm/validation": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion packages/currency/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "",
"main": "src/index.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"check": "biome check"
},
"keywords": [],
"author": "",
Expand Down
2 changes: 1 addition & 1 deletion packages/validation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Zod schemas",
"main": "src/index.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"check": "biome check"
},
"keywords": [],
"author": "",
Expand Down

0 comments on commit 05bb0d8

Please sign in to comment.