Expose bash scripts for local testing

Open
#1,565 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
bash, postgresql

Research direction

Start by reading the test setup under nix/tests and how pg_regress is invoked through nix flake check. Define the bash entry points exposed by nix develop, including the migrations kind, and verify that running the script executes the relevant tests without the full flake check.

Written by the indexing model from the issue text.

Description

Problem

nix flake check runs all the tests we have, this can take a long time and the generated output files are big as well. This is inefficient, considering sometimes just one migration can be modified.

For these cases just running pg_regress over nix/tests would be enough. This should be much faster.

CI will still of course ensure nix flake check is run, but locally we can benefit from more speed.

Solution

Expose some tests as regular bash scripts, so developers can do:

$ nix develop

Then run:

$ <someprefix>-run-tests --kind migrations
Dominant language
Nix
Stars
1.8k
Forks
266
Avg merge
2d 8h
Merged PRs (30d)
25

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from supabase/postgres

All issues in supabase/postgres

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.