Skip to content

♻️ Use GitHub concurrency instead of styfle/cancel-workflow-action #308

♻️ Use GitHub concurrency instead of styfle/cancel-workflow-action

♻️ Use GitHub concurrency instead of styfle/cancel-workflow-action #308

Workflow file for this run

name: test
on:
pull_request: ~
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
test:
runs-on: ubuntu-latest
name: test
strategy:
matrix:
install-args: ['']
php-version: ['8.2', '8.3', '8.4']
fail-fast: false
steps:
- name: checkout
uses: actions/checkout@v6
- name: php
uses: shivammathur/setup-php@2.36.0
with:
php-version: ${{ matrix.php-version }}
ini-values: zend.assertions=1
- name: composer-cache-dir
id: composercache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: composer-cache
uses: actions/cache@v5.0.2
with:
path: ${{ steps.composercache.outputs.dir }}
key: composer-${{ hashFiles('**/composer.json') }}-${{ matrix.install-args }}
restore-keys: |
composer-${{ hashFiles('**/composer.json') }}-${{ matrix.install-args }}
composer-${{ hashFiles('**/composer.json') }}-
composer-
- name: composer
run: |
composer update ${{ matrix.install-args }} --no-interaction --no-progress --prefer-dist
- name: phpunit
run: |
vendor/bin/simple-phpunit --no-coverage
- name: phpstan-cache
uses: actions/cache@v5.0.2
with:
key: phpstan-${{ matrix.php-version }}-${{ matrix.install-args }}-${{ github.ref }}-${{ github.sha }}
path: .phpstan-cache
restore-keys: |
phpstan-${{ matrix.php-version }}-${{ matrix.install-args }}-${{ github.ref }}-
phpstan-${{ matrix.php-version }}-${{ matrix.install-args }}-
phpstan-${{ matrix.php-version }}-
phpstan-
- name: phpstan
run: |
mkdir -p .phpstan-cache
vendor/bin/phpstan analyse --no-progress --no-interaction --memory-limit=1G