Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@
"vitest.explorer"
]
}
},
"features": {
"ghcr.io/anthropics/devcontainer-features/claude-code:1.0.5": {}
}
}
49 changes: 49 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Test

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]

steps:
- uses: actions/checkout@v4

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

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run lint
run: pnpm run lint

- name: Run tests with coverage
run: pnpm run test:cov

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/coverage-final.json
slug: onozaty/prisma-db-comments-generator

- name: Build
run: pnpm run build
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# prisma-db-comments-generator

[![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)
[![codecov](https://codecov.io/gh/onozaty/prisma-db-comments-generator/graph/badge.svg?token=406L0D8MI0)](https://codecov.io/gh/onozaty/prisma-db-comments-generator)
[![npm version](https://badge.fury.io/js/@onozaty%2Fprisma-db-comments-generator.svg)](https://badge.fury.io/js/@onozaty%2Fprisma-db-comments-generator)

Generate database comments from Prisma schema.

It is based on the following code idea. Thank you @Jyrno42 .
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"build": "rm -rf dist/ && node build.js",
"prepare": "pnpm run build",
"format": "prettier --write src/**",
"lint": "eslint src/**",
"lint": "eslint 'src/**/*.ts' --ignore-pattern 'src/__fixtures__/**'",
"test": "vitest run",
"test:cov": "vitest run --coverage",
"db:migrate": "prisma migrate dev && prisma generate && pnpm run db:deploy",
Expand Down