Skip to content

Commit 490bcb3

Browse files
authored
Merge pull request #15 from onozaty/14-add-ci
Add CI(#14)
2 parents f8bc4b4 + 610c175 commit 490bcb3

File tree

4 files changed

+57
-1
lines changed

4 files changed

+57
-1
lines changed

.devcontainer/devcontainer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,8 @@
1313
"vitest.explorer"
1414
]
1515
}
16+
},
17+
"features": {
18+
"ghcr.io/anthropics/devcontainer-features/claude-code:1.0.5": {}
1619
}
1720
}

.github/workflows/test.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [18.x, 20.x, 22.x]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Install pnpm
21+
uses: pnpm/action-setup@v4
22+
with:
23+
version: latest
24+
run_install: false
25+
26+
- name: Use Node.js ${{ matrix.node-version }}
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
cache: "pnpm"
31+
32+
- name: Install dependencies
33+
run: pnpm install --frozen-lockfile
34+
35+
- name: Run lint
36+
run: pnpm run lint
37+
38+
- name: Run tests with coverage
39+
run: pnpm run test:cov
40+
41+
- name: Upload coverage to Codecov
42+
uses: codecov/codecov-action@v3
43+
with:
44+
token: ${{ secrets.CODECOV_TOKEN }}
45+
file: ./coverage/coverage-final.json
46+
slug: onozaty/prisma-db-comments-generator
47+
48+
- name: Build
49+
run: pnpm run build

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# prisma-db-comments-generator
22

3+
[![Test](https://github.com/onozaty/prisma-db-comments-generator/actions/workflows/test.yml/badge.svg)](https://github.com/onozaty/prisma-db-comments-generator/actions/workflows/test.yml)
4+
[![codecov](https://codecov.io/gh/onozaty/prisma-db-comments-generator/graph/badge.svg?token=406L0D8MI0)](https://codecov.io/gh/onozaty/prisma-db-comments-generator)
5+
[![npm version](https://badge.fury.io/js/@onozaty%2Fprisma-db-comments-generator.svg)](https://badge.fury.io/js/@onozaty%2Fprisma-db-comments-generator)
6+
37
Generate database comments from Prisma schema.
48

59
It is based on the following code idea. Thank you @Jyrno42 .

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"build": "rm -rf dist/ && node build.js",
1515
"prepare": "pnpm run build",
1616
"format": "prettier --write src/**",
17-
"lint": "eslint src/**",
17+
"lint": "eslint 'src/**/*.ts' --ignore-pattern 'src/__fixtures__/**'",
1818
"test": "vitest run",
1919
"test:cov": "vitest run --coverage",
2020
"db:migrate": "prisma migrate dev && prisma generate && pnpm run db:deploy",

0 commit comments

Comments
 (0)