-
-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (34 loc) · 1.26 KB
/
backwards-compatibility.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: "Backwards compatibility check"
on:
pull_request:
jobs:
bc-check:
name: "Backwards compatibility check"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
with:
fetch-depth: 0
- name: "Install PHP"
uses: "shivammathur/[email protected]"
with:
php-version: "8.1"
ini-values: memory_limit=-1
tools: composer:v2, cs2pr
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get composer cache directory
id: composer-cache
run: echo "composer_cache_dir=$(composer global config cache-files-dir)" >> $GITHUB_OUTPUT
- name: "Cache dependencies"
uses: "actions/[email protected]"
with:
path: ${{ steps.composer-cache.outputs.composer_cache_dir }}
key: "php-8.1-bc-break-check-${{ hashFiles('.github/workflows/backwards-compatibility.yml') }}"
restore-keys: "php-8.1-bc-break-check-"
- name: "Install dependencies"
run: composer global require roave/backward-compatibility-check
- name: "BC Check"
run: |
~/.composer/vendor/bin/roave-backward-compatibility-check --from=${{ github.event.pull_request.base.sha }} --format=github-actions