Skip to content

Commit 458983c

Browse files
chatchclaude
andcommitted
ci: install pgtap extension and run full flows-db seed
pgtap was missing from the DB so test is() functions failed. Add it to ci-bootstrap.sql. Switch flows migrations to env=local so generate_register_intervals is created, allowing the full flows seed to run (needed by tests that check specific row counts). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent d2582c4 commit 458983c

2 files changed

Lines changed: 6 additions & 14 deletions

File tree

.github/workflows/build-test.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,24 +52,15 @@ jobs:
5252
--set flows_password=flows \
5353
--set grafanareader_password=grafanareader \
5454
--set tableau_password=tableau \
55-
--set env=ci \
55+
--set env=local \
5656
--verbose && cd -
5757
5858
- name: Flows seed
5959
run: |
60-
docker run --rm --network host postgres:17-alpine \
61-
psql "postgresql://tsdbadmin:tsdbadmin@localhost:25432/tsdb" -c "
62-
INSERT INTO flows.escos (id, created_at, name, code, app_url) VALUES
63-
('612a3f01-dfde-4458-bd0b-bfb9aa7d3668', now(), 'Abolish Empty Office Buildings', 'aeob', NULL),
64-
('2995cc75-1fa6-46ef-aae1-7807f5721765', now(), 'Bristol Energy Coop', 'bec', NULL),
65-
('3396e0c8-62e5-4902-a9e2-2d6505b2cb8c', now(), 'Bristol Power Cooperative', 'bpc', NULL),
66-
('68456b3f-35c6-44f1-9f14-563ab64e8ceb', now(), 'Lab', 'lab', NULL),
67-
('363ff821-3a56-4b43-8227-8e53c45fbcdb', now(), 'Hazelmead', 'hmce', 'http://0.0.0.0:4242'),
68-
('6688351f-c47a-441b-ad3f-b3dabadf2bca', now(), 'London Fields', 'lfce', NULL),
69-
('01da4a58-9a2e-440a-b8ac-2f36038484d2', now(), 'Owen Square', 'osce', NULL),
70-
('f6bcd195-6528-426b-a6f0-ce2af6a37494', now(), 'Trent Basin', 'tbce', NULL),
71-
('527eed5d-2f81-4abe-a7f4-6fff8ac72703', now(), 'Water Lilies', 'wlce', 'http://0.0.0.0:4242')
72-
ON CONFLICT DO NOTHING;"
60+
docker run --rm --network host \
61+
-v "$(pwd)/flows-db/sqitch/seed:/seed" postgres:17-alpine \
62+
psql "postgresql://tsdbadmin:tsdbadmin@localhost:25432/tsdb" \
63+
-f /seed/seed.sql
7364
7465
- name: Migrations
7566
run: |

sqitch/ci-bootstrap.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ GRANT supabase_auth_admin TO tsdbadmin;
2323
CREATE SCHEMA IF NOT EXISTS extensions;
2424
CREATE EXTENSION IF NOT EXISTS "uuid-ossp" WITH SCHEMA extensions;
2525
CREATE EXTENSION IF NOT EXISTS pgcrypto WITH SCHEMA extensions;
26+
CREATE EXTENSION IF NOT EXISTS pgtap WITH SCHEMA extensions;
2627

2728
-- Auth schema
2829
CREATE SCHEMA IF NOT EXISTS auth;

0 commit comments

Comments
 (0)