Part-DB.Part-DB-server/.github/workflows/tests.yml
2020-05-25 22:29:33 +02:00

63 lines
1.5 KiB
YAML

name: PHP Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
run:
name: PHP ${{ matrix.php-versions }} Test
runs-on: ubuntu-latest
env:
APP_ENV: test
SYMFONY_DEPRECATIONS_HELPER: disabled
services:
mysql:
image: mysql:latest
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: laravel_tags
strategy:
matrix:
php-versions: ['7.2', '7.3', '7.4']
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: pcov
extensions: mbstring, intl, gd, xsl, gmp, bcmath
- name: Install composer dependencies
run: composer install --prefer-dist --no-progress
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: '12'
- name: Install yarn dependencies
run: yarn install
- name: Build frontend
run: yarn build
- name: Create DB
run: php bin/console --env test doctrine:database:create --if-not-exists -n
- name: Do migrations
run: php bin/console --env tes doctrine:migrations:migrate -n
- name: Load fixtures
run: php bin/console --env test doctrine:fixtures:load -n
- name: Run PHPunit
run: ./bin/phpunit