From 7238e6abd1444e8c2c0be960829a327ba944dbf2 Mon Sep 17 00:00:00 2001 From: Denis Smetannikov Date: Wed, 28 Apr 2021 19:13:19 +0300 Subject: [PATCH] Update PHP deps (#2) --- .gitattributes | 11 +---- .github/workflows/main.yml | 86 ++++++++++++++++++++++++++++------- .phan/config.php => .phan.php | 10 ++-- .travis.yml | 7 --- composer.json | 3 +- 5 files changed, 78 insertions(+), 39 deletions(-) rename .phan/config.php => .phan.php (64%) diff --git a/.gitattributes b/.gitattributes index f504f9b..2bd965d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -11,21 +11,14 @@ # @link https://github.com/JBZoo/Retry # +/.github export-ignore /build export-ignore /tests export-ignore /.editorconfig export-ignore /.gitattributes export-ignore /.gitignore export-ignore -/.phpstorm.meta.php export-ignore /.travis.yml export-ignore +/.phan.php export-ignore /phpunit.xml.dist export-ignore * text eol=lf - -# (binary is a macro for -text -diff) -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.ttf binary diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3894d2c..f58e7f0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ # @link https://github.com/JBZoo/Retry # -name: Continuous Integration +name: CI on: pull_request: @@ -21,7 +21,7 @@ on: branches: - 'master' schedule: - - cron: '15 */8 * * *' + - cron: '30 */8 * * *' env: COLUMNS: 120 @@ -29,27 +29,21 @@ env: jobs: phpunit: - name: Tests + name: PHPUnit runs-on: ubuntu-latest env: JBZOO_COMPOSER_UPDATE_FLAGS: ${{ matrix.composer_flags }} strategy: matrix: - php-version: [ 7.2, 7.3, 7.4 ] - experimental: [ false ] + php-version: [ 7.2, 7.3, 7.4, 8.0 ] composer_flags: [ "--prefer-lowest", "" ] - include: - - php-version: "8.0" - experimental: true - - php-version: "8.1" - experimental: true steps: - name: Checkout code uses: actions/checkout@v2 with: fetch-depth: 0 - - name: Setup PHP and composer + - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-version }} @@ -57,17 +51,77 @@ jobs: tools: composer - name: Build the Project - continue-on-error: ${{ matrix.experimental }} run: make update --no-print-directory - name: ๐Ÿงช PHPUnit Tests - continue-on-error: ${{ matrix.experimental }} run: make test --no-print-directory + - name: Upload Artifacts + uses: actions/upload-artifact@v2 + with: + name: PHPUnit - ${{ matrix.php-version }} - ${{ matrix.coverage }} + path: build/ + + + linters: + name: Linters + runs-on: ubuntu-latest + strategy: + matrix: + php-version: [ 7.2, 7.3, 7.4, 8.0 ] + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + extensions: ast + tools: composer + + - name: Build the Project + run: make update --no-print-directory + - name: ๐Ÿ‘ Code Quality - continue-on-error: ${{ matrix.experimental }} run: make codestyle --no-print-directory - - name: ๐Ÿ“ Build All Reports at Once - continue-on-error: ${{ matrix.experimental }} + - name: Upload Artifacts + uses: actions/upload-artifact@v2 + with: + name: Linters - ${{ matrix.php-version }} + path: build/ + + + report: + name: Reports + runs-on: ubuntu-latest + strategy: + matrix: + php-version: [ 7.2, 7.3, 7.4, 8.0 ] + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + coverage: xdebug + tools: composer + + - name: Build the Project + run: make update --no-print-directory + + - name: ๐Ÿ“ Build Reports run: make report-all --no-print-directory + + - name: Upload Artifacts + uses: actions/upload-artifact@v2 + with: + name: Reports - ${{ matrix.php-version }} + path: build/ diff --git a/.phan/config.php b/.phan.php similarity index 64% rename from .phan/config.php rename to .phan.php index 57f586a..85046ed 100644 --- a/.phan/config.php +++ b/.phan.php @@ -15,15 +15,15 @@ declare(strict_types=1); -$default = include __DIR__ . '/../vendor/jbzoo/codestyle/src/phan/default.php'; +$default = include __DIR__ . '/vendor/jbzoo/codestyle/src/phan/default.php'; -$phanConfig = array_merge($default, [ +$config = array_merge($default, [ 'directory_list' => [ 'src', ] ]); -$phanConfig['plugins'][] = 'NotFullyQualifiedUsagePlugin'; -$phanConfig['plugins'][] = 'UnknownElementTypePlugin'; +$config['plugins'][] = 'NotFullyQualifiedUsagePlugin'; +$config['plugins'][] = 'UnknownElementTypePlugin'; -return $phanConfig; +return $config; diff --git a/.travis.yml b/.travis.yml index d0a7483..b8bb928 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,13 +23,6 @@ php: - 7.3 - 7.4 - 8.0 - - nightly - -jobs: - fast_finish: true - allow_failures: - - php: 8.0 - - php: nightly env: matrix: diff --git a/composer.json b/composer.json index 194f868..c51ef71 100644 --- a/composer.json +++ b/composer.json @@ -25,8 +25,7 @@ }, "require-dev" : { - "jbzoo/toolbox-dev" : "^2.11.0", - "jbzoo/jbdump" : ">=1.5.6" + "jbzoo/toolbox-dev" : "^2.13.1" }, "replace" : {