diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..5484dae --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,29 @@ +name: CI + +on: [push, pull_request] + +jobs: + tests: + runs-on: ubuntu-latest + + strategy: + matrix: + php: [5.6, 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 }} + + - name: Validate composer.json and composer.lock + run: composer validate + + - name: Install dependencies + run: composer install --prefer-dist --no-progress --no-interaction --no-suggest + + - name: Run test suite + run: php vendor/bin/codecept run diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index fed6a5c..0000000 --- a/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -language: php -stages: - - test -php: - - 5.6 - - 7.0 - - 7.1 - - 7.2 - - 7.3 - - 7.4 - - 8.0 -matrix: - allow_failures: - - php: 8.0 - -install: - - '[[ -z "$CI_USER_TOKEN" ]] || composer config github-oauth.github.com ${CI_USER_TOKEN};' - - COMPOSER_MEMORY_LIMIT=-1 composer self-update && composer --version - - COMPOSER_MEMORY_LIMIT=-1 composer install --prefer-dist --no-interaction - - phpenv config-rm xdebug.ini - - if [[ "$TRAVIS_PHP_VERSION" == "7.3" ]]; then pecl install -f pcov; fi - -script: - - php ./vendor/bin/codecept run - - if [[ "$TRAVIS_PHP_VERSION" == "7.3" ]]; then php ./vendor/bin/codecept run --coverage-xml; fi -after_script: - - if [[ "$TRAVIS_PHP_VERSION" == "7.3" ]]; then wget https://scrutinizer-ci.com/ocular.phar; php ocular.phar code-coverage:upload --format=php-clover tests/_output/coverage.xml; fi