Trying @pashagolub's suggestion

This commit is contained in:
Zachary Klosko 2020-12-16 14:53:22 -05:00
parent ab2bb53ff2
commit 09dc9f53f3
2 changed files with 18 additions and 12 deletions

View File

@ -1,6 +0,0 @@
#/bin/bash
psql -c 'CREATE DATABASE libretime;' -U postgres
psql -c "CREATE USER libretime WITH PASSWORD 'libretime';" -U postgres
psql -c 'GRANT CONNECT ON DATABASE libretime TO libretime;' -U postgres
psql -c 'ALTER USER libretime CREATEDB;' -U postgres

View File

@ -17,13 +17,25 @@ jobs:
- uses: actions/setup-python@v2
with:
python-version: '3.6'
- name: Setup PostgreSQL
run: |
sudo systemctl start postgresql.service
pg_isready
sudo -u postgres psql -c 'CREATE DATABASE libretime;'
sudo -u postgres psql -c "CREATE USER libretime WITH PASSWORD 'libretime';"
sudo -u postgres psql -c 'GRANT CONNECT ON DATABASE libretime TO libretime;'
sudo -u postgres psql -c 'ALTER USER libretime CREATEDB;'
- run: ENVIRONMENT=testing && LIBRETIME_LOG_DIR=/tmp/log/libretime
- run: sudo bash ./.github/scripts/install-bionic.sh
- run: sudo bash ./.github/scripts/init-postgres.sh
- run: sudo composer install
- run: cd airtime_mvc/tests && sudo bash ../../vendor/bin/phpunit && cd ../..
- run: sudo bash ./.github/scripts/python-pkg-install.sh
- run: sudo bash ./.github/scripts/python-pkg-test.sh
- name: Install prerequisites
run: sudo bash ./.github/scripts/install-bionic.sh
- name: Run PHP tests
run: |
sudo composer install
cd airtime_mvc/tests && sudo bash ../../vendor/bin/phpunit && cd ../..
- name: Run Python tests
run: |
sudo bash ./.github/scripts/python-pkg-install.sh
sudo bash ./.github/scripts/python-pkg-test.sh
# test-xenial:
# runs-on: ubuntu-16.04
# steps: