From d79d775ff7748c44c456448c758b64f57a9d898b Mon Sep 17 00:00:00 2001 From: Bruce Weirdan Date: Fri, 4 Feb 2022 01:08:14 +0200 Subject: [PATCH] Added backward compatibility check --- .github/workflows/bcc.yml | 43 +++++++++++++++++++++++++++++++++++++++ composer.json | 1 + 2 files changed, 44 insertions(+) create mode 100644 .github/workflows/bcc.yml diff --git a/.github/workflows/bcc.yml b/.github/workflows/bcc.yml new file mode 100644 index 00000000000..36f4d4ddf28 --- /dev/null +++ b/.github/workflows/bcc.yml @@ -0,0 +1,43 @@ +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" + diff --git a/composer.json b/composer.json index f068724805a..88f7398a5e9 100644 --- a/composer.json +++ b/composer.json @@ -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",