File tree 3 files changed +18
-2
lines changed
3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 4
4
push :
5
5
branches :
6
6
- develop
7
- - pcnc/auto- pg_upgrade-testing
7
+ - pcnc/pg_upgrade-test-extensions
8
8
workflow_dispatch :
9
9
10
10
permissions :
16
16
matrix :
17
17
base_pg_version :
18
18
- 15.1.1.60
19
+ - 15.1.1.70
19
20
runs-on : arm-runner
20
21
timeout-minutes : 30
21
22
defaults :
99
100
retries : 20
100
101
101
102
- name : Run migrations
102
- run : docker exec "$container" bash -c "/docker-entrypoint-initdb.d/migrate.sh > /tmp/migrate.log 2>&1"
103
+ run : |
104
+ docker cp ../../migrations/db/migrations "$container:/docker-entrypoint-initdb.d/"
105
+ docker exec "$container" bash -c "/docker-entrypoint-initdb.d/migrate.sh > /tmp/migrate.log 2>&1"
103
106
104
107
- name : Run initial tests
105
108
run : pg_prove "../../migrations/tests/test.sql"
@@ -108,6 +111,7 @@ jobs:
108
111
109
112
- name : Apply pre-upgrade fixtures
110
113
run : |
114
+ psql -f "./tests/97-enable-extensions.sql"
111
115
psql -f "./tests/98-data-fixtures.sql"
112
116
psql -f "./tests/99-fixtures.sql"
113
117
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ while ! docker exec -it pg_upgrade_test bash -c "pg_isready"; do
46
46
done
47
47
48
48
echo " Running migrations"
49
+ docker cp ../../migrations/db/migrations " pg_upgrade_test:/docker-entrypoint-initdb.d/"
49
50
docker exec -it pg_upgrade_test bash -c ' /docker-entrypoint-initdb.d/migrate.sh > /tmp/migrate.log 2>&1; exit $?'
50
51
if [ $? -ne 0 ]; then
51
52
echo " Running migrations failed. Exiting."
54
55
55
56
echo " Running tests"
56
57
pg_prove " ../../migrations/tests/test.sql"
58
+ psql -f " ./tests/97-enable-extensions.sql"
57
59
psql -f " ./tests/98-data-fixtures.sql"
58
60
psql -f " ./tests/99-fixtures.sql"
59
61
Original file line number Diff line number Diff line change
1
+ do $$
2
+ declare
3
+ ext record;
4
+ begin
5
+ for ext in (select * from pg_available_extensions where name not in (select extname from pg_extension) order by name)
6
+ loop
7
+ execute ' create extension if not exists ' || ext .name || ' cascade' ;
8
+ end loop;
9
+ end;
10
+ $$;
You can’t perform that action at this time.
0 commit comments