diff --git a/.github/workflows/biome.yaml b/.github/workflows/biome.yaml deleted file mode 100644 index d6810782..00000000 --- a/.github/workflows/biome.yaml +++ /dev/null @@ -1,18 +0,0 @@ -name: Biome Check - -on: - pull_request: - workflow_dispatch: - -jobs: - biome-check: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup Biome - uses: biomejs/setup-biome@v2 - with: - version: latest - - name: Run Biome - run: biome ci . \ No newline at end of file diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 00000000..b6789b4f --- /dev/null +++ b/.github/workflows/ci.yaml @@ -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 + diff --git a/.github/workflows/create-release-note.yaml b/.github/workflows/create-release-note.yaml index c38d1449..b03c87bf 100644 --- a/.github/workflows/create-release-note.yaml +++ b/.github/workflows/create-release-note.yaml @@ -1,9 +1,6 @@ name: Create Release Note on: - pull_request: - types: - - closed workflow_dispatch: jobs: diff --git a/.github/workflows/link-pr-to-issue.yml b/.github/workflows/link-pr-to-issue.yml index 49d6ca59..aa3a1006 100644 --- a/.github/workflows/link-pr-to-issue.yml +++ b/.github/workflows/link-pr-to-issue.yml @@ -1,8 +1,6 @@ name: Link PR to Issue on: - pull_request: - types: [opened] workflow_dispatch: inputs: pr_number: diff --git a/web/vitest.config.ts b/web/vitest.config.ts index 5a27a378..5c43e773 100644 --- a/web/vitest.config.ts +++ b/web/vitest.config.ts @@ -9,8 +9,6 @@ export default VitestConfig.defineConfig({ environmentOptions: { vprisma: { baseEnv: "jsdom", - databaseUrl: - "postgresql://postgres:password@localhost:5433/postgres?schema=public", }, }, },