Skip to content

Commit a36f34b

Browse files
authored
Some cleanup (#795)
1 parent d1b6d76 commit a36f34b

File tree

6 files changed

+55
-61
lines changed

6 files changed

+55
-61
lines changed

.github/workflows/ci.yaml

+10-6
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
@@ -145,7 +149,7 @@ jobs:
145149
composer install --no-interaction --prefer-dist --no-progress
146150
147151
- name: Run phpunit
148-
run: composer test:ci
152+
run: vendor/bin/phpunit --coverage-clover=coverage.xml
149153

150154
- name: Upload code coverage
151155
uses: codecov/codecov-action@v3

.github/workflows/cs.yaml

+22-5
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

+5
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

-31
This file was deleted.

codecov.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@ comment: false
22

33
coverage:
44
status:
5-
project:
6-
default:
7-
threshold: 0.1% # allow for 0.1% reduction of coverage without failing
5+
project: off
6+
patch: off

composer.json

+16-16
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
"error-monitoring",
1111
"error-handler",
1212
"crash-reporting",
13-
"crash-reports"
13+
"crash-reports",
14+
"profiling",
15+
"tracing"
1416
],
1517
"homepage": "https://sentry.io",
1618
"license": "MIT",
@@ -47,21 +49,17 @@
4749
}
4850
},
4951
"scripts": {
50-
"test": "vendor/bin/phpunit",
51-
"tests": "@test",
52-
"test:ci": "vendor/bin/phpunit --coverage-clover=coverage.xml",
53-
"phpcs": "vendor/bin/php-cs-fixer fix",
54-
"phpcs:ci": "vendor/bin/php-cs-fixer fix --dry-run --diff",
55-
"phpstan": "vendor/bin/phpstan analyse",
56-
"phpstan:ci": "vendor/bin/phpstan analyse --error-format github"
52+
"check": [
53+
"@cs-check",
54+
"@phpstan",
55+
"@tests"
56+
],
57+
"tests": "vendor/bin/phpunit --verbose",
58+
"cs-check": "vendor/bin/php-cs-fixer fix --verbose --diff --dry-run",
59+
"cs-fix": "vendor/bin/php-cs-fixer fix --verbose --diff",
60+
"phpstan": "vendor/bin/phpstan analyse"
5761
},
5862
"extra": {
59-
"branch-alias": {
60-
"dev-master": "3.x-dev",
61-
"dev-2.x": "2.x-dev",
62-
"dev-1.x": "1.x-dev",
63-
"dev-0.x": "0.x-dev"
64-
},
6563
"laravel": {
6664
"providers": [
6765
"Sentry\\Laravel\\ServiceProvider",
@@ -72,6 +70,8 @@
7270
}
7371
}
7472
},
75-
"prefer-stable": true,
76-
"minimum-stability": "dev"
73+
"config": {
74+
"sort-packages": true
75+
},
76+
"prefer-stable": true
7777
}

0 commit comments

Comments
 (0)