diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml new file mode 100644 index 0000000..c0348e1 --- /dev/null +++ b/.github/workflows/php.yml @@ -0,0 +1,38 @@ +name: PHP + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + php-versions: ['5.4', '5.5', '5.6', '7.0', '7.1'] + # , '7.2', '7.3', '7.4', '8.0', '8.1' + steps: + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + + - uses: actions/checkout@v2 + + - name: Get composer cache directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Install dependencies + run: composer install --no-interaction + + - name: PHPUnit + run: ./vendor/bin/phpunit --coverage-text + + - name: Code Coverage + run: php vendor/bin/codacycoverage clover build/clover.xml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e9d0c43..0000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -dist: trusty - -language: php - -php: - - 5.4 - - 5.5 - - 5.6 - - 7.0 - - 7.1 - -before_script: - - travis_retry composer install --no-interaction - -script: - - vendor/bin/phpunit --coverage-text - -after_script: - - php vendor/bin/codacycoverage clover build/clover.xml