Skip to content

Commit 0d4967f

Browse files
no message
1 parent 47ccc05 commit 0d4967f

File tree

4 files changed

+107
-72
lines changed

4 files changed

+107
-72
lines changed

.github/workflows/auto-request-review.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,27 @@ on:
88
- reopened
99

1010
jobs:
11-
auto-request-review:
12-
name: Auto Request Review
11+
should-run:
1312
runs-on: ubuntu-latest
13+
outputs:
14+
run: ${{ steps.check.outputs.run }}
1415
steps:
1516
- name: Skip for repository owner
16-
id: check_owner
17-
if: github.event.pull_request.user.id == 4849482 # martin-georgiev
17+
id: check
1818
run: |
19-
echo "skip=true" >> $GITHUB_OUTPUT
20-
echo "Skipping auto-review request for repository owner"
19+
if [ "${{ github.event.pull_request.user.id == '4849482' }}" == "true" ]; then
20+
echo "run=false" >> $GITHUB_OUTPUT
21+
echo "Skipping auto-review request - repository owner PR"
22+
else
23+
echo "run=true" >> $GITHUB_OUTPUT
24+
fi
2125
26+
auto-request-review:
27+
needs: should-run
28+
if: needs.should-run.outputs.run == 'true'
29+
runs-on: ubuntu-latest
30+
name: Auto Request Review
31+
steps:
2232
- name: Request reviews based on configuration
2333
if: ${{ !steps.check_owner.outputs.skip }}
2434
uses: necojackarc/auto-request-review@e89da1a8cd7c8c16d9de9c6e763290b6b0e3d424 # v0.13.0

.github/workflows/ci.yml

Lines changed: 75 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,26 @@ permissions:
1616
contents: read
1717

1818
jobs:
19-
tests:
20-
name: "PHP ${{ matrix.php }} + Doctrine ORM ${{ matrix.doctrine-orm }} + Doctrine Lexer ${{ matrix.doctrine-lexer }}"
19+
should-run:
2120
runs-on: ubuntu-latest
21+
outputs:
22+
run: ${{ steps.check.outputs.run }}
23+
steps:
24+
- name: Skip for release-please
25+
id: check
26+
run: |
27+
if [ "${{ github.event.pull_request.user.id == '41898282' }}" == "true" ]; then
28+
echo "run=false" >> $GITHUB_OUTPUT
29+
echo "Skipping CI checks - release-please PR"
30+
else
31+
echo "run=true" >> $GITHUB_OUTPUT
32+
fi
2233
34+
tests:
35+
needs: should-run
36+
if: needs.should-run.outputs.run == 'true'
37+
runs-on: ubuntu-latest
38+
name: "PHP ${{ matrix.php }} + Doctrine ORM ${{ matrix.doctrine-orm }} + Doctrine Lexer ${{ matrix.doctrine-lexer }}"
2339
strategy:
2440
fail-fast: false
2541
matrix:
@@ -41,70 +57,70 @@ jobs:
4157
doctrine-lexer: '2.1'
4258

4359
steps:
44-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
60+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
4561

46-
- name: Set up PHP with PECL extension
47-
uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2
48-
with:
49-
php-version: ${{ matrix.php }}
50-
coverage: xdebug
51-
extensions: ctype, json, mbstring
52-
tools: composer
62+
- name: Set up PHP with PECL extension
63+
uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2
64+
with:
65+
php-version: ${{ matrix.php }}
66+
coverage: xdebug
67+
extensions: ctype, json, mbstring
68+
tools: composer
5369

54-
- name: Validate composer.json and composer.lock
55-
run: composer validate --strict
70+
- name: Validate composer.json and composer.lock
71+
run: composer validate --strict
5672

