File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626 ports :
2727 - 5432:5432
2828 options : >-
29+ --name pgtools-postgres-ci
2930 --health-cmd "pg_isready -U postgres"
3031 --health-interval 10s
3132 --health-timeout 5s
5556 psql -c "CREATE EXTENSION IF NOT EXISTS pg_stat_statements;"
5657 psql -c "SELECT extname FROM pg_extension WHERE extname = 'pg_stat_statements';"
5758
59+ - name : Configure preload and restart PostgreSQL
60+ run : |
61+ psql -c "ALTER SYSTEM SET shared_preload_libraries = 'pg_stat_statements';"
62+ docker restart pgtools-postgres-ci
63+
64+ for i in {1..30}; do
65+ if pg_isready -h "$PGHOST" -p "$PGPORT" -U "$PGUSER"; then
66+ break
67+ fi
68+ sleep 2
69+ done
70+
71+ if ! pg_isready -h "$PGHOST" -p "$PGPORT" -U "$PGUSER"; then
72+ echo "PostgreSQL did not become ready after restart" >&2
73+ exit 1
74+ fi
75+
76+ psql -tA -c "SHOW shared_preload_libraries;" | grep -q "pg_stat_statements"
77+ psql -c "SELECT extname FROM pg_extension WHERE extname = 'pg_stat_statements';"
78+
5879 - name : ShellCheck all shell scripts
5980 run : |
6081 shellcheck \
You can’t perform that action at this time.
0 commit comments