fix(sample): reorder edit_typevalue dml and add MULTI-CREATE child vi… #42
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create Giswater Schema SAMPLE (WS) | |
on: | |
push: | |
branches: [dev-3.6-manage-views] | |
pull_request: | |
branches: [dev-3.6-manage-views] | |
jobs: | |
setup-and-test-db: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.x" | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r test/requirements.txt | |
- name: Setup PostgreSQL and PostGIS for Linux/macOS/Windows | |
uses: nyurik/action-setup-postgis@v2.1 | |
with: | |
database: giswater_test_db | |
- name: Install pgrouting & postgis_raster | |
env: | |
PGPASSWORD: postgres | |
run: | | |
sudo apt-get install postgresql-14-pgrouting | |
psql -h localhost -U postgres -d giswater_test_db -c 'CREATE EXTENSION pgrouting;' | |
psql -h localhost -U postgres -d giswater_test_db -c 'CREATE EXTENSION postgis_raster;' | |
- name: Install pgTAP | |
env: | |
PGPASSWORD: postgres | |
run: | | |
sudo apt-get install -y postgresql-server-dev-all make gcc | |
git clone https://github.com/theory/pgtap.git | |
cd pgtap | |
make | |
sudo make install | |
psql -h localhost -U postgres -d giswater_test_db -c 'CREATE EXTENSION pgtap;' | |
- name: Replace variables in SQL files | |
run: python test/replace_vars.py ws | |
- name: Create Sample Schema | |
env: | |
PGPASSWORD: postgres | |
run: python test/execute_sql_files.py ws | |
- name: Run SQL Tests with pgTAP (PL/SQL) | |
env: | |
PGPASSWORD: postgres | |
run: | | |
python test/run_tests.py ws plsql | |
- name: Run SQL Tests with pgTAP (Upsert) | |
env: | |
PGPASSWORD: postgres | |
run: | | |
python test/run_tests.py ws upsert |