Skip to content

Commit 28b453c

Browse files
committed
chore: add ci workflow for prs and test coverage
1 parent 7b562cc commit 28b453c

3 files changed

Lines changed: 112 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: ['**']
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout repo
13+
uses: actions/checkout@v4
14+
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: 20
19+
cache: 'npm'
20+
21+
- name: Install dependencies
22+
run: npm ci
23+
24+
- name: Lint
25+
run: npm run lint
26+
27+
- name: Run formatting
28+
run: npm run format
29+
30+
- name: Run Tests with Coverage
31+
run: npm test -- --coverage
32+
33+
- name: Run type checks
34+
run: npm run typecheck
35+
36+
- name: Build
37+
run: npm run build

package-lock.json

Lines changed: 73 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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"format": "prettier --write .",
1313
"typecheck": "tsc --noEmit",
1414
"build": "tsc",
15-
"test": "vitest run",
15+
"test": "vitest run --coverage",
1616
"test:coverage": "jest --coverage",
1717
"db:create": "npx sequelize-cli db:create",
1818
"db:drop": "npx sequelize-cli db:drop",
@@ -72,6 +72,7 @@
7272
"@types/supertest": "^6.0.3",
7373
"@typescript-eslint/eslint-plugin": "^8.46.2",
7474
"@typescript-eslint/parser": "^8.46.2",
75+
"@vitest/coverage-v8": "^4.0.18",
7576
"dotenv": "^16.4.5",
7677
"eslint": "^9.38.0",
7778
"eslint-config-prettier": "^10.1.8",

0 commit comments

Comments
 (0)