Skip to content

Update composer branch-alias #263

Update composer branch-alias

Update composer branch-alias #263

Workflow file for this run

name: 'CI'
on:
push:
branches:
- '1.x'
- '1.3'
pull_request:
branches:
- '1.x'
- '1.3'
jobs:
cs-fixer:
name: 'PHP CS Fixer'
runs-on: 'ubuntu-latest'
strategy:
matrix:
php-version:
- '8.2'
steps:
-
name: 'Check out'
uses: 'actions/checkout@v4'
-
name: 'Set up PHP'
uses: 'shivammathur/setup-php@v2'
with:
php-version: '${{ matrix.php-version }}'
coverage: 'none'
-
name: 'Get Composer cache directory'
id: 'composer-cache'
run: 'echo "cache_dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT'
-
name: 'Cache dependencies'
uses: 'actions/cache@v3'
with:
path: '${{ steps.composer-cache.outputs.cache_dir }}'
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
restore-keys: 'php-${{ matrix.php-version }}-composer-locked-'
-
name: 'Install dependencies'
run: 'composer install --no-progress'
-
name: 'Check the code style'
run: 'make cs'
phpstan:
name: 'PhpStan'
runs-on: 'ubuntu-latest'
strategy:
matrix:
php-version:
- '8.2'
steps:
-
name: 'Check out'
uses: 'actions/checkout@v4'
-
name: 'Set up PHP'
uses: 'shivammathur/setup-php@v2'
with:
php-version: '${{ matrix.php-version }}'
coverage: 'none'
-
name: 'Get Composer cache directory'
id: 'composer-cache'
run: 'echo "cache_dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT'
-
name: 'Cache dependencies'
uses: 'actions/cache@v3'
with:
path: '${{ steps.composer-cache.outputs.cache_dir }}'
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
restore-keys: 'php-${{ matrix.php-version }}-composer-locked-'
-
name: 'Install dependencies'
run: 'composer install --no-progress'
-
name: 'Run PhpStan'
run: 'vendor/bin/phpstan analyze --no-progress --error-format=github'
tests:
name: 'PHPUnit'
runs-on: 'ubuntu-latest'
strategy:
matrix:
php-version:
- '8.1'
- '8.2'
- '8.3'
steps:
-
name: 'Check out'
uses: 'actions/checkout@v4'
-
name: 'Set up PHP'
uses: 'shivammathur/setup-php@v2'
with:
php-version: '${{ matrix.php-version }}'
coverage: 'none'
-
name: 'Get Composer cache directory'
id: 'composer-cache'
run: 'echo "cache_dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT'
-
name: 'Cache dependencies'
uses: 'actions/cache@v3'
with:
path: '${{ steps.composer-cache.outputs.cache_dir }}'
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
restore-keys: 'php-${{ matrix.php-version }}-composer-locked-'
-
name: 'Install dependencies'
env:
COMPOSER_OPTIONS: '${{ matrix.composer-options }}'
run: |
composer update --no-progress $COMPOSER_OPTIONS
git config --global author.name Sebastiaan Stok
git config --global author.email s.stok@rollerscapes.net
git config --global user.name Sebastiaan Stok
git config --global user.email s.stok@rollerscapes.net
-
name: 'Run tests'
run: |
make phpunit
cp .github/config.php.dist config.php
git remote add upstream https://github.com/hupkit/hupkit.git
bin/hubkit.php self-diagnose || exit 0