Skip to content

fix: run orioledb tests in ci#895

Merged
ferhatelmas merged 1 commit intomasterfrom
ferhat/orioledb-tests
Mar 6, 2026
Merged

fix: run orioledb tests in ci#895
ferhatelmas merged 1 commit intomasterfrom
ferhat/orioledb-tests

Conversation

@ferhatelmas
Copy link
Member

@ferhatelmas ferhatelmas commented Mar 5, 2026

What kind of change does this PR introduce?

CI Feature

What is the current behavior?

Only migrations were run with orioledb.

What is the new behavior?

All tests also run with orioledb.

Additional context

Will use for vector bucket compatibility check.
Coverage is only sent for postgres run.

@ferhatelmas ferhatelmas requested a review from a team as a code owner March 5, 2026 13:27
@coderabbitai
Copy link

coderabbitai bot commented Mar 5, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 9e0bef96-0fd5-4a03-85a7-3e1d32ac1403

📥 Commits

Reviewing files that changed from the base of the PR and between 91bd99e and 1e4624f.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • package.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json

📝 Walkthrough

Summary by CodeRabbit

  • Chores

    • Restructured CI into separate, named jobs for lint/build, Postgres tests, and Oriole tests to improve reliability and speed.
    • Standardized Node.js to v24 across CI, separated lint and build steps, and added per-job timeouts.
    • Consolidated shared test environment configuration and streamlined install/cache steps.
  • Tests

    • Added Oriole test workflow, idempotency checks for migrations, and explicit coverage uploads to Coveralls.
    • Added a local npm script to run the Oriole test sequence.

Walkthrough

The PR splits the previous single test matrix into three GitHub Actions jobs: lint_build, test_postgres, and test_oriole. Node is fixed to "24" for all jobs. A shared test_env anchor is introduced and applied to the DB test jobs. lint_build runs install, lint, and build with a 10-minute timeout. test_postgres and test_oriole run installs, start their DB services, run migrations and tests, perform pg_dump before/after idempotency checks, and upload coverage to Coveralls. package.json gains a test:oriole script.

Sequence Diagram(s)

sequenceDiagram
  participant GH as GitHub Actions
  participant Runner as CI Runner
  participant NPM as npm (scripts)
  participant Postgres as Postgres
  participant Oriole as OrioleDB
  participant Coveralls as Coveralls

  GH->>Runner: Start lint_build job
  Runner->>Runner: setup Node "24"\nnpm ci
  Runner->>Runner: run lint
  Runner->>Runner: run build

  GH->>Runner: Start test_postgres job
  Runner->>Postgres: start Postgres service (test_env)
  Runner->>Runner: npm ci\nrun migrations
  Runner->>Postgres: pg_dump (before)
  Runner->>Runner: run tests (Jest)
  Runner->>Postgres: pg_dump (after)
  Runner->>Runner: compare dumps (idempotency)
  Runner->>Coveralls: upload coverage

  GH->>Runner: Start test_oriole job
  Runner->>NPM: npm run test:oriole
  NPM->>Oriole: infra:restart:oriole
  NPM->>Runner: provision dummy data
  Runner->>Runner: npm ci\nrun jest --runInBand (oriole tests)
  Runner->>Oriole: pg_dump (before)
  Runner->>Oriole: pg_dump (after)
  Runner->>Runner: compare dumps (idempotency)
  Runner->>Coveralls: upload coverage
Loading

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ferhatelmas ferhatelmas force-pushed the ferhat/orioledb-tests branch from b8db2b8 to ecf0b52 Compare March 5, 2026 13:59
"docs:export": "tsx ./src/scripts/export-docs.ts",
"test:dummy-data": "tsx -r dotenv/config ./src/test/db/import-dummy-data.ts",
"test": "npm run infra:restart && npm run test:dummy-data && jest --no-cache --runInBand",
"test:oriole": "npm run infra:restart:oriole && npm run test:dummy-data && jest --no-cache --runInBand --testPathIgnorePatterns=src/test/vectors.test.ts",
Copy link
Member Author

Choose a reason for hiding this comment

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

ignore vectors until implementation is ready

@ferhatelmas ferhatelmas changed the title Ferhat/orioledb tests fix: run orioledb tests in ci Mar 5, 2026
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/ci.yml (1)

23-33: ⚠️ Potential issue | 🟠 Major

Pin GitHub Actions to immutable commit SHAs.

Using floating refs (@v6, @v5) weakens CI supply-chain guarantees because tags can be retargeted. Pin all action usages to their full 40-character commit SHAs and include the version in a comment for readability.

