Skip to content

Commit

Permalink
feat: add Roave Backwards Compatibility Check
Browse files Browse the repository at this point in the history
Includes a composer script and a new Github Action workflow
  • Loading branch information
gaelreyrol committed Jan 12, 2024
1 parent 5058e1a commit a2102dd
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/roave-bc-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Roave Backwards Compatibility Check
on:
push:
pull_request:
jobs:
check:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v9
- name: Setup Cachix
uses: cachix/cachix-action@v13
with:
name: opentelemetry
extraPullNames: nix-shell, php-src-nix
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Setup Nix magic cache
uses: DeterminateSystems/magic-nix-cache-action@v2
- name: Instantiate Nix develop
uses: nicknovitski/nix-develop@v1
- name: Get composer cache directory
id: composercache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: List PHP installed extensions
run: php -m
- name: Update project dependencies
run: |
composer update --no-interaction --no-progress --ansi
- name: Check for BC breaks
run: composer bc-checks
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"phpstan": "@php vendor/bin/phpstan analyse",
"phpunit": "@php vendor/bin/phpunit",
"check-reqs": "@php vendor/bin/composer-require-checker check",
"check-bcs": "@php vendor/bin/roave-backward-compatibility-check --format=github-actions",
"lint": [
"@php-cs-fixer:lint",
"@phpstan"
Expand Down Expand Up @@ -80,6 +81,7 @@
"phpstan/phpstan-symfony": "^1.3",
"phpunit/phpunit": "^9.6",
"pyrech/composer-changelogs": "^2.1",
"roave/backward-compatibility-check": "^8.6",
"roave/security-advisories": "dev-master",
"symfony/framework-bundle": "^6.4 || ^7.0",
"symfony/http-kernel": "^6.4 || ^7.0",
Expand Down

0 comments on commit a2102dd

Please sign in to comment.