Skip to content

Commit

Permalink
Add PHP 8.1 to the testing matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
xemlock committed Sep 2, 2021
1 parent a636f71 commit c9714de
Showing 1 changed file with 32 additions and 10 deletions.
42 changes: 32 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,18 @@ jobs:
fail-fast: false
matrix:
operating-system: ['ubuntu-latest']
php-versions: ['8.0', '7.4', '7.3', '7.2', '7.1', '7.0', '5.6', '5.5', '5.4', '5.3']
php-versions:
- 8.1
- '8.0'
- 7.4
- 7.3
- 7.2
- 7.1
- '7.0'
- 5.6
- 5.5
- 5.4
- 5.3

steps:
- name: Checkout
Expand All @@ -26,22 +37,33 @@ jobs:

- name: Setup PHP_VERSION env variable
run: |
echo PHP_VERSION=$(echo "<?php echo join('.', array_slice(explode('.', PHP_VERSION), 0, 2)); " | php) >> $GITHUB_ENV
echo PHP_VERSION=$(echo "<?php echo join('.', array_slice(explode('.', PHP_VERSION), 0, 2)); " | php) >> $GITHUB_ENV
- name: Install dependencies
run: |
echo PHP_VERSION: ${{ env.PHP_VERSION }}
composer install
echo PHP_VERSION: ${{ env.PHP_VERSION }}
composer install
# At the moment phpunit is uninstallable with Composer on PHP 8.1,
# because of https://github.com/phpspec/prophecy/issues/531
if [ "${{ env.PHP_VERSION }}" = 8.1 ]; then
composer remove --no-update 'phpunit/phpunit'
wget -O phpunit https://phar.phpunit.de/phpunit-9.phar
chmod +x phpunit
mkdir -p vendor/bin
mv phpunit vendor/bin
rm -rf vendor/phpunit/phpunit
fi
- name: Run tests
run: |
mkdir -p build/logs
COMPOSER_PROCESS_TIMEOUT=0 composer test -- --coverage-clover build/logs/clover.xml
mkdir -p build/logs
COMPOSER_PROCESS_TIMEOUT=0 composer test -- --coverage-clover build/logs/clover.xml
- name: Upload coverage results to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [ -f "build/logs/clover.xml" ] && [ -f "vendor/bin/php-coveralls" ]; then
php vendor/bin/php-coveralls -v;
fi
if [ -f "build/logs/clover.xml" ] && [ -f "vendor/bin/php-coveralls" ]; then
php vendor/bin/php-coveralls -v;
fi

0 comments on commit c9714de

Please sign in to comment.