Skip to content

Added CI PHPUnit

Added CI PHPUnit #19

Workflow file for this run

name: PHP
on:
push:
pull_request:
permissions:
contents: read
jobs:
php-cs-fixer:
permissions:
contents: read # for actions/checkout to fetch code
name: PHP CS Fixer
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
- name: Config
run: cp .env.dist .env
- name: Validate composer config
run: composer validate --strict
- name: Composer Install
run: composer install --ansi --prefer-dist --no-interaction --no-progress
- name: Run PHPCSFixer
run: ./vendor/bin/php-cs-fixer fix --dry-run --diff
- name: Run ergebnis/composer-normalize
run: composer normalize --dry-run --no-check-lock
phpstan:
permissions:
contents: read # for actions/checkout to fetch code
name: PHP Static Analysis
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
- name: Config
run: cp .env.dist .env
- name: Composer Install
run: composer install --ansi --prefer-dist --no-interaction --no-progress
- name: Run phpstan
run: ./vendor/bin/phpstan analyse
phpunit:
permissions:
contents: read # for actions/checkout to fetch code
name: PHPUnit
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup MySQL
uses: mirromutth/[email protected]
with:
mysql database: 'qanightlyresults'
mysql root password: 'root'
- uses: actions/checkout@v3
- name: Config
run: cp .env.dist .env
- name: Composer Install
run: composer install --ansi --prefer-dist --no-interaction --no-progress
- name: Setup database
run: php bin/console doctrine:schema:update --dump-sql --force
- name: Run phpunit
run: ./vendor/bin/phpunit