Skip to content

Commit 48c7977

Browse files
authored
Merge pull request #800 from getsentry/4.x
2 parents 9624a88 + a19357e commit 48c7977

38 files changed

+929
-1264
lines changed

.github/workflows/ci.yaml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,15 @@ on:
1010
permissions:
1111
contents: read
1212

13+
# Cancel in progress workflows on pull_requests.
14+
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
17+
cancel-in-progress: true
18+
1319
jobs:
1420
phpunit:
1521
runs-on: ubuntu-latest
16-
timeout-minutes: 15
1722
env:
1823
COMPOSER_NO_INTERACTION: 1
1924

@@ -29,7 +34,7 @@ jobs:
2934

3035
steps:
3136
- name: Checkout code
32-
uses: actions/checkout@v3
37+
uses: actions/checkout@v4
3338

3439
- name: Setup PHP
3540
uses: shivammathur/setup-php@v2
@@ -55,14 +60,13 @@ jobs:
5560
composer install --no-interaction --prefer-dist --no-progress
5661
5762
- name: Run phpunit
58-
run: composer test:ci
63+
run: vendor/bin/phpunit --coverage-clover=coverage.xml
5964

6065
- name: Upload code coverage
6166
uses: codecov/codecov-action@v3
6267

6368
phpunit-legacy:
6469
runs-on: ubuntu-latest
65-
timeout-minutes: 15
6670
env:
6771
COMPOSER_NO_INTERACTION: 1
6872

@@ -118,7 +122,7 @@ jobs:
118122

119123
steps:
120124
- name: Checkout code
121-
uses: actions/checkout@v3
125+
uses: actions/checkout@v4
122126

123127
- name: Setup PHP
124128
uses: shivammathur/setup-php@v2
@@ -130,8 +134,9 @@ jobs:
130134
- name: Install Composer dependencies
131135
run: |
132136
# friendsofphp/php-cs-fixer: No need for this package to run phpunit and it conflicts with older Laravel versions
137+
# livewire/livewire: Only supported on Laravel 7.0 and above
133138
# laravel/folio: Only supported on PHP 8.1 + Laravel 10.0 and above
134-
composer remove friendsofphp/php-cs-fixer laravel/folio --dev --no-interaction --no-update
139+
composer remove friendsofphp/php-cs-fixer livewire/livewire laravel/folio --dev --no-interaction --no-update
135140
136141
# Require the correct versions we want to run phpunit for
137142
composer require \
@@ -145,7 +150,7 @@ jobs:
145150
composer install --no-interaction --prefer-dist --no-progress
146151
147152
- name: Run phpunit
148-
run: composer test:ci
153+
run: vendor/bin/phpunit --coverage-clover=coverage.xml
149154

150155
- name: Upload code coverage
151156
uses: codecov/codecov-action@v3

.github/workflows/cs.yaml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
name: CS
1+
name: Code style and static analysis
22

33
on:
44
pull_request:
55
push:
66
branches:
77
- master
8-
- release/**
8+
- develop
99

1010
permissions:
1111
contents: read
@@ -16,16 +16,33 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020

2121
- name: Setup PHP
2222
uses: shivammathur/setup-php@v2
2323
with:
2424
php-version: '8.2'
25-
coverage: none
2625

2726
- name: Install dependencies
2827
run: composer update --no-progress --no-interaction --prefer-dist
2928

3029
- name: Run script
31-
run: composer phpcs:ci
30+
run: vendor/bin/php-cs-fixer fix --verbose --diff --dry-run
31+
32+
phpstan:
33+
name: PHPStan
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v4
38+
39+
- name: Setup PHP
40+
uses: shivammathur/setup-php@v2
41+
with:
42+
php-version: '8.2'
43+
44+
- name: Install dependencies
45+
run: composer update --no-progress --no-interaction --prefer-dist
46+
47+
- name: Run script
48+
run: vendor/bin/phpstan analyse

.github/workflows/publish-release.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
force:
1010
description: Force a release even when there are release-blockers (optional)
1111
required: false
12+
merge_target:
13+
description: Target branch to merge into. Uses the default branch as a fallback (optional)
14+
required: false
15+
default: master
1216

1317
permissions:
1418
contents: read
@@ -30,3 +34,4 @@ jobs:
3034
with:
3135
version: ${{ github.event.inputs.version }}
3236
force: ${{ github.event.inputs.force }}
37+
merge_target: ${{ github.event.inputs.merge_target }}

.github/workflows/static-analysis.yaml

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)