Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: CI
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
pg: [17, 16, 15, 14, 13, 12, 11, 10]
name: 🐘 PostgreSQL ${{ matrix.pg }}
runs-on: ubuntu-latest
container: pgxn/pgxn-tools
steps:
- name: Start PostgreSQL ${{ matrix.pg }}
run: pg-start ${{ matrix.pg }}
- name: Check out the repo
uses: actions/checkout@v4
Comment thread
jnasbyupgrade marked this conversation as resolved.
- name: Test on PostgreSQL ${{ matrix.pg }}
run: make test PGUSER=postgres
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ test/install/schedule
# Misc
tmp/
.DS_Store
.claude/settings.local.json

# pg_tle generated files
/pg_tle/
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

36 changes: 0 additions & 36 deletions pg-travis-test.sh

This file was deleted.

Binary file removed sql/.object_reference.sql.swo
Binary file not shown.
8 changes: 4 additions & 4 deletions test/dump/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if [ "$1" == "-f" ]; then
fi

echo Creating dump database
createdb test_dump && psql -f test/dump/load_all.sql test_dump > $create_log || die 3 "Unable to create dump database"
createdb test_dump && psql -Xf test/dump/load_all.sql test_dump > $create_log || die 3 "Unable to create dump database"

# Ensure no errors in log
check_log() {
Expand All @@ -45,16 +45,16 @@ check_log $create_log creation

echo Running dump and restore
# No real need to cat the log on failure here; psql will generate an error and even if not verify will almost certainly catch it
createdb test_load && PAGER='' psql -c '\df pg_get_object_address' test_load || die 5 'crap'
(echo 'BEGIN;' && pg_dump test_dump && echo 'COMMIT;') | psql -q -v VERBOSITY=verbose -v ON_ERROR_STOP=true test_load > $restore_log
createdb test_load && PAGER='' psql -Xc '\df pg_get_object_address' test_load || die 5 'crap'
(echo 'BEGIN;' && pg_dump test_dump && echo 'COMMIT;') | psql -q -X -v VERBOSITY=verbose -v ON_ERROR_STOP=true test_load > $restore_log
rc=$?
if [ $rc -ne 0 ]; then
cat $restore_log
die 4 "Unable to load database"
fi

echo Verifying restore
psql -f test/dump/verify.sql test_load > $verify_log || die 5 "Test failed"
psql -Xf test/dump/verify.sql test_load > $verify_log || die 5 "Test failed"

check_log $create_log verify

Expand Down
Loading