CI #423
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: CI | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
check-codestyle: | |
name: Check code-style | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.2 | |
extensions: bcmath, dom, fileinfo, filter, gd, hash, intl, json, mbstring, mysqli, pcre, pdo_mysql, zip, zlib | |
coverage: none | |
env: | |
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install PHP dependencies | |
run: composer install --no-interaction --no-progress | |
- name: Check PHP codestyle | |
run: | | |
vendor-bin/php-cs-fixer/vendor/bin/php-cs-fixer fix --dry-run -vvv --ansi | |
- name: Run static analysis | |
run: vendor-bin/phpstan/vendor/bin/phpstan analyze src/ --level max --memory-limit=-1 --ansi | |
unit-tests: | |
name: PHP ${{ matrix.php }} / Contao ${{ matrix.contao }}.* | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php: [ 8.2, 8.3 ] | |
contao: [ 5.3, 5.4 ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: bcmath, dom, fileinfo, filter, gd, hash, intl, json, mbstring, mysqli, pcre, pdo_mysql, zip, zlib | |
coverage: none | |
env: | |
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install the dependencies | |
run: | | |
composer require contao/core-bundle:${{ matrix.contao }}.* | |
composer install --no-interaction --no-progress | |
- name: Run unit tests | |
run: vendor-bin/phpunit/vendor/bin/phpunit --colors=always | |
nightly: | |
name: PHP 8.4 | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
strategy: | |
fail-fast: false | |
matrix: | |
contao: [ 5.3.*, 5.4.* ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.4 | |
extensions: bcmath, dom, fileinfo, filter, gd, hash, intl, json, mbstring, mysqli, pcre, pdo_mysql, zip, zlib | |
coverage: none | |
env: | |
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install the dependencies | |
run: | | |
composer require contao/core-bundle:${{ matrix.contao }} | |
composer install --no-interaction --no-progress | |
- name: Run unit tests | |
run: vendor-bin/phpunit/vendor/bin/phpunit --colors=always | |
check-composer-requirements: | |
name: Check Composer requirements | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.2 | |
extensions: bcmath, dom, fileinfo, filter, gd, hash, intl, json, mbstring, mysqli, pcre, pdo_mysql, zip, zlib | |
coverage: none | |
env: | |
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install the dependencies | |
run: composer install --no-interaction --no-progress | |
- name: Check the dependencies | |
run: vendor-bin/require-checker/vendor/bin/composer-require-checker check --config-file=vendor-bin/require-checker/config.json composer.json --ansi | |
security-check: | |
name: PHP Security Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.2 | |
extensions: bcmath, dom, fileinfo, filter, gd, hash, intl, json, mbstring, mysqli, pcre, pdo_mysql, zip, zlib | |
coverage: none | |
env: | |
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install PHP dependencies | |
run: composer install --no-interaction --no-progress | |
- name: Setup cache | |
uses: actions/cache@v2 | |
id: cache-db | |
with: | |
path: ~/.symfony/cache | |
key: db | |
- name: Run security check | |
uses: symfonycorp/security-checker-action@v3 |