@@ -16,12 +16,16 @@ defaults:
1616jobs :
1717
1818 tests :
19- name : Tests ( PHP ${{ matrix.php }})
19+ name : " PHP ${{ matrix.php }}${{ matrix.with_coverage == true && ' with coverage' || ''}} "
2020 runs-on : Ubuntu-20.04
2121
2222 strategy :
2323 matrix :
24- php : [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
24+ php : [ '5.6', '7.0', '7.1', '7.2', '7.3', '8.0', '8.1', '8.2', '8.3' ]
25+ with_coverage : [ false ]
26+ include :
27+ - php : ' 7.4'
28+ with_coverage : true
2529 fail-fast : false
2630
2731 steps :
@@ -42,23 +46,30 @@ jobs:
4246 with :
4347 dependency-versions : " highest"
4448
45- - name : Run tests
49+ - name : Run tests with Coverage
50+ if : " ${{ matrix.with_coverage == true }}"
4651 run : |
4752 vendor/bin/phpunit --coverage-clover=coverage.clover
4853
54+ - name : Run tests without Coverage
55+ if : " ${{ matrix.with_coverage == false }}"
56+ run : |
57+ vendor/bin/phpunit
58+
4959 - name : Upload Coverage to CodeCov
60+ if : " ${{ matrix.with_coverage == true }}"
5061 uses : codecov/codecov-action@v4
5162 with :
5263 token : ${{ secrets.CODECOV_TOKEN }}
5364
5465 - name : Upload Coverage to Scrutinizer CI (PHP < 8.0)
55- if : " ${{ matrix.php < '8.0' }}"
66+ if : " ${{ matrix.php < '8.0' && matrix.with_coverage == true }}"
5667 run : |
5768 wget https://scrutinizer-ci.com/ocular.phar
5869 php ocular.phar code-coverage:upload --repository=g/console-helpers/jira-cli --format=php-clover coverage.clover
5970
6071 - name : Upload Coverage to Scrutinizer CI (PHP >= 8.0)
61- if : " ${{ matrix.php >= '8.0' }}"
72+ if : " ${{ matrix.php >= '8.0' && matrix.with_coverage == true }}"
6273 run : |
6374 composer require scrutinizer/ocular
6475 vendor/bin/ocular code-coverage:upload --repository=g/console-helpers/jira-cli --format=php-clover coverage.clover
0 commit comments