This applies to:

  • actions/checkout@v6 (lines 23, 75, 120)
  • actions/cache@v5 (lines 24, 76, 121)
  • actions/setup-node@v6 (lines 31, 83, 128)

Example format:

- uses: actions/checkout@e2f20e631e6b0fcc4f4191560f8f4a78d1c65f25 # v6.0.0
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml around lines 23 - 33, Replace floating action tags
with immutable 40-char commit SHAs for each GitHub Action usage: update uses:
actions/checkout@v6, uses: actions/cache@v5, and uses: actions/setup-node@v6 to
their corresponding commit SHAs (and add the semantic version as an end-of-line
comment like "# v6.0.0") so the workflow pins to exact commits; ensure you
update all occurrences referenced in the review (checkout, cache, setup-node)
consistently across the file.
🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)

90-91: Avoid world-writable permissions for test artifacts unless strictly required.

chmod -R 777 data is broader than needed. Prefer least-privilege perms to reduce accidental cross-step write access.

Proposed permission tightening
-          mkdir -p data && chmod -R 777 data && \
+          mkdir -p data && chmod -R u+rwX,go-rwx data && \
           npm run test:coverage
-          mkdir -p data && chmod -R 777 data && \
+          mkdir -p data && chmod -R u+rwX,go-rwx data && \
           npm run test:oriole

Also applies to: 135-136

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml around lines 90 - 91, Replace broad world-writable
chmod with least-privilege permissions: change the pipeline step that currently
runs "mkdir -p data && chmod -R 777 data" to create the directory and set
tighter perms such as "mkdir -p data && chmod -R 0775 data" (or "0755" if only
the runner needs write) so only owner/group (not everyone) can write; update the
other occurrence referenced in the workflow (the similar chmod at lines 135-136)
the same way. Ensure the permission choice matches test needs (write for
owner/group vs owner-only).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In @.github/workflows/ci.yml:
- Around line 23-33: Replace floating action tags with immutable 40-char commit
SHAs for each GitHub Action usage: update uses: actions/checkout@v6, uses:
actions/cache@v5, and uses: actions/setup-node@v6 to their corresponding commit
SHAs (and add the semantic version as an end-of-line comment like "# v6.0.0") so
the workflow pins to exact commits; ensure you update all occurrences referenced
in the review (checkout, cache, setup-node) consistently across the file.

---

Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 90-91: Replace broad world-writable chmod with least-privilege
permissions: change the pipeline step that currently runs "mkdir -p data &&
chmod -R 777 data" to create the directory and set tighter perms such as "mkdir
-p data && chmod -R 0775 data" (or "0755" if only the runner needs write) so
only owner/group (not everyone) can write; update the other occurrence
referenced in the workflow (the similar chmod at lines 135-136) the same way.
Ensure the permission choice matches test needs (write for owner/group vs
owner-only).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 5ecaf1cf-3312-4518-89cd-b611d27c9460

📥 Commits

Reviewing files that changed from the base of the PR and between b8db2b8 and ecf0b52.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • package.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json

@ferhatelmas ferhatelmas force-pushed the ferhat/orioledb-tests branch from ecf0b52 to 91bd99e Compare March 5, 2026 14:06
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@package.json`:
- Line 19: The test:oriole npm script currently restarts Oriole and immediately
runs the seeding script which does a single DB connect attempt (see
"test:oriole" in package.json and src/test/db/import-dummy-data.ts where it
calls the DB connect), causing flakey CI when the DB is not ready; fix by gating
seeding on DB readiness either by adding a small wait-for/retry loop before
invoking import-dummy-data.ts or by adding connect-with-retries inside
import-dummy-data.ts (implement exponential backoff or fixed retries around the
existing connect call), ensuring the seeder only proceeds once a successful
connection is confirmed and exits non-zero after max retries so failures fail
the job.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 5fef5869-dd32-4bb3-899c-3dbac4c0a9b8

📥 Commits

Reviewing files that changed from the base of the PR and between ecf0b52 and 91bd99e.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • package.json

Signed-off-by: ferhat elmas <elmas.ferhat@gmail.com>
@ferhatelmas ferhatelmas force-pushed the ferhat/orioledb-tests branch from 91bd99e to 1e4624f Compare March 5, 2026 14:14
@ferhatelmas ferhatelmas merged commit 52ed538 into master Mar 6, 2026
8 of 10 checks passed
@ferhatelmas ferhatelmas deleted the ferhat/orioledb-tests branch March 6, 2026 09:37
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.

2 participants