Design v2 #3032
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: Static Tests (Lint, Stan) | |
on: | |
push: | |
branches: [ '4.0' , '4.1','next'] | |
paths: | |
- 'features/**' | |
- 'behat.yml.dist' | |
- 'src/**' | |
- '*.php' | |
- '*.neon' | |
- '*.xml' | |
- 'composer.json' | |
pull_request: | |
branches: [ '4.0', '4.1','next' ] | |
paths: | |
- 'features/**' | |
- 'behat.yml.dist' | |
- 'src/**' | |
- '*.php' | |
- '*.neon' | |
- '*.xml' | |
- 'composer.json' | |
release: | |
types: [ created ] | |
schedule: | |
- cron: "0 1 * * 1" | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
env: | |
APP_ENV: "test" | |
PIMCORE_TEST_DB_DSN: "mysql://root:[email protected]:3306/coreshop_test" | |
strategy: | |
matrix: | |
php: [ 8.1, 8.2 ] | |
pimcore: [ ~11.1.0, ~11.2.0 ] | |
jms: [ ^4.0, ^5.0 ] | |
dependencies: [ highest ] | |
services: | |
database: | |
image: "mysql:8" | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_DATABASE: coreshop_test | |
ports: | |
- 3306:3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
name: "${{ matrix.pimcore }}, PHP ${{ matrix.php }}, Deps ${{ matrix.dependencies }}, JMS ${{ matrix.jms }}" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
ini-values: display_errors=On, display_startup_errors=On, error_reporting=32767 | |
extensions: intl, gd, simpleXML, dom, exif, fileinfo, iconv, mbstring, mysqli, pdo_mysql, zip, zlib | |
- name: Validate composer.json and composer.lock | |
run: composer validate | |
- name: Get composer cache directory | |
id: composer-cache | |
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- name: Cache composer dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: jms/serializer-bundle | |
run: composer require "jms/serializer-bundle:${{ matrix.jms }}" --no-update --no-scripts | |
- name: pimcore/pimcore | |
run: composer req pimcore/pimcore:${{ matrix.pimcore }} --no-interaction --no-scripts --no-update | |
- if: matrix.dependencies == 'highest' | |
name: Install dependencies highest | |
run: composer update --no-progress --prefer-dist --optimize-autoloader | |
- if: matrix.dependencies == 'lowest' | |
name: Install dependencies lowest | |
run: composer update --no-progress --prefer-dist --optimize-autoloader --prefer-lowest | |
- name: Validate YAML | |
run: bin/console lint:yaml src | |
- name: Validate TWIG | |
run: bin/console lint:twig src | |
- name: Validate Container | |
run: bin/console lint:container | |
- name: Validate Doctrine Settings | |
run: bin/console doctrine:schema:validate --skip-sync | |
- name: STAN | |
run: | | |
cp -f config/packages/stan/config.yaml config/packages/dev/config.yaml | |
bin/console cache:clear --env=dev | |
vendor/bin/phpstan analyse -c phpstan.neon src -l 3 | |
- name: PSALM | |
run: | | |
vendor/bin/psalm |