From e081cec265b8a10b7fcbcfdd63a39e43c760cbb1 Mon Sep 17 00:00:00 2001 From: Denis Smetannikov Date: Wed, 28 Apr 2021 04:11:16 +0300 Subject: [PATCH] Update deps + New Tests (#1) --- .gitattributes | 11 +++++ .github/workflows/main.yml | 88 +++++++++++++++++++++++++++++++---- .phan/config.php => .phan.php | 2 +- .travis.yml | 5 -- Makefile | 3 +- composer.json | 7 ++- 6 files changed, 96 insertions(+), 20 deletions(-) rename .phan/config.php => .phan.php (86%) diff --git a/.gitattributes b/.gitattributes index 61a64dc..a97e6ba 100644 --- a/.gitattributes +++ b/.gitattributes @@ -11,4 +11,15 @@ # @link https://github.com/JBZoo/Toolbox-Dev # +/.github export-ignore +/build export-ignore +/tests export-ignore +/.editorconfig export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore +/.phan.php export-ignore +/.travis.yml export-ignore +/phpunit.xml.dist export-ignore +/Makefile export-ignore + * text eol=lf diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 471f5fa..78a202b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ # @link https://github.com/JBZoo/Toolbox-Dev # -name: Continuous Integration +name: CI on: pull_request: @@ -21,7 +21,7 @@ on: branches: - 'master' schedule: - - cron: '15 */8 * * *' + - cron: '55 */8 * * *' env: COLUMNS: 120 @@ -35,20 +35,20 @@ jobs: JBZOO_COMPOSER_UPDATE_FLAGS: ${{ matrix.composer_flags }} strategy: matrix: - php-version: [ 7.2, 7.3, 7.4 ] - coverage: [ xdebug, none ] + php-version: [ 7.2, 7.3, 7.4, 8.0 ] experimental: [ false ] + coverage: [ xdebug, none ] 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 }} @@ -63,10 +63,82 @@ jobs: 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 ] + experimental: [ false ] + include: + - php-version: "8.1" + experimental: true + 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 }} + tools: composer + + - name: Build the Project + continue-on-error: ${{ matrix.experimental }} + 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 + - 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 ] + experimental: [ false ] + include: + - php-version: "8.1" + experimental: true + 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 }} + tools: composer + + - name: Build the Project + continue-on-error: ${{ matrix.experimental }} + run: make update --no-print-directory + + - name: 📝 Build Reports continue-on-error: ${{ matrix.experimental }} 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 86% rename from .phan/config.php rename to .phan.php index 17d0da4..8b303b0 100644 --- a/.phan/config.php +++ b/.phan.php @@ -15,7 +15,7 @@ declare(strict_types=1); -$default = include __DIR__ . '/../vendor/jbzoo/codestyle/src/phan/default.php'; +$default = include __DIR__ . '/vendor/jbzoo/codestyle/src/phan/default.php'; return array_merge($default, [ 'directory_list' => [ diff --git a/.travis.yml b/.travis.yml index dca40cd..e0594a2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,11 +21,6 @@ php: - 7.4 - 8.0 -matrix: - fast_finish: true - allow_failures: - - php: 8.0 - env: matrix: - JBZOO_COMPOSER_UPDATE_FLAGS="--prefer-lowest --prefer-stable" diff --git a/Makefile b/Makefile index 4ff6ebc..21bf575 100644 --- a/Makefile +++ b/Makefile @@ -20,10 +20,9 @@ endif update: ##@Project Install/Update all 3rd party dependencies $(call title,"Install/Update all 3rd party dependencies") @echo "Composer flags: $(JBZOO_COMPOSER_UPDATE_FLAGS)" - @composer update $(JBZOO_COMPOSER_UPDATE_FLAGS) + @composer update --no-progress $(JBZOO_COMPOSER_UPDATE_FLAGS) test-all: ##@Project Run all project tests at once @make test @make codestyle - @make report-composer-graph diff --git a/composer.json b/composer.json index b185b20..28427f8 100644 --- a/composer.json +++ b/composer.json @@ -16,12 +16,11 @@ "php" : ">=7.2", "jbzoo/phpunit" : "^4.9.0", - "jbzoo/codestyle" : "^2.15.0", - "jbzoo/ci-report-converter" : "^2.0.1", - "jbzoo/jbdump" : "^1.5.6", + "jbzoo/codestyle" : "^2.16.0", - "phpbench/phpbench" : "^0.17.1", + "jbzoo/jbdump" : "^1.5.6", "symfony/var-dumper" : "^4.4|^5.0", + "php-coveralls/php-coveralls" : "^2.4.3", "fakerphp/faker" : "^1.14.1" },