From 719b04f3894da8cccd4d4bd5e7f9705f596272cf Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Sun, 23 Aug 2026 02:36:15 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=8D=83=20ci:=20Cache=20MongoDB=20Memory-S?= =?UTF-8?q?erver=20Binaries=20in=20Backend=20Test=20Jobs=20(#15131)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/backend-review.yml | 52 ++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/.github/workflows/backend-review.yml b/.github/workflows/backend-review.yml index b67de66f7b..84a1590faf 100644 --- a/.github/workflows/backend-review.yml +++ b/.github/workflows/backend-review.yml @@ -262,6 +262,19 @@ jobs: - name: Prepare .env.test file run: cp api/test/.env.test.example api/test/.env.test + # mongodb-memory-server cold-downloads a ~122MB MongoDB binary into + # ~/.cache/mongodb-binaries on first use — inside a 15s beforeAll hook, which is a + # timeout on a slow mirror day. Every MISSED verdict the codegraph shadow evaluator has + # ever recorded (9 across 6 PRs) plus several chronically flaky suites trace to exactly + # this download. restore-keys keeps the previous binary warm across lockfile churn; a + # genuinely new binary version downloads once and re-saves. + - name: Cache MongoDB memory-server binaries + uses: actions/cache@v5 + with: + path: ~/.cache/mongodb-binaries + key: mongodb-binaries-${{ runner.os }}-${{ hashFiles('package-lock.json') }} + restore-keys: | + mongodb-binaries-${{ runner.os }}- - name: Run unit tests (shard ${{ matrix.shard }}/3) run: cd api && npm run test:ci -- --shard=${{ matrix.shard }}/3 @@ -300,6 +313,19 @@ jobs: name: build-data-provider path: packages/data-provider/dist + # mongodb-memory-server cold-downloads a ~122MB MongoDB binary into + # ~/.cache/mongodb-binaries on first use — inside a 15s beforeAll hook, which is a + # timeout on a slow mirror day. Every MISSED verdict the codegraph shadow evaluator has + # ever recorded (9 across 6 PRs) plus several chronically flaky suites trace to exactly + # this download. restore-keys keeps the previous binary warm across lockfile churn; a + # genuinely new binary version downloads once and re-saves. + - name: Cache MongoDB memory-server binaries + uses: actions/cache@v5 + with: + path: ~/.cache/mongodb-binaries + key: mongodb-binaries-${{ runner.os }}-${{ hashFiles('package-lock.json') }} + restore-keys: | + mongodb-binaries-${{ runner.os }}- - name: Run unit tests run: cd packages/data-provider && npm run test:ci @@ -344,6 +370,19 @@ jobs: name: build-data-schemas path: packages/data-schemas/dist + # mongodb-memory-server cold-downloads a ~122MB MongoDB binary into + # ~/.cache/mongodb-binaries on first use — inside a 15s beforeAll hook, which is a + # timeout on a slow mirror day. Every MISSED verdict the codegraph shadow evaluator has + # ever recorded (9 across 6 PRs) plus several chronically flaky suites trace to exactly + # this download. restore-keys keeps the previous binary warm across lockfile churn; a + # genuinely new binary version downloads once and re-saves. + - name: Cache MongoDB memory-server binaries + uses: actions/cache@v5 + with: + path: ~/.cache/mongodb-binaries + key: mongodb-binaries-${{ runner.os }}-${{ hashFiles('package-lock.json') }} + restore-keys: | + mongodb-binaries-${{ runner.os }}- - name: Run unit tests run: cd packages/data-schemas && npm run test:ci @@ -402,5 +441,18 @@ jobs: name: build-api path: packages/api/dist + # mongodb-memory-server cold-downloads a ~122MB MongoDB binary into + # ~/.cache/mongodb-binaries on first use — inside a 15s beforeAll hook, which is a + # timeout on a slow mirror day. Every MISSED verdict the codegraph shadow evaluator has + # ever recorded (9 across 6 PRs) plus several chronically flaky suites trace to exactly + # this download. restore-keys keeps the previous binary warm across lockfile churn; a + # genuinely new binary version downloads once and re-saves. + - name: Cache MongoDB memory-server binaries + uses: actions/cache@v5 + with: + path: ~/.cache/mongodb-binaries + key: mongodb-binaries-${{ runner.os }}-${{ hashFiles('package-lock.json') }} + restore-keys: | + mongodb-binaries-${{ runner.os }}- - name: Run unit tests (shard ${{ matrix.shard }}/4) run: cd packages/api && npm run test:ci -- --shard=${{ matrix.shard }}/4