Skip to content

Commit

Permalink
Fix error in installing packages in build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
rougin committed Nov 15, 2023
1 parent 83dff3f commit 2ad5a54
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 15 deletions.
38 changes: 24 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
run:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-versions: ['5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
name: Run Unit Test on PHP ${{ matrix.php-versions }}
Expand All @@ -29,28 +30,37 @@ jobs:
- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
run: composer install --prefer-dist --no-progress

- name: Install Composer packages not specified for PHP 5.3
- name: Install third-party Composer packages
if: ${{ steps.setup-php.outputs.php-version != '5.3' }}
run: composer require league/container:~2.4 nikic/fast-route phroute/phroute zendframework/zend-diactoros zendframework/zend-stratigility

- name: Install Composer packages for PHP 7.1
if: ${{ steps.setup-php.outputs.php-version == '7.1' }}
run: composer require zendframework/zend-stratigility:~2.0
# - name: Install Composer packages for PHP 7.1
# if: ${{ steps.setup-php.outputs.php-version == '7.1' }}
# run: composer require zendframework/zend-stratigility:~2.0

- name: Install Composer packages for PHP 7.2
if: ${{ steps.setup-php.outputs.php-version == '7.2' }}
run: composer require zendframework/zend-stratigility:~2.0
# - name: Install Composer packages for PHP 7.2
# if: ${{ steps.setup-php.outputs.php-version == '7.2' }}
# run: composer require zendframework/zend-stratigility:~2.0

- name: Install Composer packages for PHP 7.3
if: ${{ steps.setup-php.outputs.php-version == '7.3' }}
run: composer require zendframework/zend-stratigility:~2.0
# - name: Install Composer packages for PHP 7.3
# if: ${{ steps.setup-php.outputs.php-version == '7.3' }}
# run: composer require zendframework/zend-stratigility:~2.0

- name: Install Composer packages for PHP 7.4
if: ${{ steps.setup-php.outputs.php-version == '7.4' }}
run: composer require zendframework/zend-stratigility:~2.0
# - name: Install Composer packages for PHP 7.4
# if: ${{ steps.setup-php.outputs.php-version == '7.4' }}
# run: composer require zendframework/zend-stratigility:~2.0

- name: Run test suite
run: vendor/bin/phpunit
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"require":
{
"php": ">=5.3.0",
"psr/container": "~1.0.0",
"psr/container": "~1.0",
"psr/http-message": "~1.0"
},
"require-dev":
Expand Down

0 comments on commit 2ad5a54

Please sign in to comment.