From 5f889dd16587190c93b5dbd403437a843efcf4ea Mon Sep 17 00:00:00 2001 From: Julian Schoen Date: Thu, 2 Apr 2026 00:12:24 +0200 Subject: [PATCH] ci: add dependency caching and split into parallel jobs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Split CI into build → test + lint (parallel), add actions/cache for node_modules keyed on bun.lock, and use --frozen-lockfile for reproducible installs. --- .github/workflows/ci.yml | 56 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 53 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 371391d..9f41039 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,12 +7,62 @@ on: branches: [main] jobs: - test: + build: + name: Build & Type Check runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: oven-sh/setup-bun@v2 - - run: bun install + + - name: Cache node_modules + uses: actions/cache@v4 + with: + path: node_modules + key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }} + restore-keys: bun-${{ runner.os }}- + + - run: bun install --frozen-lockfile + - run: bun run build - - run: bun run test + + test: + name: Test + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v4 + + - uses: oven-sh/setup-bun@v2 + + - name: Cache node_modules + uses: actions/cache@v4 + with: + path: node_modules + key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }} + restore-keys: bun-${{ runner.os }}- + + - run: bun install --frozen-lockfile + + - name: Run tests + run: bun run --filter 'open-browser' test + + lint: + name: Lint + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v4 + + - uses: oven-sh/setup-bun@v2 + + - name: Cache node_modules + uses: actions/cache@v4 + with: + path: node_modules + key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }} + restore-keys: bun-${{ runner.os }}- + + - run: bun install --frozen-lockfile + - run: bun run lint