Skip to content

Commit

Permalink
CIの設定を更新し、PostgreSQLサービスを追加。Node.jsのセットアップとテスト実行ステップを追加。 (#485)
Browse files Browse the repository at this point in the history
  • Loading branch information
ttizze authored Dec 29, 2024
2 parents 9670213 + fbd93fe commit 1d2db34
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 25 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/biome.yaml

This file was deleted.

54 changes: 54 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: CI

on:
pull_request:
workflow_dispatch:

jobs:
ci-check:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
ports:
- 5432:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: testdb
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: 'latest'

- name: Create .env
run: |
cd web
echo "TIPTAP_PRO_API_KEY=${{ secrets.TIPTAP_PRO_API_KEY }}" >> .env
echo "DATABASE_URL=postgresql://postgres:password@localhost:5432/testdb?schema=public" >> .env
- name: Install dependencies
run: |
cd web
bun install
- name: Run Biome
run: |
bun x biome ci .
- name: Run Tests
run: |
cd web
bunx prisma migrate dev && bunx prisma migrate deploy
bunx vitest
3 changes: 0 additions & 3 deletions .github/workflows/create-release-note.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Create Release Note

on:
pull_request:
types:
- closed
workflow_dispatch:

jobs:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/link-pr-to-issue.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Link PR to Issue

on:
pull_request:
types: [opened]
workflow_dispatch:
inputs:
pr_number:
Expand Down
2 changes: 0 additions & 2 deletions web/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ export default VitestConfig.defineConfig({
environmentOptions: {
vprisma: {
baseEnv: "jsdom",
databaseUrl:
"postgresql://postgres:password@localhost:5433/postgres?schema=public",
},
},
},
Expand Down

0 comments on commit 1d2db34

Please sign in to comment.