mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-05 10:44:53 +02:00
58 lines
1.4 KiB
YAML
58 lines
1.4 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
|
|
|
|
services:
|
|
mysql:
|
|
image: mysql:latest
|
|
env:
|
|
MYSQL_ALLOW_EMPTY_PASSWORD: yes
|
|
|
|
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
|