From 30e403c0120a7628412f9c48324ed621dd04431f Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Fri, 21 Feb 2020 14:16:55 +0100 Subject: [PATCH] Switch to Github Actions --- .gitattributes | 1 - .github/workflows/tests.yml | 51 +++++++++++++++++++++++++++++++++++++ .travis.yml | 33 ------------------------ README.md | 2 +- 4 files changed, 52 insertions(+), 35 deletions(-) create mode 100644 .github/workflows/tests.yml delete mode 100644 .travis.yml diff --git a/.gitattributes b/.gitattributes index 85fd311c..4f9e8b04 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6,7 +6,6 @@ .gitignore export-ignore .editorconfig export-ignore .styleci.yml export-ignore -.travis.yml export-ignore CHANGELOG.md export-ignore phpunit.xml.dist export-ignore UPGRADE.md export-ignore diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..bb93154a --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,51 @@ +name: tests + +on: + push: + pull_request: + schedule: + - cron: '0 0 * * *' + +jobs: + tests: + + runs-on: ubuntu-latest + services: + redis: + image: redis + ports: + - 6379:6379 + options: --entrypoint redis-server + strategy: + fail-fast: true + matrix: + php: [7.1, 7.2, 7.3, 7.4] + laravel: [5.7.*, 5.8.*, ^6.0] + exclude: + - php: 7.1 + laravel: ^6.0 + + name: P${{ matrix.php }} - L${{ matrix.laravel }} + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Cache dependencies + uses: actions/cache@v1 + with: + path: ~/.composer/cache/files + key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip + coverage: none + + - name: Install dependencies + run: composer require "illuminate/contracts=${{ matrix.laravel }}" --prefer-dist --no-interaction --no-suggest + + - name: Execute tests + run: vendor/bin/phpunit --verbose diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c9f9c66a..00000000 --- a/.travis.yml +++ /dev/null @@ -1,33 +0,0 @@ -dist: bionic -language: php - -services: - - redis-server - -php: - - 7.1 - - 7.2 - - 7.3 - - 7.4 - -env: - matrix: - - LARAVEL=5.7.* - - LARAVEL=5.8.* - - LARAVEL=^6.0 - -matrix: - fast_finish: true - exclude: - - php: 7.1 - env: LARAVEL=^6.0 - -before_install: - - phpenv config-rm xdebug.ini || true - - printf "\n" | pecl install -f redis - -install: - - travis_retry composer require "illuminate/contracts=${LARAVEL}" --dev --prefer-dist --no-interaction --no-suggest - -script: - - vendor/bin/phpunit --verbose diff --git a/README.md b/README.md index 02a11fe3..1e083b90 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@

-Build Status +Build Status Total Downloads Latest Stable Version License