diff --git a/.github/workflows/qwc-base-db.yml b/.github/workflows/qwc-base-db.yml index 1c3260e..a83ae01 100644 --- a/.github/workflows/qwc-base-db.yml +++ b/.github/workflows/qwc-base-db.yml @@ -4,7 +4,30 @@ on: [push] jobs: + test: + runs-on: ubuntu-latest + steps: + + - uses: actions/checkout@master + + - name: Checkout qwc-docker + uses: actions/checkout@master + with: + repository: qwc-services/qwc-docker + path: qwc-docker + + - name: Set up demo database and run migrations + run: | + cd qwc-docker + cp pg_service.conf ~/.pg_service.conf + sed -i 's|host=qwc-postgis|host=localhost|g' ~/.pg_service.conf + sed -i 's|port=5432|port=5439|g' ~/.pg_service.conf + sed -Ei "s|^(\s*POSTGRES_PASSWORD:).*$|\1 'waej7WuoOoth0wor'|" docker-compose-example.yml + docker-compose -f docker-compose-example.yml up -d qwc-postgis + docker run --net="host" -v ~/.pg_service.conf:/tmp/pg_service.conf migrate + build: + needs: test runs-on: ubuntu-latest if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') steps: