Skip to content

Commit

Permalink
Merge pull request #352 from Roave/feature/#349-single-ci-workflow-fo…
Browse files Browse the repository at this point in the history
…r-auto-upgrades

Run BC checks as part of the main `"Continuous Integration"` workflow
  • Loading branch information
Ocramius committed Dec 6, 2021
2 parents 5a91f6b + d9a6586 commit 8a0f6bf
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 62 deletions.
59 changes: 0 additions & 59 deletions .github/workflows/backwards-compatibility.yml

This file was deleted.

52 changes: 52 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,55 @@ jobs:
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
with:
job: ${{ matrix.job }}

check-backwards-compatibility:
name: "Check Backwards Compatibility"

runs-on: ${{ matrix.operating-system }}

strategy:
matrix:
dependencies:
- "locked"
php-version:
- "8.0"
- "8.1"
operating-system:
- "ubuntu-latest"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
with:
fetch-depth: 0

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1
tools: composer:v2

- name: "Cache dependencies"
uses: "actions/cache@v2"
with:
path: |
~/.composer/cache
vendor
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"

- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"

- name: "Install highest dependencies"
if: ${{ matrix.dependencies == 'highest' }}
run: "composer update --no-interaction --no-progress --no-suggest"

- name: "Install locked dependencies"
if: ${{ matrix.dependencies == 'locked' }}
run: "composer install --no-interaction --no-progress --no-suggest"

- name: "Roave Backward Compatibility Check"
run: "bin/roave-backward-compatibility-check"
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,9 @@ jobs:
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
coverage: "none"
php-version: "7.4" # https://github.com/Roave/BackwardCompatibilityCheck/issues/283
php-version: "8.0"
- name: "Install dependencies"
run: "composer install --no-interaction"
run: "composer install"
- name: "Check for BC breaks"
run: "vendor/bin/roave-backward-compatibility-check"
```
Expand Down

0 comments on commit 8a0f6bf

Please sign in to comment.