Skip to content

Commit

Permalink
github actions: php 8.3 & 8.4 (#38)
Browse files Browse the repository at this point in the history
* action-php-8.3: init

* action-php-8.3: update checkout action to v4

* action-php-8.3: try php 8.4

* action-php-8.3: jit try

* action-php-8.3: update

* action-php-8.3: added text test coverage

* action-php-8.3: update code coverage

* action-php-8.3: tweaking code coverage
  • Loading branch information
mysiar authored Dec 30, 2023
1 parent 29159e9 commit 9c1c70c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
21 changes: 5 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: self-hosted
strategy:
matrix:
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ]
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
steps:
- name: Setup PHP (PHP ${{ matrix.php }})
uses: shivammathur/setup-php@v2
Expand All @@ -23,16 +23,17 @@ jobs:
extensions: bcmath
coverage: xdebug
tools: composer
ini-values: opcache.enable_cli=1, opcache.jit=tracing, opcache.jit_buffer_size=64M

- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Composer dependencies
run: composer install

- name: Prepare PHPUnit config file for PHP < 8
run: cp phpunit.xml.dist8 phpunit.xml.dist
run: cp phpunit.xml.dist7 phpunit.xml.dist
if: "matrix.php < 8"

- name: PHPUnit tests (PHP ${{ matrix.php }})
Expand All @@ -44,19 +45,7 @@ jobs:
run: php${{ matrix.php }} ./vendor/bin/ecs check src tests

- name: Code coverage
run: php${{ matrix.php }} -d xdebug.mode=coverage ./vendor/bin/phpunit --coverage-clover=var/coverage.xml
run: php${{ matrix.php }} -d xdebug.mode=coverage ./vendor/bin/phpunit

- name: Fix code coverage paths
run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' var/coverage.xml

# - name: Analyze with SonarQube
# uses: sonarsource/sonarqube-scan-action@master
# env:
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
# # If you wish to fail your job when the Quality Gate is red, uncomment the
# # following lines. This would typically be used to fail a deployment.
# # - uses: sonarsource/sonarqube-quality-gate-action@master
# # timeout-minutes: 5
# # env:
# # SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
1 change: 1 addition & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<report>
<clover outputFile="var/coverage.xml"/>
<html outputDirectory="var/phpunit" lowUpperBound="50" highLowerBound="85"/>
<text outputFile="php://stdout"/>
</report>
</coverage>
<testsuites>
Expand Down
File renamed without changes.

0 comments on commit 9c1c70c

Please sign in to comment.