From 78df8b2f44112bdef92661945331c92909dc58ec Mon Sep 17 00:00:00 2001 From: devZenta Date: Thu, 5 Feb 2026 14:25:24 +0100 Subject: [PATCH 1/3] ci: add GitHub Actions workflow for lint, typecheck and build --- .github/workflows/ci.yml | 75 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..3106ade --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,75 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + lint: + name: Lint & Format + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Bun + uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - name: Install dependencies + run: bun install --frozen-lockfile + + - name: Check formatting + run: bun run format:check + + - name: Lint + run: bun run lint + + typecheck: + name: Type Check + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Bun + uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - name: Install dependencies + run: bun install --frozen-lockfile + + - name: Generate Prisma Client + run: bunx --bun prisma generate + + - name: Type check + run: bun run typecheck + + build: + name: Build + runs-on: ubuntu-latest + needs: [lint, typecheck] + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Bun + uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - name: Install dependencies + run: bun install --frozen-lockfile + + - name: Build + run: bun run build + env: + DATABASE_URL: ${{ secrets.DATABASE_URL }} From 401251d770c77f399b3d1151817ed35a2c2f83d2 Mon Sep 17 00:00:00 2001 From: devZenta Date: Thu, 5 Feb 2026 14:29:27 +0100 Subject: [PATCH 2/3] ci: add fake DATABASE_URL for prisma generate --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3106ade..c00a96a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,6 +49,8 @@ jobs: - name: Generate Prisma Client run: bunx --bun prisma generate + env: + DATABASE_URL: "postgresql://fake:fake@localhost:5432/fake" - name: Type check run: bun run typecheck @@ -72,4 +74,4 @@ jobs: - name: Build run: bun run build env: - DATABASE_URL: ${{ secrets.DATABASE_URL }} + DATABASE_URL: "postgresql://fake:fake@localhost:5432/fake" From a7365f149194cae8e3291ad8fb89eb9df255aa5d Mon Sep 17 00:00:00 2001 From: devZenta Date: Thu, 5 Feb 2026 14:32:52 +0100 Subject: [PATCH 3/3] ci: use DATABASE_URL secret for prisma generate and build --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c00a96a..be58cb8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: - name: Generate Prisma Client run: bunx --bun prisma generate env: - DATABASE_URL: "postgresql://fake:fake@localhost:5432/fake" + DATABASE_URL: ${{ secrets.DATABASE_URL }} - name: Type check run: bun run typecheck @@ -74,4 +74,4 @@ jobs: - name: Build run: bun run build env: - DATABASE_URL: "postgresql://fake:fake@localhost:5432/fake" + DATABASE_URL: ${{ secrets.DATABASE_URL }}