🤖 TEST: Add tests #17
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Quality Assurance | |
on: | |
push: | |
pull_request: | |
jobs: | |
static-code-analysis: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.3' | |
extensions: pdo_sqlite | |
coverage: xdebug | |
- name: Copy .env.test | |
run: php -r "file_exists('.env.test.local') || copy('.env.test', '.env.test.local');" | |
- name: Install Dependencies | |
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
- name: Create Database | |
run: | | |
mkdir -p var/ | |
touch var/test.db | |
- name: PHP CS Fixer | |
run: vendor/bin/php-cs-fixer fix ./src --rules=@Symfony --verbose --dry-run | |
- name: PHPStan | |
run: vendor/bin/phpstan analyse ./src --level=8 | |
- name: Security Check | |
run: vendor/bin/security-checker security:check | |
- name: Lint Twig | |
run: php bin/console lint:twig ./templates | |
- name: Lint YAML | |
run: php bin/console lint:yaml ./config | |
- name: Lint Container | |
run: php bin/console lint:container | |
- name: Execute tests | |
env: | |
DATABASE_URL: "sqlite:///%kernel.project_dir%/var/test.db" | |
APP_ENV: test | |
run: | | |
php bin/console doctrine:schema:create --env=test | |
vendor/bin/phpunit --testdox |