Skip to content

Commit

Permalink
Add migration test
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Oct 27, 2023
1 parent 6e01fe6 commit a19b836
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/qwc-base-db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a19b836

Please sign in to comment.