Skip to content

Merge pull request #6 from CandoImage/revert-4-sync-with-latest-upstr… #6

Merge pull request #6 from CandoImage/revert-4-sync-with-latest-upstr…

Merge pull request #6 from CandoImage/revert-4-sync-with-latest-upstr… #6

Workflow file for this run

name: Static Tests (Lint, Stan)
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
lint:
runs-on: ubuntu-latest
env:
APP_ENV: "test"
PIMCORE_TEST_DB_DSN: "mysql://root:[email protected]:3306/data_defs_test"
strategy:
matrix:
php: [ 8.0, 8.1 ]
pimcore: [ ^10.5 ]
database: [ 'mysql:8.0' ]
dependencies: [ highest, lowest ]
exclude:
- php: 8.1
dependencies: lowest
services:
database:
image: "${{ matrix.database }}"
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: data_defs_test
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
name: "${{ matrix.pimcore }}, PHP ${{ matrix.php }}, DB ${{ matrix.database }}, Deps ${{ matrix.dependencies }}"
steps:
- uses: actions/checkout@v2
- 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 "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- if: matrix.dependencies == 'highest'
name: Install dependencies highest
run: |
composer req guzzlehttp/psr7 pimcore/pimcore:${{ matrix.pimcore }} --no-interaction --no-scripts --no-update
composer update --no-progress --prefer-dist --optimize-autoloader
- if: matrix.dependencies == 'lowest'
name: Install dependencies lowest
run: |
composer req guzzlehttp/psr7 pimcore/pimcore:${{ matrix.pimcore }} --no-interaction --no-scripts --no-update
composer update --no-progress --prefer-dist --optimize-autoloader --prefer-lowest
- name: Validate YAML
run: bin/console lint:yaml src --parse-tags
- 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