Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix smoke tests parsing issue by adding smoke_tests.sql and husky pre… #60

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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
43 changes: 4 additions & 39 deletions .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,49 +50,14 @@ jobs:
echo "Smoketest container is not running"
exit 1
fi
if psql -c "select 1"
if psql -f ../smoke_tests.sql -v ON_ERROR_STOP=1
then
echo "Test Citus Extension"
psql -c "CREATE EXTENSION citus;"
psql -c "SELECT * FROM citus_version();"

echo "Test Citus Distributed Table"
psql -c "CREATE TABLE test_distributed_table (id serial primary key, data text);"
psql -c "SELECT create_distributed_table('test_distributed_table', 'id');"
psql -c "INSERT INTO test_distributed_table (data) VALUES ('test data');"
psql -c "SELECT * FROM test_distributed_table;"

echo "Test PostGIS Extension"
psql -c "CREATE EXTENSION postgis;" || true
psql -c "SELECT PostGIS_Version();"

echo "Test PostGIS Geometry Function"
psql -c "CREATE TABLE test_geometry_table (id serial primary key, geom geometry(Point, 4326));"
psql -c "INSERT INTO test_geometry_table (geom) VALUES (ST_GeomFromText('POINT(0 0)', 4326));"
psql -c "SELECT * FROM test_geometry_table;"

echo "Test zombodb Extension"
psql -c "CREATE EXTENSION zombodb;"
psql -c "SELECT zdb.internal_version();"

echo "Test pg_repack Extension"
psql -c "CREATE EXTENSION pg_repack;"
psql -c "select repack.version(), repack.version_sql();"

echo "Test pgautofailover Extension"
psql -c "CREATE EXTENSION pgautofailover CASCADE;"
psql -c "SELECT pgautofailover.formation_settings();"
break
fi
sleep 1
done
if ! psql -c "select 1"
if ! psql -f ../smoke_tests.sql -v ON_ERROR_STOP=1
then
echo "Cannot connect to PostgreSQL"
echo "Cannot connect to PostgreSQL or smoke tests failed"
exit 1
fi

- name: Show the logs
if: always()
run: |
docker logs smoketest-container
fi
12 changes: 12 additions & 0 deletions node_modules/.bin/husky

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions node_modules/.bin/husky.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions node_modules/.bin/husky.ps1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions node_modules/.package-lock.json
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this file ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions node_modules/husky/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions node_modules/husky/husky.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions node_modules/husky/lib/bin.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions node_modules/husky/lib/bin.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions node_modules/husky/lib/index.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

67 changes: 67 additions & 0 deletions node_modules/husky/lib/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 41 additions & 0 deletions node_modules/husky/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions package-lock.json
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this file ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"scripts": {
"pre-commit": "sqlint smoke_tests.sql"
},
"devDependencies": {
"husky": "^8.0.3"
}
}
Loading