From 13df416957baff371d03df3aa2f4a8e51b45998b Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 4 Feb 2021 20:59:30 +1100 Subject: [PATCH] Fixes for tests --- .github/workflows/phpunit.yml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index ff349337dd53..bbfb97525965 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -20,11 +20,11 @@ jobs: DB_DATABASE1: ninja DB_USERNAME1: root DB_PASSWORD1: ninja - DB_HOST1: 'localhost' + DB_HOST1: '127.0.0.1' DB_DATABASE: ninja DB_USERNAME: root DB_PASSWORD: ninja - DB_HOST: 'localhost' + DB_HOST: '127.0.0.1' BROADCAST_DRIVER: log CACHE_DRIVER: file QUEUE_CONNECTION: sync @@ -37,23 +37,21 @@ jobs: services: mariadb: - image: mysql:5.7 + image: mariadb:latest ports: - 3306 env: MYSQL_ALLOW_EMPTY_PASSWORD: yes - MYSQL_USER: root + MYSQL_USER: ninja MYSQL_PASSWORD: ninja MYSQL_DATABASE: ninja MYSQL_ROOT_PASSWORD: ninja options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3 steps: - - name: Start mysql service run: | sudo /etc/init.d/mysql start - - name: Verify MariaDB connection env: DB_PORT: ${{ job.services.mariadb.ports[3306] }} @@ -63,12 +61,11 @@ jobs: while ! mysqladmin ping -h"127.0.0.1" -P"$DB_PORT" --silent; do sleep 1 done - - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} - extensions: mysql, mysqlnd, sqlite3, bcmath, gmp, gd, curl, zip, openssl, mbstring, xml + extensions: mysql, sqlite3, bcmath, gmp, gd, curl, zip, openssl, mbstring, xml - uses: actions/checkout@v1 with: @@ -78,19 +75,17 @@ jobs: - name: Copy .env run: | cp .env.ci .env - - name: Install composer dependencies run: | composer config -g github-oauth.github.com ${{ secrets.GITHUB_TOKEN }} composer install - - name: Prepare Laravel Application run: | php artisan key:generate php artisan optimize php artisan cache:clear php artisan config:cache - + - name: Migrate Database run: | php artisan migrate:fresh --seed --force && php artisan db:seed --force