From c00b8bc93e76a9a33058473a6d4f94202ac9e70a Mon Sep 17 00:00:00 2001 From: Theo Browne Date: Thu, 24 Sep 2026 17:27:00 -0700 Subject: [PATCH 1/2] Run tests and production build in CI --- .github/workflows/ci.yaml | 31 +++++++++++++++++++++---------- next.config.js | 4 ---- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 21b6bf3..994e660 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -2,19 +2,22 @@ name: CI on: [push, pull_request] -env: - DATABASE_URL: "https://fake.com" - jobs: build: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Install Dependencies - run: npm install -g pnpm && pnpm install + - uses: actions/checkout@v7 + - uses: pnpm/action-setup@v6 + with: + version: 8.15.9 + - uses: actions/setup-node@v7 + with: + node-version: 24 + cache: pnpm + + - name: Install dependencies + run: pnpm install --frozen-lockfile - name: Typecheck run: pnpm typecheck @@ -22,5 +25,13 @@ jobs: - name: Lint run: pnpm lint - - name: Print Environment Variable - run: echo $MY_ENV_VAR + - name: Test + run: pnpm test + + - name: Build + env: + NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: pk_test_ZXhhbXBsZS5jb20k + CLERK_SECRET_KEY: sk_test_dummy + TWITCH_CLIENT_ID: dummy + TWITCH_CLIENT_SECRET: dummy + run: pnpm build diff --git a/next.config.js b/next.config.js index 175c457..a815d91 100644 --- a/next.config.js +++ b/next.config.js @@ -9,10 +9,6 @@ const nextConfig = { { protocol: "https", hostname: "vod-secure.twitch.tv" }, ], }, - - typescript: { - ignoreBuildErrors: true, - }, }; const withMdx = require("@next/mdx")()(nextConfig); From cfa7e2fc4b2aae29c04920a501de16145e62a042 Mon Sep 17 00:00:00 2001 From: Theo Browne Date: Thu, 24 Sep 2026 21:08:16 -0700 Subject: [PATCH 2/2] Tighten CI triggers, permissions, and pnpm setup Read the pnpm version from packageManager instead of repeating it, drop the unused dummy build env, use a read-only token, and run once per PR commit with stale runs cancelled. Co-Authored-By: Claude Opus 5.5 (1M context) --- .github/workflows/ci.yaml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 994e660..424dbd6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,6 +1,16 @@ name: CI -on: [push, pull_request] +on: + push: + branches: [main] + pull_request: + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: build: @@ -9,8 +19,6 @@ jobs: steps: - uses: actions/checkout@v7 - uses: pnpm/action-setup@v6 - with: - version: 8.15.9 - uses: actions/setup-node@v7 with: node-version: 24 @@ -29,9 +37,4 @@ jobs: run: pnpm test - name: Build - env: - NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: pk_test_ZXhhbXBsZS5jb20k - CLERK_SECRET_KEY: sk_test_dummy - TWITCH_CLIENT_ID: dummy - TWITCH_CLIENT_SECRET: dummy run: pnpm build