Skip to content

Commit

Permalink
Added backward compatibility check
Browse files Browse the repository at this point in the history
  • Loading branch information
weirdan committed Feb 3, 2022
1 parent c5722dd commit 0d5051a
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/bcc.yml
@@ -0,0 +1,45 @@
name: Check backward compatibility

on: pull_request
jobs:
bcc:
name: Check backward compatibility
runs-on: ubuntu-latest
steps:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
tools: composer:v2
coverage: none

- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Get Composer Cache Directories
id: composer-cache
run: |
echo "::set-output name=files_cache::$(composer config cache-files-dir)"
echo "::set-output name=vcs_cache::$(composer config cache-vcs-dir)"
- name: Cache composer cache
uses: actions/cache@v2
with:
path: |
${{ steps.composer-cache.outputs.files_cache }}
${{ steps.composer-cache.outputs.vcs_cache }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Run composer install
run: composer install -o
env:
COMPOSER_ROOT_VERSION: dev-master

- name: Run BCC
run: vendor/bin/roave-backward-compatibility-check --from="origin/$GITHUB_BASE_REF"
env:
COMPOSER_ROOT_VERSION: dev-master

1 change: 1 addition & 0 deletions composer.json
Expand Up @@ -50,6 +50,7 @@
"phpspec/prophecy": ">=1.10.2",
"phpunit/phpunit": "^9.0",
"psalm/plugin-phpunit": "^0.16",
"roave/backward-compatibility-check": "^6.1",
"slevomat/coding-standard": "^7.0",
"squizlabs/php_codesniffer": "^3.6",
"symfony/process": "^4.3 || ^5.0 || ^6.0",
Expand Down

0 comments on commit 0d5051a

Please sign in to comment.