Skip to content

Commit dd3ccd8

Browse files
committed
feat(ci): add style check step and integrate Prettier for code formatting
1 parent a89b1ed commit dd3ccd8

5 files changed

Lines changed: 41 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,22 @@ jobs:
2222
run: npm ci
2323

2424
- name: Run Tests with Coverage
25-
run: npm run test -- --coverage
25+
run: npm run test -- --coverage
26+
style:
27+
name: Style
28+
runs-on: ubuntu-latest
29+
30+
steps:
31+
- name: Check out code
32+
uses: actions/checkout@v4
33+
34+
- name: Set up Node
35+
uses: actions/setup-node@v4
36+
with:
37+
node-version: 22
38+
39+
- name: Install dependencies
40+
run: npm ci
41+
42+
- name: Check Formatting
43+
run: npm run format:check

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ MuhammadQzih's version of Boot.dev's Notely app
66
This repo contains the typescript starter code for the "Notely" application for the "Learn CICD" course on [Boot.dev](https://boot.dev).
77

88
## Local Development
9+
910
Create a `.env` file in the root of the project with the following contents:
1011

1112
```bash
1213
PORT="8080"
1314
```
1415

15-
1616
Run the server:
1717

1818
```bash

package-lock.json

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"build": "npx tsc",
1111
"start": "node dist/main.js",
1212
"dev": "npx tsc && node dist/main.js",
13-
"test": "vitest --run"
13+
"test": "vitest --run",
14+
"format:check": "prettier --check ."
1415
},
1516
"devDependencies": {
1617
"@types/cors": "^2.8.17",
@@ -19,6 +20,7 @@
1920
"@vitest/coverage-v8": "^4.0.18",
2021
"drizzle-kit": "^0.28.1",
2122
"globals": "^15.12.0",
23+
"prettier": "3.8.1",
2224
"tsx": "^4.19.2",
2325
"typescript": "^5.6.3",
2426
"vitest": "^4.0.18"

src/tests/auth.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ describe("getAPIKey", () => {
1717

1818
expect(() => getAPIKey(headers)).toThrow();
1919
});
20-
});
20+
});

0 commit comments

Comments
 (0)