@@ -16,10 +16,26 @@ permissions:
1616 contents : read
1717
1818jobs :
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 }}"
0 commit comments