Updated CI config

This commit is contained in:
Graham Campbell
2020-10-10 00:39:16 +01:00
parent 74f3b7d5d4
commit c9d0f24d3d
2 changed files with 40 additions and 16 deletions
+38
View File
@@ -0,0 +1,38 @@
name: Tests
on:
push:
pull_request:
jobs:
tests:
name: PHP ${{ matrix.php }}
runs-on: ubuntu-20.04
strategy:
matrix:
php: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: none
- name: Setup Problem Matchers
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install PHP Dependencies
uses: nick-invision/retry@v1
with:
timeout_minutes: 5
max_attempts: 5
command: composer update --no-interaction --no-progress
- name: Execute PHPUnit
run: vendor/bin/phpunit
+2 -16
View File
@@ -12,21 +12,11 @@ matrix:
dist: trusty
- php: 5.6
dist: xenial
env: PHPUNIT_FLAGS="--coverage-clover build/logs/clover.xml"
after_success: wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
- php: 5.6
dist: xenial
env: SETUP=lowest
- php: 7.0
dist: xenial
- php: 7.1
dist: bionic
- php: 7.2
dist: bionic
- php: 7.3
dist: bionic
- php: 7.4
dist: bionic
- php: nightly
dist: bionic
- php: hhvm-3.30
dist: trusty
before_install:
@@ -40,10 +30,6 @@ cache:
install:
- if [[ "$SETUP" = "basic" ]]; then composer install --no-interaction --prefer-dist; fi
- if [[ "$SETUP" = "lowest" ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-lowest --prefer-stable; fi
- if [[ $TRAVIS_PHP_VERSION = "5.6" && "$SETUP" = "basic" ]]; then PHPUNIT_FLAGS="--coverage-clover build/logs/clover.xml"; fi
script:
- vendor/bin/phpunit --verbose $PHPUNIT_FLAGS
after_success:
- if [ $TRAVIS_PHP_VERSION = "5.6" ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml; fi