name: Tests

on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-16.04
    services:

      mariadb:
        image: mariadb:10.0
        env:
          MYSQL_DATABASE=opendominion
          MYSQL_USERNAME=opendominion
          MYSQL_PASSWORD=secret
        ports:
          - 3306
        options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

    steps:

    - uses: actions/checkout@v1

    - name: Stop running MySQL instance
      run: sudo service mysql stop

    - name: Setup application
      run: |
        cp .env.ci .env
        composer install --no-interaction --prefer-dist
        php artisan key:generate
        php artisan migrate
        php artisan game:data:sync
        php artisan version:update
        php artisan self-diagnosis
        php artisan db:seed

    - name: Run tests
      run: vendor/bin/phpunit

name: Tests

on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-16.04
    services:

      mariadb:
        image: mariadb:10.0
        env:
          MYSQL_DATABASE: opendominion
          MYSQL_USERNAME: opendominion
          MYSQL_PASSWORD: secret
        ports:
          - 3306
        options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

    steps:

    - uses: actions/checkout@v1

    - name: Stop running MySQL instance
      run: sudo service mysql stop

    - name: Setup application
      run: |
        cp .env.ci .env
        composer install --no-interaction --prefer-dist
        php artisan key:generate
        php artisan migrate
        php artisan game:data:sync
        php artisan version:update
        php artisan self-diagnosis
        php artisan db:seed

    - name: Run tests
      run: vendor/bin/phpunit

Fix mariadb service env syntax
Fix mariadb service env syntax
