From 417f16079b360a360a64bec8ab751ba77be96590 Mon Sep 17 00:00:00 2001 From: Shish Date: Thu, 21 Nov 2019 17:34:07 +0000 Subject: [PATCH] more environment setup --- .github/workflows/tests.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 37112e29..1956c4dc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -28,26 +28,34 @@ jobs: - name: Validate composer.json and composer.lock run: composer validate - - name: Install dependencies + - name: Install system dependencies + run: sudo apt-get install -y postgres-client + + - name: Install PHP dependencies run: composer install --prefer-dist --no-progress --no-suggest - - name: Install shimmie + - name: Pre-configure database run: | mkdir -p data/config if [[ "${{ matrix.database }}" == "pgsql" ]]; then + psql --version ; psql -c "SELECT set_config('log_statement', 'all', false);" -U postgres ; psql -c "CREATE DATABASE shimmie;" -U postgres ; echo ' data/config/auto_install.conf.php ; fi if [[ "${{ matrix.database }}" == "mysql" ]]; then + mysql --version ; mysql -e "SET GLOBAL general_log = 'ON';" -uroot ; mysql -e "CREATE DATABASE shimmie;" -uroot ; echo ' data/config/auto_install.conf.php ; fi if [[ "${{ matrix.database }}" == "sqlite" ]]; then + sqlite3 --version ; echo ' data/config/auto_install.conf.php ; fi - php index.php + + - name: Install shimmie + run: php index.php - name: Run test suite run: vendor/bin/phpunit --configuration tests/phpunit.xml --coverage-clover=data/coverage.clover