Skip to content

Bump actions/cache from 3 to 4 #307

Bump actions/cache from 3 to 4

Bump actions/cache from 3 to 4 #307

Workflow file for this run

name: CI
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install dependencies
run: |
cd src/
composer install --prefer-dist
- name: Setup app
run: |
cd src/
./bin/console doctrine:database:create -e test
./bin/console doctrine:migrations:migrate -n -e test
- name: Run tests
run: |
cd src/
XDEBUG_MODE=coverage ./vendor/bin/phpunit --debug --coverage-clover coverage.xml
phpstan:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install dependencies
run: |
cd src/
composer install --prefer-dist
- name: Run PHPStan
run: |
cd src/
./vendor/bin/phpstan analyse
php-cs-fixer:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
- name: Install dependencies
run: |
cd src/
composer install --working-dir=tools/php-cs-fixer --prefer-dist
- name: Run php-cs-fixer
run: |
cd src/
./tools/php-cs-fixer/vendor/bin/php-cs-fixer fix -vvv --dry-run --stop-on-violation --using-cache=no