Skip to content

Commit

Permalink
set report portal conf in dedicated step
Browse files Browse the repository at this point in the history
  • Loading branch information
carine-bonnafous committed Nov 18, 2024
1 parent e8abf2d commit b7f6586
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,28 +52,21 @@ jobs:
string=': void'
grep -r -l "$string" tests/ | xargs sed -i "s/$string//g"
- name: Set ReportPortal configuration
if: github.ref_name == 'main' && vars.REPORT_PORTAL_ENABLED == 'true' && contains(fromJson('["7.1", "7.2", "7.3", "7.4"]'), matrix.php)
run: ./tests/reportportal_conf.sh
env:
REPORT_PORTAL_API_KEY: ${{ secrets.REPORT_PORTAL_API_KEY }}
REPORT_PORTAL_ENDPOINT: ${{ vars.REPORT_PORTAL_ENDPOINT }}

- name: PHPUnit
run: |
case ${{ matrix.php }} in
8.1|8.2|8.3 )
composer exec phpunit -- --configuration phpunit.ci.8.xml --coverage-xml ./.coverage
;;
7.1|7.2|7.3|7.4)
# If Report Portal is enabled, set up the configuration
if [[ "${{ vars.REPORT_PORTAL_ENABLED }}" = "true" && "${{ github.ref_name }}" == "devx/dex-943-send-phpunit-tests-to-reportportal" ]]; then
. ./tests/reportportal_conf.sh
fi
composer exec phpunit -- --configuration phpunit.ci.xml --coverage-xml ./.coverage
;;
*)
composer exec phpunit -- --configuration phpunit.ci.xml --coverage-xml ./.coverage
;;
8.1|8.2|8.3 ) composer exec phpunit -- --configuration phpunit.ci.8.xml --coverage-xml ./.coverage;;
*) composer exec phpunit -- --configuration phpunit.ci.xml --coverage-xml ./.coverage;;
esac
env:
XDEBUG_MODE: coverage
REPORT_PORTAL_API_KEY: ${{ secrets.REPORT_PORTAL_API_KEY }}
REPORT_PORTAL_ENDPOINT: ${{ vars.REPORT_PORTAL_ENDPOINT }}
REPORT_PORTAL_ENABLED: ${{ vars.REPORT_PORTAL_ENABLED }}

- name: PHPUnit threshold
run: php ./phpunit-threshold.php

0 comments on commit b7f6586

Please sign in to comment.