Skip to content

Commit 298ff05

Browse files
committed
ci(github): add code quality workflow
1 parent 8550a4f commit 298ff05

3 files changed

Lines changed: 42 additions & 1 deletion

File tree

.github/workflows/code-quality.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Code Quality
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
9+
jobs:
10+
quality:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Install pnpm
18+
uses: pnpm/action-setup@v3
19+
with:
20+
version: 9
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 20
26+
cache: "pnpm"
27+
28+
- name: Install dependencies
29+
run: pnpm install --frozen-lockfile
30+
31+
- name: Check Formatting
32+
run: pnpm format:check
33+
34+
- name: Type Check
35+
run: pnpm type-check
36+
37+
- name: Run ESLint
38+
run: pnpm lint

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
"db:migrate": "pnpm --filter @endgit/database migrate",
1414
"db:seed": "pnpm --filter @endgit/database seed",
1515
"db:studio": "pnpm --filter @endgit/database studio",
16+
"format": "prettier --write .",
17+
"format:check": "prettier --check .",
18+
"lint": "eslint src --ext .ts --fix",
19+
"type-check": "tsc --noEmit",
1620
"docker:up": "docker-compose up -d",
1721
"docker:down": "docker-compose down"
1822
},

tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"compilerOptions": {
3-
"ignoreDeprecations": "6.0",
43
"target": "ES2022",
54
"module": "CommonJS",
65
"moduleResolution": "node",

0 commit comments

Comments
 (0)