Skip to content

Require PHP 8.2+, upgrade to PHPUnit 11, and harden CI/CD #3

Require PHP 8.2+, upgrade to PHPUnit 11, and harden CI/CD

Require PHP 8.2+, upgrade to PHPUnit 11, and harden CI/CD #3

Workflow file for this run

---
name: CI
on:
push:
branches:
- master
pull_request:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
check-code-style:
name: Check code style
runs-on: ubuntu-latest
timeout-minutes: 15
if: ${{ github.actor != 'dependabot[bot]' }}
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: ${{ github.head_ref || github.ref_name }}
fetch-depth: 0
persist-credentials: false
- name: Setup PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
with:
php-version: '8.5'
coverage: none
- name: Install dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
with:
composer-options: "--prefer-dist"
- name: Run php-cs-fixer
run: ./vendor/bin/php-cs-fixer fix
- name: Generate app token
id: app-token
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
with:
client-id: ${{ secrets.RELEASE_APP_CLIENT_ID }}
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
- name: Apply php-cs-fixer changes
uses: ./.github/actions/commit-changes
with:
token: ${{ steps.app-token.outputs.token }}
message: Apply php-cs-fixer changes
branch: ${{ github.head_ref || github.ref_name }}