Skip to content

Commit

Permalink
Corrected PHP version check
Browse files Browse the repository at this point in the history
  • Loading branch information
gnongsie committed Jul 25, 2024
1 parent d310d0e commit cb65f5b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/php-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
operating-system: [ubuntu-latest, macos-latest, windows-latest]
php-version: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
runs-on: ${{matrix.operating-system}}
env:
PHP_VERSION: ${{matrix.php-version}}
steps:
- name: Creating separate folders for SDK and Sample Codes
run: |
Expand All @@ -41,22 +43,22 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{matrix.php-version}}
extension: mbstring, curl, openssl, zip
extension: mbstring, curl, openssl, zip, xmldiff

- name: Composer Validation
run: |
cd $sdk_php
composer validate
if [[ ${{steps.php-setup.outputs.php-version}} == "5.6" || ${{steps.php-setup.outputs.php-version}} == "7.0" ]]; then
if [[ ${{env.PHP_VERSION}} == "5.6" || ${{env.PHP_VERSION}} == "7.0" ]]; then
export phpunit_version=5.6.*
elif [[ ${{steps.php-setup.outputs.php-version}} == "7.1" ]]; then
elif [[ ${{env.PHP_VERSION}} == "7.1" ]]; then
export phpunit_version=5.7.*
elif [[ ${{steps.php-setup.outputs.php-version}} == "7.2" ]]; then
elif [[ ${{env.PHP_VERSION}} == "7.2" ]]; then
export phpunit_version=8.5.*
else
export phpunit_version=9.5.*
fi
echo "${{steps.setup-php.outputs.php-version}}"
echo "${{env.PHP_VERSION}}"
echo "$phpunit_version"

0 comments on commit cb65f5b

Please sign in to comment.