Skip to content

Bump actions/cache from 4.0.2 to 4.1.0 #204

Bump actions/cache from 4.0.2 to 4.1.0

Bump actions/cache from 4.0.2 to 4.1.0 #204

Workflow file for this run

name: Tests
on:
pull_request:
push:
branches:
- "master"
jobs:
PHPStan:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/[email protected]
- name: Install PHP
uses: shivammathur/[email protected]
with:
php-version: '7.4'
extensions: mbstring, intl
coverage: none
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
update: true
- 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/[email protected]
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader
- name: PHPStan tests
run: vendor/bin/phpstan analyze -l 8 -a vendor/yiisoft/yii2/Yii.php --no-progress src
Infection:
name: PHP ${{ matrix.php }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['7.4', '8.0']
steps:
- name: Checkout
uses: actions/[email protected]
- name: Install PHP
uses: shivammathur/[email protected]
with:
php-version: ${{ matrix.php }}
extensions: mbstring, intl, mysql
coverage: 'pcov'
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
update: true
- 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/[email protected]
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer update --no-interaction --no-progress --optimize-autoloader
- name: Run PHPUnit
if: matrix.php != '7.4'
run: vendor/bin/phpunit
- name: Run Infection with PHPUnit
if: matrix.php == '7.4'
run: |
mkdir -p build/logs
vendor/bin/phpunit --coverage-xml=build/logs/coverage-xml --log-junit=build/logs/junit.xml
vendor/bin/infection --threads=2 --coverage=build/logs --show-mutations --no-progress
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}