From 355d6dec455528db240fe91f5619abd304c57615 Mon Sep 17 00:00:00 2001 From: Andrew M-Y Date: Thu, 21 Jan 2021 13:18:05 +0200 Subject: [PATCH 1/2] Replace Travis with GitHub Workflow; add PHP 8; drop PHP 7.1, 7.2 --- .github/workflows/ci.yml | 33 +++++++++++++++++++++++++++++++++ .travis.yml | 21 --------------------- composer.json | 7 ++++--- 3 files changed, 37 insertions(+), 24 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..adb8431 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,33 @@ +name: CI +on: [pull_request] +jobs: + tests: + runs-on: ubuntu-latest + strategy: + matrix: + php: ['7.3', '7.4', '8.0'] + name: PHP ${{ matrix.php }} tests + steps: + - uses: actions/checkout@v2 + + - name: Get Composer Cache Directory + id: composer-cache + run: | + echo "::set-output name=dir::$(composer config cache-files-dir)" + + - uses: actions/cache@v2 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: | + ${{ runner.os }}-composer- + + - uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + coverage: none + extensions: :xdebug + + - run: composer install --prefer-source + + - run: vendor/bin/phpunit diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index bc1ccd0..0000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -sudo: false - -git: - depth: 10 - -language: php - -php: - - '7.1' - - '7.2' - -cache: - directories: - - $HOME/.composer/cache - -install: - - composer self-update - - composer install --prefer-source - -script: - - vendor/bin/phpunit diff --git a/composer.json b/composer.json index 203b3c0..7f7cdd4 100644 --- a/composer.json +++ b/composer.json @@ -1,14 +1,15 @@ { "name": "queue-interop/amqp-interop", + "description": "AMQP interop", "type": "library", "license": "MIT", "minimum-stability": "stable", "require": { - "php": "^7.1.3", - "queue-interop/queue-interop": "^0.7|^0.8" + "php": "^7.3 | ^8.0", + "queue-interop/queue-interop": "^0.7|^0.8|^0.9" }, "require-dev": { - "phpunit/phpunit": "~5.4.0" + "phpunit/phpunit": "~9.0" }, "autoload": { "psr-4": { From a7900e3f92963311d69251a4c8b55ab3eb1b3ca6 Mon Sep 17 00:00:00 2001 From: Andrew M-Y Date: Thu, 21 Jan 2021 13:26:39 +0200 Subject: [PATCH 2/2] Trigger on push too --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index adb8431..f2fff1a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,5 @@ name: CI -on: [pull_request] +on: [pull_request, push] jobs: tests: runs-on: ubuntu-latest