1- name : PHP Composer
1+ name : Unit Tests (Linux)
22
33# whenever master has a PR or is pushed to
44on :
@@ -11,25 +11,6 @@ permissions:
1111 contents : read
1212
1313jobs :
14- verify-no-models-changes :
15- runs-on : ubuntu-latest
16- name : Check for model changes
17- if : github.event_name == 'pull_request'
18- steps :
19- - name : Checkout codebase
20- uses : actions/checkout@v6
21- with :
22- fetch-depth : 0
23- - run : |
24- BASE_REPO="${{ github.event.pull_request.base.repo.clone_url }}"
25- git fetch $BASE_REPO master:master -q
26- CHANGED_FILES=$(git diff --name-only FETCH_HEAD...HEAD -- src/data/)
27- if [ ! -z "$CHANGED_FILES" ]; then
28- echo "Changes detected in the following models:"
29- echo "$CHANGED_FILES"
30- exit 1
31- fi
32-
3314 run :
3415 runs-on : ubuntu-latest
3516 strategy :
5031 composer-options : ' --prefer-lowest'
5132 - php-versions : ' 8.4'
5233 composer-options : ' '
34+ - php-versions : ' 8.4'
35+ composer-options : ' --prefer-lowest'
36+ - php-versions : ' 8.5'
37+ composer-options : ' '
5338 # set the name for each job
5439 name : PHP ${{ matrix.php-versions }} ${{ matrix.composer-options }}
5540 # set up environment variables used by unit tests
@@ -60,12 +45,12 @@ jobs:
6045 AWS_SUPPRESS_PHP_DEPRECATION_WARNING : true
6146 steps :
6247 # sets up the correct version of PHP with necessary config options
63- - name : Setup PHP with Xdebug
48+ - name : Setup PHP with JIT
6449 uses : shivammathur/setup-php@v2
6550 with :
66- coverage : xdebug
51+ coverage : none
6752 php-version : ${{ matrix.php-versions }}
68- ini-values : xdebug.overload_var_dump=0, memory_limit=4G, phar.readonly=false
53+ ini-values : memory_limit=4G, phar.readonly=false, opcache.enable=1, opcache.enable_cli=1, opcache.jit=tracing, opcache.jit_buffer_size=128M
6954
7055 # checkout the codebase from github
7156 - name : Checkout codebase
@@ -79,11 +64,18 @@ jobs:
7964
8065 # get dependencies
8166 - name : Install dependencies
82- run : composer update ${{ matrix.composer-options }} --no-interaction --prefer-source
83-
84- # php 8.1+ requirements
85- - name : PHP 8.1+ requirements
86- run : composer require --dev phpunit/phpunit "^9.5" guzzlehttp/guzzle "^7.4.5" --no-interaction --prefer-source --with-all-dependencies
67+ run : |
68+ if [[ "${{ matrix.composer-options }}" == "--prefer-lowest" ]]; then
69+ # PHP 8.3+ needs PSR HTTP Message 2.0+ and compatible Guzzle packages
70+ if [[ "${{ matrix.php-versions }}" == "8.3" ]] || [[ "${{ matrix.php-versions }}" == "8.4" ]]; then
71+ composer update ${{ matrix.composer-options }} --no-interaction --prefer-source --with-all-dependencies
72+ composer update psr/http-message guzzlehttp/psr7 guzzlehttp/guzzle --with-all-dependencies --no-interaction
73+ else
74+ composer update ${{ matrix.composer-options }} --no-interaction --prefer-source --with-all-dependencies
75+ fi
76+ else
77+ composer update ${{ matrix.composer-options }} --no-interaction --prefer-source
78+ fi
8779
8880 # run tests
8981 - name : Run test suite
9284 # static analysis
9385 - name : Static analysis
9486 run : |
95- composer require --dev nette/neon "^3.4.4"
96- composer require --dev phpstan/phpstan "2.1.1"
87+ composer require --dev nette/neon "^3.4.4" phpstan/phpstan "2.1.1" --ignore-platform-req=php --update-with-all-dependencies
9788 vendor/bin/phpstan analyse src
9889
9990 # generate package
10394 composer config platform.php 8.1
10495 composer update
10596 make package
106-
107- # generate code coverage
108- - if : ${{ matrix.composer-options == '' }}
109- name : Code Coverage
110- run : bash <(curl -s https://codecov.io/bash)
0 commit comments