Skip to content

Commit 7c80bfb

Browse files
committed
update justfile
1 parent 044a125 commit 7c80bfb

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

justfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
DATABASE_TEST_VAR_NAME := "THEGRAPH_STORE_POSTGRES_DIESEL_URL"
2+
DATABASE_URL := "postgresql://graph-node:let-me-in@localhost:5432/graph-node"
3+
4+
15
help:
26
@just -l
37

@@ -13,8 +17,24 @@ test-deps-up *ARGS:
1317
test-deps-down:
1418
docker compose -f tests/docker-compose.yml down
1519

20+
# Requires local-deps, see local-deps-up
21+
test *ARGS:
22+
just _run_in_bash cargo test --workspace --exclude graph-tests -- --nocapture {{ ARGS }}
23+
24+
runner-test *ARGS:
25+
just _run_in_bash cargo test -p graph-tests --test runner_tests -- --nocapture {{ ARGS }}
26+
27+
# Requires test-deps to be running, see test-deps-up
28+
it-test *ARGS:
29+
just _run_in_bash cargo test --test integration_tests -- --nocapture {{ ARGS }}
30+
1631
local-rm-db:
1732
rm -r docker/data/postgres
1833

1934
new-migration NAME:
2035
diesel migration generate {{ NAME }} --migration-dir store/postgres/migrations/
36+
37+
_run_in_bash *CMD:
38+
#!/usr/bin/env bash
39+
export {{ DATABASE_TEST_VAR_NAME }}={{ DATABASE_URL }}
40+
{{ CMD }}

0 commit comments

Comments
 (0)