From c5bcd07f4d17c8da6bea413865177a4e39876379 Mon Sep 17 00:00:00 2001 From: Alex Bouma Date: Mon, 30 Nov 2020 21:20:21 +0100 Subject: [PATCH] Replace Travis CI with GitHub Actions (#599) --- .github/workflows/tests.yml | 36 ++++++++++++++++++++++++++++++++++++ .travis.yml | 27 --------------------------- composer.json | 17 +++++++++-------- 3 files changed, 45 insertions(+), 35 deletions(-) create mode 100644 .github/workflows/tests.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..7d2e98d3 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,36 @@ +name: Tests + +on: [ push, pull_request ] + +jobs: + test: + strategy: + fail-fast: true + matrix: + os: [ ubuntu-latest, windows-latest ] + php: [ "8.0", "7.4", "7.3", "7.2" ] + + name: PHP ${{ matrix.php }} - ${{ matrix.os }} + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: ~/.composer/cache/files + key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + coverage: none + + - name: Install dependencies + run: composer update --prefer-stable --prefer-dist --no-interaction --no-suggest + + - name: Execute tests + run: vendor/bin/phpunit diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f76c502f..00000000 --- a/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -language: php - -php: - - 7.2 - - 7.3 - - 7.4 - - nightly - -# This triggers builds to run on the new TravisCI infrastructure. -# See: http://docs.travis-ci.com/user/workers/container-based-infrastructure/ -sudo: false - -## Cache composer -cache: - directories: - - $HOME/.composer/cache - -before_script: - - travis_retry composer self-update - - travis_retry composer install --no-interaction --prefer-dist - -matrix: - allow_failures: - - php: nightly - fast_finish: true - -script: vendor/bin/phpunit diff --git a/composer.json b/composer.json index b7d60a5d..0bff30c8 100644 --- a/composer.json +++ b/composer.json @@ -18,18 +18,19 @@ "require": { "php": "^7.2|^8.0", "anahkiasen/html-object": "~1.4", - "illuminate/config": "~5.0|^6.0|^7.0|^8.0", - "illuminate/container": "~5.0|^6.0|^7.0|^8.0", - "illuminate/http": "~5.0|^6.0|^7.0|^8.0", - "illuminate/routing": "~5.0|^6.0|^7.0|^8.0", - "illuminate/session": "~5.0|^6.0|^7.0|^8.0", - "illuminate/translation": "~5.0|^6.0|^7.0|^8.0", - "illuminate/support": "~5.0|^6.0|^7.0|^8.0" + "illuminate/config": "^5.1.3|^6.0|^7.0|^8.0", + "illuminate/container": "^5.1.3|^6.0|^7.0|^8.0", + "illuminate/contracts": "^5.1.3|^6.0|^7.0|^8.0", + "illuminate/http": "^5.1.3|^6.0|^7.0|^8.0", + "illuminate/routing": "^5.1.3|^6.0|^7.0|^8.0", + "illuminate/session": "^5.1.3|^6.0|^7.0|^8.0", + "illuminate/translation": "^5.1.3|^6.0|^7.0|^8.0", + "illuminate/support": "^5.1.3|^6.0|^7.0|^8.0" }, "require-dev": { "phpunit/phpunit": "^8.5", "mockery/mockery": "^1.3", - "illuminate/database": "~5.0|^6.0|^7.0|^8.0" + "illuminate/database": "^5.1.3|^6.0|^7.0|^8.0" }, "autoload": { "psr-4": {