Skip to content

add option to setup roles + online demo #720

add option to setup roles + online demo

add option to setup roles + online demo #720

Workflow file for this run

name: 🧪 Test and build Docker image
on:
push:
branches:
- master
paths-ignore:
- 'website/**'
- '.github/workflows/website.yml'
pull_request:
branches:
- master
paths-ignore:
- 'website/**'
- '.github/workflows/website.yml'
workflow_dispatch:
jobs:
docker-tests:
name: Docker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "build dockerfile"
run: docker build -f .docker/Dockerfile --tag opengisch/signalo:unstable .
- name: "initialize container"
run: |
docker run -d -p 5432:5432 --name signalo opengisch/signalo:unstable
docker exec signalo init_db.sh wait
docker exec -e PGSERVICE=pg_signalo_demo signalo init_db.sh build -d
docker exec -e PGSERVICE=pg_signalo_demo signalo /src/scripts/all-signs.py
# - uses: actions/setup-node@v3
# with:
# node-version: '18'
- name: "test data model"
run: docker exec signalo pytest
- name: "test images"
run: docker exec signalo /src/test/official_sign_images.sh
- name: "test changelog"
run: docker exec signalo /src/test/test-changelog.sh
# - name: "schema lint"
# run: |
# npm i --no-fund -g schemalint
# cp .schemalintrc.js.template .schemalintrc.js
# schemalint
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: "push to dockerhub"
if: github.event_name != 'pull_request'
run: |
docker push opengisch/signalo:unstable
- name: Deploy Demo DB
if: github.event_name != 'pull_request'
run: |
docker exec signalo pg_dump --format custom --exclude-schema=public --blobs --compress 5 --file signalo-testing-db-dump-with-demo.backup signalo
pg_restore --host=${DEMO_HOST} --username=signalo_admin --port=21699 --dbname=signalo_testing --exit-on-error --clean --if-exists --no-owner /Users/rouzauddenis/dev/signalo/signalo-testing-db-dump-with-demo.backup
psql --host=${DEMO_HOST} --username=signalo_admin --port=21699 --dbname=signalo_testing -v EXIT_ON_ERROR=on -f /Users/rouzauddenis/dev/signalo/datamodel/roles.sql
- name: "failure logs"
if: failure()
run: |
docker logs signalo