From c96f392b6762b3707a1f2edf32a151177faaa851 Mon Sep 17 00:00:00 2001 From: Kari Barry Date: Mon, 18 Dec 2023 15:26:38 -0500 Subject: [PATCH] =?UTF-8?q?Add=20sqlite=20support=20=F0=9F=97=84=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/publish-files.yml | 7 +++++-- scripts/run_tiled.sh | 6 +++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-files.yml b/.github/workflows/publish-files.yml index f614b56..b509b36 100644 --- a/.github/workflows/publish-files.yml +++ b/.github/workflows/publish-files.yml @@ -36,19 +36,22 @@ jobs: TILED_TEST_POSTGRESQL_URI: postgresql+asyncpg://postgres:secret@localhost:5432 - name: SANITY CHECK - list contents of table nodes - run: docker exec postgres psql -U postgres -c "SELECT * FROM nodes limit 100;" + run: docker exec postgres psql -U postgres -c "SELECT * FROM nodes limit 10;" - name: Dump sql data into binary format when generator finishes id: save if: steps.tiled.conclusion == 'success' run: docker exec -i postgres /bin/bash -c "PGPASSWORD=secret pg_dump --username postgres postgres" > tiled_test_db_pg.sql - + - name: SANITY CHECK - list contents of sqlite file + run : sqlite3 tiled_test_db_sqlite.db "SELECT * FROM nodes LIMIT 10" + - name: Publish .sql files to github release with action if: steps.save.conclusion == 'success' uses: softprops/action-gh-release@v1 with: files: | tiled_test_db_pg.sql + tiled_test_db_sqlite.db tag_name: ${{ github.ref_name }} body: | ${{ github.ref_name }} : ${{ github.event.head_commit.message }} diff --git a/scripts/run_tiled.sh b/scripts/run_tiled.sh index f1173a2..5f441ce 100644 --- a/scripts/run_tiled.sh +++ b/scripts/run_tiled.sh @@ -3,4 +3,8 @@ set -e tiled catalog init $TILED_TEST_POSTGRESQL_URI pwd -python scripts/generate_data.py $TILED_TEST_POSTGRESQL_URI \ No newline at end of file +# Run postgres generation script +python scripts/generate_data.py $TILED_TEST_POSTGRESQL_URI +# Run SQLite generation script +tiled catalog init tiled_test_db_sqlite.db +python scripts/generate_data.py tiled_test_db_sqlite.db \ No newline at end of file