Skip to content

QA & Tests

QA & Tests #52

Workflow file for this run

name: QA & Tests
on:
push:
schedule:
- cron: '0 8 * * 1' # At 08:00 on Monday
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
parallel-lint:
name: ๐Ÿ”Ž Parallel lint
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ 'ubuntu-24.04' ]
php-versions: [ '8.4' ]
steps:
- name: โฌ‡๏ธ Checkout repo
uses: actions/checkout@v4
- name: ๐Ÿ˜ Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl
coverage: none
- name: ๐Ÿ“ฅ Install dependencies
uses: ramsey/composer-install@v3
with:
dependency-versions: 'locked'
- name: ๐Ÿ”Ž Parallel lint
run: php ./vendor/bin/parallel-lint --exclude ./.git --exclude ./vendor .
ecs:
name: โœ๏ธ๏ธ ECS
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ 'ubuntu-24.04' ]
php-versions: [ '8.4' ]
steps:
- name: โฌ‡๏ธ Checkout repo
uses: actions/checkout@v4
- name: ๐Ÿ˜ Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl
coverage: none
- name: ๐Ÿ“ฅ Install dependencies
uses: ramsey/composer-install@v3
with:
dependency-versions: 'locked'
- name: โœ๏ธ๏ธ ECS
run: php ./vendor/bin/ecs
phpstan:
name: ๐ŸŸฉ๏ธ๏ธ PHPStan
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ 'ubuntu-24.04' ]
php-versions: [ '8.4' ]
steps:
- name: โฌ‡๏ธ Checkout repo
uses: actions/checkout@v4
- name: ๐Ÿ˜ Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl
coverage: none
- name: ๐Ÿ“ฅ Install dependencies
uses: ramsey/composer-install@v3
with:
dependency-versions: 'locked'
- name: ๐ŸŸฉ๏ธ๏ธ PHPStan
run: php ./vendor/bin/phpstan --ansi --memory-limit=256M
rector:
name: ๐Ÿ› ๏ธ Rector
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ 'ubuntu-24.04' ]
php-versions: [ '8.4' ]
steps:
- name: โฌ‡๏ธ Checkout repo
uses: actions/checkout@v4
- name: ๐Ÿ˜ Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl
coverage: none
- name: ๐Ÿ“ฅ Install dependencies
uses: ramsey/composer-install@v3
with:
dependency-versions: 'locked'
- name: ๐Ÿ› ๏ธ Rector
run: php ./vendor/bin/rector process --dry-run --ansi
phpunit:
name: ๐Ÿงฎ PHPUnit
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ 'ubuntu-24.04' ]
php-versions: [ '8.4' ]
# Docs: https://docs.github.com/en/actions/using-containerized-services
services:
mysql:
image: mariadb:11.7.2
env:
MARIADB_DATABASE: extras-ci
MARIADB_USER: extras
MARIADB_PASSWORD: extras
MARIADB_ROOT_PASSWORD: extras
ports:
- 3306/tcp
options: --health-cmd="mariadb-admin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: โฌ‡๏ธ Checkout repo
uses: actions/checkout@v4
- name: ๐Ÿ˜ Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl, xml, ctype, iconv, pdo_sqlite, mysql
coverage: xdebug
# ini-values: post_max_size=256M, max_execution_time=180
- name: ๐Ÿ“ฅ Install dependencies
uses: ramsey/composer-install@v3
with:
dependency-versions: 'locked'
- name: ๐Ÿ’พ Prepare database + run migration
env:
DATABASE_URL: mysql://extras:[email protected]:${{ job.services.mysql.ports['3306'] }}/extras-ci
# run: php ./bin/console doctrine:migrations:migrate --no-interaction
run: echo "Database is ready"
- name: ๐Ÿงฎ PHPUnit
run: php ./vendor/bin/phpunit