diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml new file mode 100644 index 0000000..d4c250f --- /dev/null +++ b/.github/workflows/php.yml @@ -0,0 +1,40 @@ +name: Code Checks + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + run: + runs-on: self-hosted + strategy: + matrix: + php-versions: ['7.1', '7.2'] + name: PHP ${{ matrix.php-versions }} + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + env: + runner: self-hosted + + - name: Validate composer.json and composer.lock + run: composer validate + + - name: Cache Composer packages + id: composer-cache + uses: actions/cache@v2 + with: + path: vendor + key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-php- + + - name: Tests Coverage + run: vendor/bin/phpunit --coverage-clover=coverage.xml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b5776a5..0000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: php - -php: - - 7.1 - - 7.2 - -before_script: - - composer self-update - - composer install --prefer-source --no-interaction - -script: -- vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: -# Submit coverage report to https://codecov.io -- bash <(curl -s https://codecov.io/bash) - -# You can delete the cache using travis-ci web interface -cache: - directories: - - $HOME/.composer/cache \ No newline at end of file