57-
- name: Cache Composer packages
58-
id: composer-cache
59-
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
60-
with:
61-
path: vendor
62-
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
63-
restore-keys: |
64-
${{ runner.os }}-php-
73+
- name: Cache Composer packages
74+
id: composer-cache
75+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
76+
with:
77+
path: vendor
78+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
79+
restore-keys: |
80+
${{ runner.os }}-php-
6581
66-
- name: Install Doctrine Lexer dependency
67-
run: |
68-
if [ "${{ matrix.doctrine-lexer }}" == "1.2" ]; then
69-
composer require doctrine/lexer "~1.2" --dev --prefer-dist --no-interaction --no-progress
70-
elif [ "${{ matrix.doctrine-lexer }}" == "2.1" ]; then
71-
composer require doctrine/lexer "~2.1" --dev --prefer-dist --no-interaction --no-progress
72-
elif [ "${{ matrix.doctrine-lexer }}" == "3.0" ]; then
73-
composer require doctrine/lexer "~3.0" --dev --prefer-dist --no-interaction --no-progress
74-
else
75-
composer update --prefer-dist --no-interaction --no-progress
76-
fi
82+
- name: Install Doctrine Lexer dependency
83+
run: |
84+
if [ "${{ matrix.doctrine-lexer }}" == "1.2" ]; then
85+
composer require doctrine/lexer "~1.2" --dev --prefer-dist --no-interaction --no-progress
86+
elif [ "${{ matrix.doctrine-lexer }}" == "2.1" ]; then
87+
composer require doctrine/lexer "~2.1" --dev --prefer-dist --no-interaction --no-progress
88+
elif [ "${{ matrix.doctrine-lexer }}" == "3.0" ]; then
89+
composer require doctrine/lexer "~3.0" --dev --prefer-dist --no-interaction --no-progress
90+
else
91+
composer update --prefer-dist --no-interaction --no-progress
92+
fi
7793
78-
- name: Install Doctrine ORM dependency
79-
run: |
80-
if [ "${{ matrix.doctrine-orm }}" == "2.14" ]; then
81-
composer require doctrine/orm "~2.14" --prefer-dist --no-interaction --no-progress --with-all-dependencies
82-
elif [ "${{ matrix.doctrine-orm }}" == "2.18" ]; then
83-
composer require doctrine/orm "~2.18" --prefer-dist --no-interaction --no-progress --with-all-dependencies
84-
elif [ "${{ matrix.doctrine-orm }}" == "3.0" ]; then
85-
composer require doctrine/orm "~3.0" --prefer-dist --no-interaction --no-progress --with-all-dependencies
86-
else
87-
composer update --prefer-dist --no-interaction --no-progress
88-
fi
94+
- name: Install Doctrine ORM dependency
95+
run: |
96+
if [ "${{ matrix.doctrine-orm }}" == "2.14" ]; then
97+
composer require doctrine/orm "~2.14" --prefer-dist --no-interaction --no-progress --with-all-dependencies
98+
elif [ "${{ matrix.doctrine-orm }}" == "2.18" ]; then
99+
composer require doctrine/orm "~2.18" --prefer-dist --no-interaction --no-progress --with-all-dependencies
100+
elif [ "${{ matrix.doctrine-orm }}" == "3.0" ]; then
101+
composer require doctrine/orm "~3.0" --prefer-dist --no-interaction --no-progress --with-all-dependencies
102+
else
103+
composer update --prefer-dist --no-interaction --no-progress
104+
fi
89105
90-
- name: Run static analysis
91-
run: composer run-static-analysis
92-
continue-on-error: ${{ matrix.continue-on-error || false }}
106+
- name: Run static analysis
107+
run: composer run-static-analysis
108+
continue-on-error: ${{ matrix.continue-on-error || false }}
93109

94-
- name: Check code style
95-
run: composer check-code-style
110+
- name: Check code style
111+
run: composer check-code-style
96112

97-
- name: Check for security vulnerabilities in 3rd party dependencies
98-
run: composer audit
113+
- name: Check for security vulnerabilities in 3rd party dependencies
114+
run: composer audit
99115

100-
- name: Run test suite
101-
run: composer run-tests-with-clover
116+
- name: Run test suite
117+
run: composer run-tests-with-clover
102118

103-
- name: Upload coverage results to Coveralls
104-
if: matrix.calculate-code-coverage == true && github.event_name == 'push'
105-
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2
106-
with:
107-
github-token: ${{ secrets.GITHUB_TOKEN }}
108-
fail-on-error: false
109-
base-path: ./var/logs/test-coverage/
110-
flag-name: "PHP ${{ matrix.php }}"
119+
- name: Upload coverage results to Coveralls
120+
if: matrix.calculate-code-coverage == true && github.event_name == 'push'
121+
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2
122+
with:
123+
github-token: ${{ secrets.GITHUB_TOKEN }}
124+
fail-on-error: false
125+
base-path: ./var/logs/test-coverage/
126+
flag-name: "PHP ${{ matrix.php }}"

.github/workflows/release-please.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ permissions:
1414

1515
jobs:
1616
release-please:
17-
name: Create new release PR
1817
runs-on: ubuntu-latest
18+
name: Create new release PR
1919
steps:
2020
- uses: googleapis/release-please-action@a02a34c4d625f9be7cb89156071d8567266a2445 # v4
2121
with:

.github/workflows/sloth.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,27 @@ permissions:
99
checks: read
1010

1111
jobs:
12-
sloth:
12+
should-run:
1313
runs-on: ubuntu-latest
14+
outputs:
15+
run: ${{ steps.check.outputs.run }}
1416
steps:
1517
- name: Skip for release-please
16-
id: check_release_please
17-
if: github.event.pull_request.user.id == 41898282 # release-please[bot]
18+
id: check
1819
run: |
19-
echo "skip=true" >> $GITHUB_OUTPUT
20-
echo "Skipping Sloth check for release-please PR"
20+
if [ "${{ github.event.pull_request.user.id == '41898282' }}" == "true" ]; then
21+
echo "run=false" >> $GITHUB_OUTPUT
22+
echo "Skipping Sloth - release-please PR"
23+
else
24+
echo "run=true" >> $GITHUB_OUTPUT
25+
fi
2126
27+
sloth:
28+
needs: should-run
29+
if: needs.should-run.outputs.run == 'true'
30+
runs-on: ubuntu-latest
31+
steps:
2232
- name: Run Sloth
23-
if: ${{ !steps.check_release_please.outputs.skip }}
2433
uses: lendable/sloth@e1fd9a2df2549f6e64188f274bc5d3b39d7842ed # 0.2.0
2534
with:
2635
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)