Skip to content

Update an internal used composer package #418

Update an internal used composer package

Update an internal used composer package #418

Workflow file for this run

name: CI
'on':
- push
env:
DEFAULT_PHP_VERSION: '8.2'
jobs:
phpSyntaxCheck:
name: 'Syntax Check (PHP ${{ matrix.php.version }})'
strategy:
matrix:
php:
-
version: '8.2'
experimental: false
-
version: '8.3'
experimental: false
-
version: '8.4'
experimental: true
runs-on: ubuntu-22.04
steps:
-
uses: actions/checkout@v4
-
name: 'Set up PHP ${{ matrix.php.version }}'
uses: shivammathur/setup-php@v2
with:
php-version: '${{ matrix.php.version }}'
-
name: 'Syntax Check'
continue-on-error: '${{ matrix.php.experimental }}'
env:
LANG: C
run: |
find . \( -type d \( -name '.git' -or -name 'vendor' -or -name 'node_modules' -or -name 'runtime' \) -prune \) -or \( -type f -name '*.php' -print \) \
| sort \
| xargs -n 1 php -l
makeComposerCache:
name: 'Make composer cache'
runs-on: ubuntu-22.04
steps:
-
uses: actions/checkout@v4
-
uses: actions/cache@v4
with:
path: |
~/.cache/composer/files
vendor
key: "${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}"
restore-keys: |
${{ runner.os }}-composer-
-
name: 'Use PHP ${{ env.DEFAULT_PHP_VERSION }}'
uses: shivammathur/setup-php@v2
with:
php-version: '${{ env.DEFAULT_PHP_VERSION }}'
-
name: 'Install Composer dependencies'
run: 'composer install --prefer-dist'
phpStyleCheck:
name: 'PHP Coding Style'
runs-on: ubuntu-22.04
needs:
- makeComposerCache
steps:
-
uses: actions/checkout@v4
-
uses: actions/cache@v4
with:
path: |
~/.cache/composer/files
vendor
key: "${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}"
-
name: 'Use PHP ${{ env.DEFAULT_PHP_VERSION }}'
uses: shivammathur/setup-php@v2
with:
php-version: '${{ env.DEFAULT_PHP_VERSION }}'
-
name: 'Install Composer dependencies'
run: 'composer install --prefer-dist'
-
name: 'Create config-files'
run: 'make -j config-files'
-
name: 'Run PHPCS'
run: ./vendor/bin/phpcs
-
name: 'Run PHPStan'
run: './vendor/bin/phpstan analyze --memory-limit=1G'
jsStyleCheck:
name: 'JS Coding Style'
runs-on: ubuntu-22.04
steps:
-
uses: actions/checkout@v4
-
name: 'Install NPM packages'
run: |
npm ci
-
name: 'Run semistandard'
run: |
npx semistandard --global=jQuery --global=bootstrap 'resources/**/*.es'
phpTest:
name: 'PHP test (PHP ${{ matrix.php.version }})'
strategy:
matrix:
php:
-
version: '8.2'
experimental: false
-
version: '8.3'
experimental: false
-
version: '8.4'
experimental: true
runs-on: ubuntu-22.04
needs:
- makeComposerCache
steps:
-
uses: actions/checkout@v4
-
uses: actions/cache@v4
with:
path: |
~/.cache/composer/files
vendor
key: "${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}"
-
name: 'Set up PHP ${{ matrix.php.version }}'
uses: shivammathur/setup-php@v2
with:
php-version: '${{ matrix.php.version }}'
-
name: 'Set up application'
run: |
ln -s `which composer` composer.phar
make config-files vendor
-
name: 'Set up (migrate) database'
run: 'tests/bin/yii migrate/fresh --compact=1 --interactive=0'
-
name: 'Run unit test'
run: 'vendor/bin/codecept run unit'
continue-on-error: '${{ matrix.php.experimental }}'