Skip to content

CI

CI #149

Workflow file for this run

name: CI
# Controls when the workflow will run
on:
schedule:
# minute, hour, day of month, month, weekday
# run every night at 5:15
- cron: '15 5 * * *'
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: read
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.4']
stability: [ prefer-stable ]
include:
- php: '8.3'
stability: prefer-stable
- php: '8.4'
stability: prefer-stable
- php: '8.5'
stability: prefer-stable
name: PHP ${{ matrix.php }} - ${{ matrix.symfony-version }} - ${{ matrix.stability }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache dependencies
id: composer-cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 #v4
with:
path: vendor
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
# use PHP of specific version
- uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2
with:
php-version: ${{ matrix.php }}
coverage: none
- name: Install dependencies
run: |
composer install --prefer-dist --no-progress
- name: Execute tests
run: composer phpunit
cs-and-rector:
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository.
contents: write
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5
- uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2
with:
php-version: 8.4
coverage: none
- name: Cache dependencies
id: composer-cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 #v4
with:
path: vendor
key: dependencies-php-8.4-composer-${{ hashFiles('composer.json') }}
- run: |
composer install --prefer-dist --no-progress
composer cs-fix
composer rector-fix
- uses: stefanzweifel/git-auto-commit-action@28e16e81777b558cc906c8750092100bbb34c5e3 #v7
with:
commit_message: Apply CS/Rector changes
phpstan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5
- uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2
with:
php-version: 8.4
coverage: none
- name: Cache dependencies
id: composer-cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 #v4
with:
path: vendor
key: dependencies-php-8.4-composer-${{ hashFiles('composer.json') }}
- run: composer install --prefer-dist --no-progress
- run: composer phpstan