From 2091d12578aa87f9d15f35e88570e0c1a2aeff9a Mon Sep 17 00:00:00 2001 From: Exotic <118054752+extoci@users.noreply.github.com> Date: Mon, 23 Nov 2026 15:12:27 +0000 Subject: [PATCH] ci: trim fixed per-job overhead - persist-credentials: false on every checkout; no job pushes, so the post-checkout credential cleanup becomes a no-op (a few seconds on Windows) - Hardcode the default bun cache path (~/.bun/install/cache) instead of a probe step per job - Merge the web-checks run steps and the release verify check/lint steps into single commands --- .github/workflows/ci-web.yml | 24 ++++++++++-------------- .github/workflows/ci.yml | 14 ++++++-------- .github/workflows/release.yml | 12 ++++++------ 3 files changed, 22 insertions(+), 28 deletions(-) diff --git a/.github/workflows/ci-web.yml b/.github/workflows/ci-web.yml index f3feac5..b9ddbbf 100644 --- a/.github/workflows/ci-web.yml +++ b/.github/workflows/ci-web.yml @@ -37,20 +37,18 @@ jobs: working-directory: web steps: - uses: actions/checkout@v7 + with: + persist-credentials: false - uses: oven-sh/setup-bun@v2 with: bun-version: "1.4.5" - - run: echo "dir=$(bun pm cache)" >> "$GITHUB_OUTPUT" - id: bun-cache - shell: bash - uses: actions/cache@v4 with: - path: ${{ steps.bun-cache.outputs.dir }} + path: ~/.bun/install/cache # Separate key: lint pulls bun@canary into the cache, keep it out of the shared one key: ${{ runner.os }}-bun-web-checks-${{ hashFiles('web/bun.lock') }} - run: bun install --frozen-lockfile - - run: bun run check - - run: bun run typecheck && bun run format:check && bun run lint -- --max-warnings 0 + - run: bun run check && bun run typecheck && bun run format:check && bun run lint -- --max-warnings 0 - run: bun test web-build: @@ -61,18 +59,17 @@ jobs: working-directory: web steps: - uses: actions/checkout@v7 + with: + persist-credentials: false - uses: oven-sh/setup-bun@v2 with: bun-version: "1.4.5" - uses: actions/setup-node@v4 with: node-version: "22" - - run: echo "dir=$(bun pm cache)" >> "$GITHUB_OUTPUT" - id: bun-cache - shell: bash - uses: actions/cache@v4 with: - path: ${{ steps.bun-cache.outputs.dir }} + path: ~/.bun/install/cache key: ${{ runner.os }}-bun-web-${{ hashFiles('web/bun.lock') }} - run: bun install --frozen-lockfile - run: bun run build && bun run test:production @@ -85,18 +82,17 @@ jobs: working-directory: web steps: - uses: actions/checkout@v7 + with: + persist-credentials: false - uses: oven-sh/setup-bun@v2 with: bun-version: "1.4.5" - uses: actions/setup-node@v4 with: node-version: "22" - - run: echo "dir=$(bun pm cache)" >> "$GITHUB_OUTPUT" - id: bun-cache - shell: bash - uses: actions/cache@v4 with: - path: ${{ steps.bun-cache.outputs.dir }} + path: ~/.bun/install/cache key: ${{ runner.os }}-bun-web-${{ hashFiles('web/bun.lock') }} - run: bun install --frozen-lockfile - run: bun run build:vercel && bun run test:vercel diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d99b4f..14690c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,15 +36,14 @@ jobs: timeout-minutes: 10 steps: - uses: actions/checkout@v7 + with: + persist-credentials: false - uses: oven-sh/setup-bun@v2 with: bun-version: "1.4.5" - - run: echo "dir=$(bun pm cache)" >> "$GITHUB_OUTPUT" - id: bun-cache - shell: bash - uses: actions/cache@v4 with: - path: ${{ steps.bun-cache.outputs.dir }} + path: ~/.bun/install/cache # Separate key: lint pulls bun@canary into the cache, keep it out of the shared one key: ${{ runner.os }}-bun-checks-${{ hashFiles('bun.lock') }} - run: bun install --frozen-lockfile @@ -59,15 +58,14 @@ jobs: timeout-minutes: 10 steps: - uses: actions/checkout@v7 + with: + persist-credentials: false - uses: oven-sh/setup-bun@v2 with: bun-version: "1.4.5" - - run: echo "dir=$(bun pm cache)" >> "$GITHUB_OUTPUT" - id: bun-cache - shell: bash - uses: actions/cache@v4 with: - path: ${{ steps.bun-cache.outputs.dir }} + path: ~/.bun/install/cache key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }} - run: bun install --frozen-lockfile - run: bun test --parallel ./test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e32672d..3126d4b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,6 +16,8 @@ jobs: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v7 + with: + persist-credentials: false - uses: oven-sh/setup-bun@v2 with: bun-version: "1.4.5" @@ -27,23 +29,21 @@ jobs: echo "Tag $GITHUB_REF_NAME does not match package.json version $package_version" >&2 exit 1 } - - run: echo "dir=$(bun pm cache)" >> "$GITHUB_OUTPUT" - id: bun-cache - shell: bash - uses: actions/cache@v4 with: - path: ${{ steps.bun-cache.outputs.dir }} + path: ~/.bun/install/cache # Shares the checks cache key: this job also runs lint (bun@canary) key: ${{ runner.os }}-bun-checks-${{ hashFiles('bun.lock') }} - run: bun install --frozen-lockfile - - run: bun run check - - run: bun run lint -- --max-warnings 0 + - run: bun run check && bun run lint -- --max-warnings 0 - run: bun test --parallel ./test package: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v7 + with: + persist-credentials: false - uses: oven-sh/setup-bun@v2 with: bun-version: "1.4.5"