@@ -10,7 +10,7 @@ concurrency:
1010 cancel-in-progress : true
1111
1212jobs :
13- validate-mergable :
13+ validate-master :
1414 runs-on : ubuntu-latest
1515 steps :
1616 - name : " Checkout"
2121 - name : " Validate Mergable"
2222 run : git merge origin/master --no-commit --ff-only
2323
24- render-php :
25- needs : validate-mergable
24+ phpunit-composer-latest :
25+ needs : validate-master
2626 runs-on : ${{ matrix.operating-system }}
2727
2828 strategy :
3131 matrix :
3232 operating-system : ["ubuntu-latest"]
3333 php-versions : ["8.0", "8.1", "8.2"]
34- phpunit-versions : ["latest"]
3534
3635 steps :
3736 - name : " Checkout"
4645 extensions : mbstring, intl
4746 ini-values : post_max_size=256M, max_execution_time=180
4847 coverage : xdebug
49- tools : phpunit:${{ matrix.phpunit-versions }}
5048
5149 - name : " Composer State"
5250 run : composer update --no-install --with-all-dependencies
6260 uses : actions/cache@v3
6361 with :
6462 path : vendor
65- key : composer-${{ steps.composer-hash.outputs.hash }}
66- restore-keys : composer-${{ steps.composer-hash.outputs.hash }}
63+ key : composer-default- ${{ steps.composer-hash.outputs.hash }}
64+ restore-keys : composer-default- ${{ steps.composer-hash.outputs.hash }}
6765
6866 - name : " Install Dependencies"
6967 if : ${{ steps.cache-composer.outputs.cache-hit != 'true' }}
7674 - name : " PHPUnit"
7775 run : ./vendor/bin/phpunit
7876
79- - name : " Coverage"
80- run : echo "$(cat ./.phpunit/coverage.txt)"
77+ phpunit-composer-lowest :
78+ needs : validate-master
79+ runs-on : ${{ matrix.operating-system }}
80+
81+ strategy :
82+ max-parallel : 3
83+ fail-fast : true
84+ matrix :
85+ operating-system : ["ubuntu-latest"]
86+ php-versions : ["8.0", "8.1", "8.2"]
87+
88+ steps :
89+ - name : " Checkout"
90+ uses : actions/checkout@v3
91+ with :
92+ fetch-depth : 0
93+
94+ - name : " Setup PHP"
95+ uses : shivammathur/setup-php@v2
96+ with :
97+ php-version : ${{ matrix.php-versions }}
98+ extensions : mbstring, intl
99+ ini-values : post_max_size=256M, max_execution_time=180
100+ coverage : xdebug
101+
102+ - name : " Composer State"
103+ run : composer update --prefer-lowest --no-install --with-all-dependencies
104+
105+ - name : " Composer Name Hash"
106+ id : composer-hash
107+ uses : KEINOS/gh-action-hash-for-cache@main
108+ with :
109+ path : ./composer.lock
110+
111+ - name : " Caching"
112+ id : cache-composer
113+ uses : actions/cache@v3
114+ with :
115+ path : vendor
116+ key : composer-lowest-${{ steps.composer-hash.outputs.hash }}
117+ restore-keys : composer-lowest-${{ steps.composer-hash.outputs.hash }}
118+
119+ - name : " Install Dependencies"
120+ if : ${{ steps.cache-composer.outputs.cache-hit != 'true' }}
121+ run : composer install
122+
123+ - name : " Linux: Restore Vendor Executable"
124+ if : matrix.operating-system == 'ubuntu-latest'
125+ run : chmod -R 0755 vendor
126+
127+ - name : " PHPUnit"
128+ run : ./vendor/bin/phpunit
0 commit comments