From 7046aba68751730bc765071f41beffd133ddba29 Mon Sep 17 00:00:00 2001 From: mikais13 Date: Mon, 23 Feb 2026 20:32:26 +1300 Subject: [PATCH 1/8] feat(.github): add basic ci pipeline --- .github/workflows/ci-pipeline.yaml | 112 +++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 .github/workflows/ci-pipeline.yaml diff --git a/.github/workflows/ci-pipeline.yaml b/.github/workflows/ci-pipeline.yaml new file mode 100644 index 0000000..398f7ac --- /dev/null +++ b/.github/workflows/ci-pipeline.yaml @@ -0,0 +1,112 @@ +name: ci + +on: + push: + branches: [main] + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Set up Biome + uses: biomejs/setup-biome@v2 + + - name: Run Biome ci + run: biome ci . --error-on-warnings + + setup: + name: Setup + needs: [lint] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Check if node_modules cache exists + id: cache-check + uses: actions/cache@v4 + with: + path: node_modules + key: ${{ runner.os }}-node_modules-${{ hashFiles('bun.lock') }} + lookup-only: true + + - name: Setup Bun + if: steps.cache-check.outputs.cache-hit != 'true' + uses: oven-sh/setup-bun@v2 + + - name: Setup pnpm + if: steps.cache-check.outputs.cache-hit != 'true' + uses: pnpm/action-setup@v2 + with: + version: latest + run_install: false + + - name: Install dependencies + if: steps.cache-check.outputs.cache-hit != 'true' + run: bun install --frozen-lockfile + + - name: Save node_modules cache + if: steps.cache-check.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + path: node_modules + key: ${{ runner.os }}-node_modules-${{ hashFiles('bun.lock') }} + + type-check: + name: Check Types + needs: [lint, setup] + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Setup Bun + uses: oven-sh/setup-bun@v2 + + - name: Restore node_modules cache + id: cache-check + uses: actions/cache@v4 + with: + path: node_modules + key: ${{ runner.os }}-node_modules-${{ hashFiles('bun.lock') }} + restore-keys: ${{ runner.os }}-node_modules + + - name: Install dependencies if cache was not hit + if: steps.cache-check.outputs.cache-hit != 'true' + run: bun install --frozen-lockfile + + - name: Run type check + run: bun types:check + + build: + name: Build + needs: [type-check] + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Setup Bun + uses: oven-sh/setup-bun@v2 + + - name: Restore node_modules cache + id: cache-check + uses: actions/cache@v4 + with: + path: node_modules + key: ${{ runner.os }}-node_modules-${{ hashFiles('bun.lock') }} + restore-keys: ${{ runner.os }}-node_modules + + - name: Install dependencies if cache was not hit + if: steps.cache-check.outputs.cache-hit != 'true' + run: bun install --frozen-lockfile + + - name: Build project + run: bun build \ No newline at end of file From 7e7bb07ce635922bf8f281764db93246e7540744 Mon Sep 17 00:00:00 2001 From: mikais13 Date: Mon, 23 Feb 2026 20:34:16 +1300 Subject: [PATCH 2/8] style(.github): add name to lint job --- .github/workflows/ci-pipeline.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-pipeline.yaml b/.github/workflows/ci-pipeline.yaml index 398f7ac..3a6048b 100644 --- a/.github/workflows/ci-pipeline.yaml +++ b/.github/workflows/ci-pipeline.yaml @@ -11,6 +11,7 @@ concurrency: jobs: lint: + name: Lint runs-on: ubuntu-latest steps: - name: Checkout Repository From 8936cd57826562dea61bf04cb07b1642f1f6bed3 Mon Sep 17 00:00:00 2001 From: mikais13 Date: Mon, 23 Feb 2026 20:35:41 +1300 Subject: [PATCH 3/8] fix(ci): add --ignore-scripts to stop lefthook postinstall script running --- .github/workflows/ci-pipeline.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-pipeline.yaml b/.github/workflows/ci-pipeline.yaml index 3a6048b..af20129 100644 --- a/.github/workflows/ci-pipeline.yaml +++ b/.github/workflows/ci-pipeline.yaml @@ -51,7 +51,7 @@ jobs: - name: Install dependencies if: steps.cache-check.outputs.cache-hit != 'true' - run: bun install --frozen-lockfile + run: bun install --frozen-lockfile --ignore-scripts - name: Save node_modules cache if: steps.cache-check.outputs.cache-hit != 'true' @@ -81,7 +81,7 @@ jobs: - name: Install dependencies if cache was not hit if: steps.cache-check.outputs.cache-hit != 'true' - run: bun install --frozen-lockfile + run: bun install --frozen-lockfile --ignore-scripts - name: Run type check run: bun types:check @@ -107,7 +107,7 @@ jobs: - name: Install dependencies if cache was not hit if: steps.cache-check.outputs.cache-hit != 'true' - run: bun install --frozen-lockfile + run: bun install --frozen-lockfile --ignore-scripts - name: Build project run: bun build \ No newline at end of file From 267adb40958444e8f81916b2431789d95b401295 Mon Sep 17 00:00:00 2001 From: mikais13 Date: Mon, 23 Feb 2026 20:44:05 +1300 Subject: [PATCH 4/8] feat(scripts): add build:api command --- .github/workflows/ci-pipeline.yaml | 4 ++-- package.json | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-pipeline.yaml b/.github/workflows/ci-pipeline.yaml index af20129..92a820f 100644 --- a/.github/workflows/ci-pipeline.yaml +++ b/.github/workflows/ci-pipeline.yaml @@ -87,7 +87,7 @@ jobs: run: bun types:check build: - name: Build + name: Build API needs: [type-check] runs-on: ubuntu-latest steps: @@ -110,4 +110,4 @@ jobs: run: bun install --frozen-lockfile --ignore-scripts - name: Build project - run: bun build \ No newline at end of file + run: bun build:api \ No newline at end of file diff --git a/package.json b/package.json index 4ae1c1c..1d284b9 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "pr-stack", "scripts": { "dev:api": "bun run --hot src/api/index.ts", + "build:api": "bun build src/api/index.ts --outdir=dist --target=bun", "types:check": "tsc --noEmit --skipLibCheck", "lint:check": "biome check .", "lint:fix": "biome check . --write", From 83a3e363d3fa7b217f602a8fd99e502620be642b Mon Sep 17 00:00:00 2001 From: mikais13 Date: Mon, 23 Feb 2026 20:48:05 +1300 Subject: [PATCH 5/8] fix(ci): use checkout v4 in lint --- .github/workflows/ci-pipeline.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-pipeline.yaml b/.github/workflows/ci-pipeline.yaml index 92a820f..bd58a20 100644 --- a/.github/workflows/ci-pipeline.yaml +++ b/.github/workflows/ci-pipeline.yaml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Biome uses: biomejs/setup-biome@v2 From 6973588aff2d66346350fb01a9a06d0a6ebff7df Mon Sep 17 00:00:00 2001 From: mikais13 Date: Mon, 23 Feb 2026 20:49:02 +1300 Subject: [PATCH 6/8] chore(ci): remove redundant pnpm setup --- .github/workflows/ci-pipeline.yaml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/ci-pipeline.yaml b/.github/workflows/ci-pipeline.yaml index bd58a20..89ab8e2 100644 --- a/.github/workflows/ci-pipeline.yaml +++ b/.github/workflows/ci-pipeline.yaml @@ -42,13 +42,6 @@ jobs: if: steps.cache-check.outputs.cache-hit != 'true' uses: oven-sh/setup-bun@v2 - - name: Setup pnpm - if: steps.cache-check.outputs.cache-hit != 'true' - uses: pnpm/action-setup@v2 - with: - version: latest - run_install: false - - name: Install dependencies if: steps.cache-check.outputs.cache-hit != 'true' run: bun install --frozen-lockfile --ignore-scripts From 334b02363586928f7332818249e3f9e84f2ab429 Mon Sep 17 00:00:00 2001 From: mikais13 Date: Mon, 23 Feb 2026 20:51:01 +1300 Subject: [PATCH 7/8] chore(ci): pin biome version --- .github/workflows/ci-pipeline.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci-pipeline.yaml b/.github/workflows/ci-pipeline.yaml index 89ab8e2..9596bec 100644 --- a/.github/workflows/ci-pipeline.yaml +++ b/.github/workflows/ci-pipeline.yaml @@ -19,6 +19,8 @@ jobs: - name: Set up Biome uses: biomejs/setup-biome@v2 + with: + version: "2.4.2" - name: Run Biome ci run: biome ci . --error-on-warnings From 7519bcf541ae14242ee0794246e1f33d1821fa56 Mon Sep 17 00:00:00 2001 From: mikais13 Date: Mon, 23 Feb 2026 20:51:43 +1300 Subject: [PATCH 8/8] feat(ci): increase parallelisation of pipeline --- .github/workflows/ci-pipeline.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-pipeline.yaml b/.github/workflows/ci-pipeline.yaml index 9596bec..3acf51b 100644 --- a/.github/workflows/ci-pipeline.yaml +++ b/.github/workflows/ci-pipeline.yaml @@ -27,7 +27,6 @@ jobs: setup: name: Setup - needs: [lint] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -57,7 +56,7 @@ jobs: type-check: name: Check Types - needs: [lint, setup] + needs: [setup] runs-on: ubuntu-latest steps: - name: Checkout Repository @@ -83,7 +82,7 @@ jobs: build: name: Build API - needs: [type-check] + needs: [setup] runs-on: ubuntu-latest steps: - name: Checkout Repository