Skip to content

Commit

Permalink
GH Actions: fix builds failing
Browse files Browse the repository at this point in the history
A recent change in the `shivammathur/setup-php@v2` has broken the handling of ini values passed via step output parameters.

I have [reported this bug upstream](shivammathur/setup-php#405).

For now, I'm fixing the build failures by commenting out the custom ini value setting.

Once the upstream bug has been fixed, this commit should be reverted.
  • Loading branch information
jrfnl committed Feb 4, 2021
1 parent caad3ad commit 3ea626b
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 37 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/quicktest.yml
Expand Up @@ -46,20 +46,21 @@ jobs:

# On stable PHPCS versions, allow for PHP deprecation notices.
# Unit tests don't need to fail on those for stable releases where those issues won't get fixed anymore.
- name: Setup ini config
id: set_ini
run: |
if [ "${{ matrix.phpcs_version }}" != "dev-master" ]; then
echo '::set-output name=PHP_INI::error_reporting=E_ALL & ~E_DEPRECATED'
else
echo '::set-output name=PHP_INI::error_reporting=E_ALL'
fi
# Temporarily commented out while waiting for a fix for https://github.com/shivammathur/setup-php/issues/405
# - name: Setup ini config
# id: set_ini
# run: |
# if [ "${{ matrix.phpcs_version }}" != "dev-master" ]; then
# echo '::set-output name=PHP_INI::error_reporting=E_ALL & ~E_DEPRECATED'
# else
# echo '::set-output name=PHP_INI::error_reporting=E_ALL'
# fi

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
ini-values: ${{ steps.set_ini.outputs.PHP_INI }}
# ini-values: ${{ steps.set_ini.outputs.PHP_INI }}
coverage: none

- name: 'Composer: set PHPCS version for tests'
Expand Down
58 changes: 30 additions & 28 deletions .github/workflows/test.yml
Expand Up @@ -151,25 +151,26 @@ jobs:
# On stable PHPCS versions, allow for PHP deprecation notices.
# Unit tests don't need to fail on those for stable releases where those issues won't get fixed anymore.
# Also set the "short_open_tag" ini to make sure specific conditions are tested.
if [ ${{ matrix.custom_ini }} == "true" ]; then
if [ "${{ matrix.phpcs_version }}" != "dev-master" ]; then
echo '::set-output name=PHP_INI::error_reporting=E_ALL & ~E_DEPRECATED, short_open_tag=On'
else
echo '::set-output name=PHP_INI::short_open_tag=On'
fi
else
if [ "${{ matrix.phpcs_version }}" != "dev-master" ]; then
echo '::set-output name=PHP_INI::error_reporting=E_ALL & ~E_DEPRECATED'
else
echo '::set-output name=PHP_INI::error_reporting=E_ALL'
fi
fi
# Temporarily commented out while waiting for a fix for https://github.com/shivammathur/setup-php/issues/405
# if [ ${{ matrix.custom_ini }} == "true" ]; then
# if [ "${{ matrix.phpcs_version }}" != "dev-master" ]; then
# echo '::set-output name=PHP_INI::error_reporting=E_ALL & ~E_DEPRECATED, short_open_tag=On'
# else
# echo '::set-output name=PHP_INI::error_reporting=E_ALL, short_open_tag=On'
# fi
# else
# if [ "${{ matrix.phpcs_version }}" != "dev-master" ]; then
# echo '::set-output name=PHP_INI::error_reporting=E_ALL & ~E_DEPRECATED'
# else
# echo '::set-output name=PHP_INI::error_reporting=E_ALL'
# fi
# fi

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
ini-values: ${{ steps.set_ini.outputs.PHP_INI }}
# ini-values: ${{ steps.set_ini.outputs.PHP_INI }}
coverage: none

- name: 'Composer: adjust dependencies'
Expand Down Expand Up @@ -243,25 +244,26 @@ jobs:
# On stable PHPCS versions, allow for PHP deprecation notices.
# Unit tests don't need to fail on those for stable releases where those issues won't get fixed anymore.
# Also set the "short_open_tag" ini to make sure specific conditions are tested.
if [ ${{ matrix.custom_ini }} == "true" ]; then
if [ "${{ matrix.phpcs_version }}" != "dev-master" ]; then
echo '::set-output name=PHP_INI::error_reporting=E_ALL & ~E_DEPRECATED, short_open_tag=On'
else
echo '::set-output name=PHP_INI::short_open_tag=On'
fi
else
if [ "${{ matrix.phpcs_version }}" != "dev-master" ]; then
echo '::set-output name=PHP_INI::error_reporting=E_ALL & ~E_DEPRECATED'
else
echo '::set-output name=PHP_INI::error_reporting=E_ALL'
fi
fi
# Temporarily commented out while waiting for a fix for https://github.com/shivammathur/setup-php/issues/405
# if [ ${{ matrix.custom_ini }} == "true" ]; then
# if [ "${{ matrix.phpcs_version }}" != "dev-master" ]; then
# echo '::set-output name=PHP_INI::error_reporting=E_ALL & ~E_DEPRECATED, short_open_tag=On'
# else
# echo '::set-output name=PHP_INI::short_open_tag=On'
# fi
# else
# if [ "${{ matrix.phpcs_version }}" != "dev-master" ]; then
# echo '::set-output name=PHP_INI::error_reporting=E_ALL & ~E_DEPRECATED'
# else
# echo '::set-output name=PHP_INI::error_reporting=E_ALL'
# fi
# fi

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
ini-values: ${{ steps.set_ini.outputs.PHP_INI }}
# ini-values: ${{ steps.set_ini.outputs.PHP_INI }}
coverage: xdebug

- name: 'Composer: adjust dependencies'
Expand Down

0 comments on commit 3ea626b

Please sign in to comment.