diff --git a/.github/workflows/code_checks.yml b/.github/workflows/code_checks.yml new file mode 100644 index 0000000..23aa584 --- /dev/null +++ b/.github/workflows/code_checks.yml @@ -0,0 +1,48 @@ +name: PHP Composer + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + php: [ '7.2', '7.3', '7.4' ] + laravel: [ '5.5.*', '5.6.*', '5.7.*', '5.8.*', '^6.0', '^7.0' ] + + name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} + + steps: + - uses: actions/checkout@v2 + + - uses: actions/cache@v1 + with: + path: ~/.composer/cache/files + key: laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + + - uses: shivammathur/setup-php@v1 + with: + php-version: ${{ matrix.php }} + coverage: xdebug + + - name: Validate composer.json and composer.lock + run: composer validate + + - name: Install dependencies + run: | + composer require "illuminate/support:${{ matrix.laravel }}" "illuminate/support:${{ matrix.laravel }}" --no-interaction --no-update + composer update --prefer-dist --no-interaction --no-suggest + + - name: Run test + run: ./vendor/bin/phpunit --coverage-clover=coverage.clover --verbose + + - name: External Code Coverage + run: | + wget https://scrutinizer-ci.com/ocular.phar + php ocular.phar code-coverage:upload --format=php-clover coverage.clover diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f867429..0000000 --- a/.travis.yml +++ /dev/null @@ -1,31 +0,0 @@ -language: php - -cache: - directories: - - $HOME/.composer/cache - -php: - - 7.2 - -env: - - ILLUMINATE_VERSION=5.5.* - - ILLUMINATE_VERSION=5.7.* - - ILLUMINATE_VERSION=5.6.* - - ILLUMINATE_VERSION=5.8.* - - ILLUMINATE_VERSION=^6.0 - - ILLUMINATE_VERSION=^7.0 - -dist: xenial - -before_install: - - composer require illuminate/support:${ILLUMINATE_VERSION} illuminate/http:${ILLUMINATE_VERSION} --no-update - -install: - - composer install --no-interaction --no-progress --no-suggest --prefer-dist - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.clover --verbose - -after_script: - - wget https://scrutinizer-ci.com/ocular.phar - - php ocular.phar code-coverage:upload --format=php-clover coverage.clover