From 729d1761f8409e9ca6a158cfb8418e63fe35fea9 Mon Sep 17 00:00:00 2001 From: Zaid-maker <53424436+Zaid-maker@users.noreply.github.com> Date: Tue, 24 Jun 2025 16:14:40 +0500 Subject: [PATCH 1/6] feat: add Bun CI workflow for building and testing --- .github/workflows/bun-ci.yml | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/bun-ci.yml diff --git a/.github/workflows/bun-ci.yml b/.github/workflows/bun-ci.yml new file mode 100644 index 0000000..b5b785a --- /dev/null +++ b/.github/workflows/bun-ci.yml @@ -0,0 +1,37 @@ +name: Bun CI + +on: + push: + branches: [main] + paths-ignore: + - "*.md" + pull_request: + branches: [main] + paths-ignore: + - "*.md" + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Bun + uses: oven-sh/setup-bun@v2.0.2 + with: + bun-version: 1.2.2 + + - name: Install dependencies + working-directory: apps/web + run: bun install + + - name: Build + working-directory: apps/web + run: bun run build + + - name: Run tests + working-directory: apps/web + run: echo "No tests implemented yet" + continue-on-error: true From 6a5956e64bbf22047f8e9ae3176a81fe5e2a461b Mon Sep 17 00:00:00 2001 From: Zaid-maker <53424436+Zaid-maker@users.noreply.github.com> Date: Tue, 24 Jun 2025 16:21:51 +0500 Subject: [PATCH 2/6] feat: enable multi-platform builds in Bun CI workflow --- .github/workflows/bun-ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/bun-ci.yml b/.github/workflows/bun-ci.yml index b5b785a..3838d12 100644 --- a/.github/workflows/bun-ci.yml +++ b/.github/workflows/bun-ci.yml @@ -12,7 +12,10 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] steps: - name: Checkout repository From 6a6ba8d0aecbf712fa5196b65e49f512666599e9 Mon Sep 17 00:00:00 2001 From: Zaid-maker <53424436+Zaid-maker@users.noreply.github.com> Date: Tue, 24 Jun 2025 16:29:40 +0500 Subject: [PATCH 3/6] Add a top-level concurrency block so obsolete runs are auto-cancelled: --- .github/workflows/bun-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/bun-ci.yml b/.github/workflows/bun-ci.yml index 3838d12..62ece5b 100644 --- a/.github/workflows/bun-ci.yml +++ b/.github/workflows/bun-ci.yml @@ -1,5 +1,9 @@ name: Bun CI +concurrency: + group: bun-ci-${{ github.ref }} + cancel-in-progress: true + on: push: branches: [main] From 642c11fc9eb39bc9258e421920c41fc5f0579215 Mon Sep 17 00:00:00 2001 From: Zaid-maker <53424436+Zaid-maker@users.noreply.github.com> Date: Tue, 24 Jun 2025 16:31:13 +0500 Subject: [PATCH 4/6] implement cache --- .github/workflows/bun-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/bun-ci.yml b/.github/workflows/bun-ci.yml index 62ece5b..f3cdef4 100644 --- a/.github/workflows/bun-ci.yml +++ b/.github/workflows/bun-ci.yml @@ -30,6 +30,12 @@ jobs: with: bun-version: 1.2.2 + - name: Cache Bun modules + uses: actions/cache@v4 + with: + path: ~/.bun/install/cache + key: ${{ runner.os }}-bun-${{ hashFiles('apps/web/bun.lockb') }} + - name: Install dependencies working-directory: apps/web run: bun install From 5de5444a3e53d9a4b2c115d20535cfae823cafae Mon Sep 17 00:00:00 2001 From: Zaid-maker <53424436+Zaid-maker@users.noreply.github.com> Date: Tue, 24 Jun 2025 16:32:35 +0500 Subject: [PATCH 5/6] fix: correct cache key for Bun modules in CI workflow --- .github/workflows/bun-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bun-ci.yml b/.github/workflows/bun-ci.yml index f3cdef4..35da9b7 100644 --- a/.github/workflows/bun-ci.yml +++ b/.github/workflows/bun-ci.yml @@ -34,7 +34,7 @@ jobs: uses: actions/cache@v4 with: path: ~/.bun/install/cache - key: ${{ runner.os }}-bun-${{ hashFiles('apps/web/bun.lockb') }} + key: ${{ runner.os }}-bun-${{ hashFiles('apps/web/bun.lock') }} - name: Install dependencies working-directory: apps/web From 7c83b8e70b2024d79f053bd40e6f633969c2c1f5 Mon Sep 17 00:00:00 2001 From: Zaid-maker <53424436+Zaid-maker@users.noreply.github.com> Date: Tue, 24 Jun 2025 16:48:10 +0500 Subject: [PATCH 6/6] fix: update Bun setup action to a specific commit version --- .github/workflows/bun-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bun-ci.yml b/.github/workflows/bun-ci.yml index 35da9b7..91bf125 100644 --- a/.github/workflows/bun-ci.yml +++ b/.github/workflows/bun-ci.yml @@ -26,7 +26,7 @@ jobs: uses: actions/checkout@v4 - name: Install Bun - uses: oven-sh/setup-bun@v2.0.2 + uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 with: bun-version: 1.2.2