diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b689f6..12c2572 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -477,6 +477,9 @@ jobs: eas-version: latest packager: pnpm token: ${{ secrets.EXPO_TOKEN }} + # Its default caches go to the GitHub cache service; keep them on the runner. + eas-cache: false + expo-cache: false - name: Install dependencies if: steps.ota.outputs.publish == 'true' && steps.expo_token.outputs.ready == 'true' run: pnpm install --frozen-lockfile diff --git a/infra/updater/src/github-actions-budget.test.ts b/infra/updater/src/github-actions-budget.test.ts index 06715ee..8e48dbc 100644 --- a/infra/updater/src/github-actions-budget.test.ts +++ b/infra/updater/src/github-actions-budget.test.ts @@ -13,7 +13,18 @@ const workflows = readdirSync(directory) return { name, text, - jobs: (parse(text) as { jobs: Record }).jobs, + jobs: ( + parse(text) as { + jobs: Record< + string, + { + "runs-on"?: unknown; + uses?: string; + steps?: Array<{ uses?: string; with?: Record }>; + } + >; + } + ).jobs, }; }); @@ -34,4 +45,14 @@ describe("GitHub Actions budget", () => { expect(text).not.toContain("type=gha"); expect(text).not.toContain("setup-gradle"); }); + + it.each(workflows)("$name turns off the Expo action's GitHub caches", ({ jobs }) => { + for (const job of Object.values(jobs)) { + for (const step of job.steps ?? []) { + if (!step.uses?.startsWith("expo/expo-github-action")) continue; + expect(step.with?.["eas-cache"], step.uses).toBe(false); + expect(step.with?.["expo-cache"], step.uses).toBe(false); + } + } + }); });