-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (49 loc) · 2.53 KB
/
upstream-check.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Upstream
on:
pull_request:
types: [ opened, synchronize, reopened, ready_for_review ]
jobs:
run:
name: ${{ matrix.repo }}@${{ matrix.branch }}
runs-on: ubuntu-latest
timeout-minutes: 10
if: github.event.pull_request.draft == false
concurrency:
group: upstream-check-${{github.event_name}}-${{ matrix.repo }}-${{ matrix.branch }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
include:
- repo: redaxo/redaxo
branch: main
php: '8.1'
- repo: redaxo/redaxo
branch: 6.x
php: '8.3'
- repo: yakamara/yform
branch: master
php: '8.1'
steps:
- name: Checkout ${{ matrix.repo }}@${{ matrix.branch }}
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
with:
repository: ${{ matrix.repo }}
ref: ${{ matrix.branch }}
- name: Setup PHP
uses: shivammathur/setup-php@c665c7a15b5295c2488ac8a87af9cb806cd72198 # v2
with:
php-version: ${{ matrix.php }}
coverage: none
- name: Set redaxo/php-cs-fixer-config to main branch
run: composer require redaxo/php-cs-fixer-config:dev-main friendsofphp/php-cs-fixer:\* --dev --no-scripts --no-interaction --no-update --ansi
- uses: ramsey/composer-install@v3
with:
dependency-versions: 'highest' # to trigger 'composer update' instead of 'composer install'
composer-options: ${{ hashFiles('composer.lock') != '' && 'redaxo/php-cs-fixer-config' || '' }} --with-all-dependencies
- name: Run php-cs-fixer with config from main branch
run: vendor/bin/php-cs-fixer fix -v --ansi --diff || exit 0
- name: Set redaxo/php-cs-fixer-config to current branch
run: composer require redaxo/php-cs-fixer-config:dev-${{ github.head_ref }} --dev --with-all-dependencies --no-scripts --no-interaction --no-progress --ansi
- name: Run php-cs-fixer
run: vendor/bin/php-cs-fixer check -v --ansi --diff || echo "::warning file=src/Config.php::New changes in ${{ matrix.repo }}@${{ matrix.branch }}."