Skip to content

ci(firestore-bigquery-change-tracker): run offline test suites in CI - #3171

Open
CorieW wants to merge 3 commits into
nextfrom
invertase/ci-change-tracker-offline-tests
Open

CorieW wants to merge 3 commits into
nextfrom
invertase/ci-change-tracker-offline-tests

Conversation

@CorieW

@CorieW CorieW commented Sep 10, 2026

Copy link
Copy Markdown
Member

The change tracker's jest suites ran in no CI workflow, so the shared package both the legacy extension and the kit depend on had no regression protection, including the offline tests #2937 added for the insert retry guard. Root jest.config.js only picks up */functions/jest.config.js and gen-schema-view, and nothing invoked the package's test:local.

Most of the tracker's suites create real BigQuery datasets/tables/views or write to a real Firestore, so they can't run on a PR. This adds a CI job that runs the suites that pass without credentials.

Changes

  • Add jest.offline.config.js, which reuses jest.config.js and ignores the 11 suites that need a live GCP project.
  • Add a test:offline npm script to the tracker package.
  • Add a change_tracker job to .github/workflows/test.yml that runs npm ci && npm run test:offline in the package directory.

Verification: npm run test:offline passes, 8 suites / 137 tests in ~43s. The excluded list was determined by running every suite with no credentials, not from the file names, so clustering and checkUpdates are excluded despite the pattern suggested in the issue.

  • The exclusion list is a denylist, so a new offline suite is picked up automatically; a new live-project suite must be added to the list.
  • Pre-existing Unknown option "types" jest validation warning from jest.config.js is left alone, out of scope.

Fixes #3053

The tracker's jest suites ran in no workflow: the root jest.config.js only
picks up */functions/jest.config.js and gen-schema-view, and nothing invoked
the package's test:local. That left the shared package both the legacy
extension and the kit depend on without regression protection, including the
offline tests added by #2937 for the insert retry guard.

Fixes #3053
@CorieW
CorieW requested a review from a team as a code owner September 10, 2026 08:39

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces an offline Jest configuration (jest.offline.config.js) and a corresponding test:offline script in package.json to run tests that do not require active GCP credentials. The feedback suggests a minor improvement to inherit and extend testPathIgnorePatterns from the base configuration rather than overriding it with a hardcoded array, ensuring better maintainability if the base configuration changes in the future.

…ore patterns

Use the standard escape idiom so CodeQL js/incomplete-sanitization is satisfied. Generated patterns are unchanged.
@cabljac cabljac mentioned this pull request Sep 11, 2026
77 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci(firestore-bigquery-change-tracker): tracker test suites run in no CI workflow

3 participants