From 16e92ec7cbeafdd27c1f02ef40877c8236e2abf1 Mon Sep 17 00:00:00 2001 From: lux Date: Wed, 16 Dec 2020 11:09:06 -0600 Subject: [PATCH 1/6] Added initial github actions to replace travis-ci --- .github/workflows/ci.yml | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..56093fc --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: "Continuous Integration" + +on: + - push + - pull_request + +env: + COMPOSER_FLAGS: "--no-interaction --prefer-source" + +jobs: + tests: + name: "CI" + + runs-on: ubuntu-latest + + stategy: + matrix: + php-version: + - "7.2" + - "7.3" + - "7.4" + - "8.0" + + dependencies: [highest] + + steps: + - name: "Checkout" + uses: "actions/checkout@v2" + + - name: "Setup PHP" + uses: "shivammathur/setup-php@v2" + with: + coverage: "none" + php-version: "${{ matrix.php-version }}" + + - name: "Install dependencies" + run: | + composer update ${{ env.COMPOSER_FLAGS }} + + - name: "Run tests" + run: "composer exec phpunit -- --verbose" From a4e9e435f44c61acfb1dc587d5483ce90b4c119b Mon Sep 17 00:00:00 2001 From: lux Date: Wed, 16 Dec 2020 11:09:28 -0600 Subject: [PATCH 2/6] Deleted travis-ci config --- .travis.yml | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index fb7f94c..0000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: php -php: - - 7.0 - - 7.1 - - 7.2 - - 7.3 - - 7.4 - -before_script: composer install --no-interaction --prefer-source -script: - - vendor/bin/phpunit --coverage-text --verbose From 88941e7dbb03ece185317cc195cc289b920394f0 Mon Sep 17 00:00:00 2001 From: lux Date: Wed, 16 Dec 2020 11:11:23 -0600 Subject: [PATCH 3/6] strategy spelling fix --- .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 56093fc..ff7e565 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest - stategy: + strategy: matrix: php-version: - "7.2" From 4c12b7bf28d755148fa33a9a369c43aa85633771 Mon Sep 17 00:00:00 2001 From: lux Date: Wed, 16 Dec 2020 11:18:38 -0600 Subject: [PATCH 4/6] psr/log fix --- .github/workflows/ci.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff7e565..32990bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ on: - pull_request env: - COMPOSER_FLAGS: "--no-interaction --prefer-source" + COMPOSER_FLAGS: "--no-interaction --prefer-dist" jobs: tests: @@ -22,6 +22,11 @@ jobs: - "8.0" dependencies: [highest] + include: + - php-version: "7.2" + dependencies: lowest + - php-version: "8.0" + dependencies: lowest steps: - name: "Checkout" @@ -32,6 +37,15 @@ jobs: with: coverage: "none" php-version: "${{ matrix.php-version }}" + + # This does not affect runtime, only tests were fixed in psr/log 1.1.2 so it's + # ok to require this only when running tests + - name: "Bump required version of psr/log to fix the --prefer-lowest builds" + run: 'composer require ${{ env.COMPOSER_FLAGS }} psr/log:^1.1.2 --no-update' + + - name: "Handle lowest dependencies update" + if: "contains(matrix.dependencies, 'lowest')" + run: "echo \"COMPOSER_FLAGS=$COMPOSER_FLAGS --prefer-lowest\" >> $GITHUB_ENV" - name: "Install dependencies" run: | From 4c9f4ae6171abe876a726380a50e816cb4d40beb Mon Sep 17 00:00:00 2001 From: lux Date: Wed, 16 Dec 2020 11:27:51 -0600 Subject: [PATCH 5/6] Let's get php 7.x working first --- .github/workflows/ci.yml | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 32990bd..e77e36d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,14 +19,9 @@ jobs: - "7.2" - "7.3" - "7.4" - - "8.0" + #- "8.0" dependencies: [highest] - include: - - php-version: "7.2" - dependencies: lowest - - php-version: "8.0" - dependencies: lowest steps: - name: "Checkout" @@ -37,15 +32,6 @@ jobs: with: coverage: "none" php-version: "${{ matrix.php-version }}" - - # This does not affect runtime, only tests were fixed in psr/log 1.1.2 so it's - # ok to require this only when running tests - - name: "Bump required version of psr/log to fix the --prefer-lowest builds" - run: 'composer require ${{ env.COMPOSER_FLAGS }} psr/log:^1.1.2 --no-update' - - - name: "Handle lowest dependencies update" - if: "contains(matrix.dependencies, 'lowest')" - run: "echo \"COMPOSER_FLAGS=$COMPOSER_FLAGS --prefer-lowest\" >> $GITHUB_ENV" - name: "Install dependencies" run: | From af3056697441a52dc35931315213f59a023759a1 Mon Sep 17 00:00:00 2001 From: lux Date: Wed, 16 Dec 2020 11:42:45 -0600 Subject: [PATCH 6/6] Updated composer versions and re-added php 8 --- .github/workflows/ci.yml | 2 +- composer.json | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e77e36d..869334f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: - "7.2" - "7.3" - "7.4" - #- "8.0" + - "8.0" dependencies: [highest] diff --git a/composer.json b/composer.json index dffb9cb..9ff9b8e 100644 --- a/composer.json +++ b/composer.json @@ -13,11 +13,11 @@ } ], "require": { - "psr/log": "1.*", - "php": ">=5.3.2" + "psr/log": "^1.0.1", + "php": ">=7.2" }, "require-dev": { - "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5" + "phpunit/phpunit": "^8.5" }, "autoload": { "psr-0": {