From ca2fd1d1e43ac12427dc0c6624b34b61be1a798d Mon Sep 17 00:00:00 2001 From: Sergey Romanenko Date: Sun, 3 Jul 2022 21:16:01 +0300 Subject: [PATCH] Session 4.0.0 --- .github/workflows/ci.yml | 50 ++++++++++++++++++++++++++++++++++++ .github/workflows/static.yml | 12 --------- .github/workflows/tests.yml | 40 ----------------------------- 3 files changed, 50 insertions(+), 52 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/static.yml delete mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..825992e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,50 @@ +name: CI +on: ['push', 'pull_request'] +jobs: + ci: + name: PHP ${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + php: ['8.1'] + dependency-version: [prefer-stable] + + steps: + - name: Get latest code + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: json, mbstring, pcntl + ini-values: disable_functions, error_reporting=E_ALL + tools: composer:v2 + coverage: xdebug + + - name: Setup Problem Matches + run: | + echo "::add-matcher::${{ runner.tool_cache }}/php.json" + echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + + - name: Install PHP 8.1 dependencies + run: composer update --${{ matrix.dependency-version }} --no-interaction --no-progress + + - name: PHP Static Analysis for PHP 8.1 + run: ./vendor/bin/phpstan + + - name: Run Tests for PHP 8.1 + run: ./vendor/bin/pest --coverage + + support: + needs: [ci] + name: Discord Notification + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: sebastianpopp/discord-action@releases/v1 + with: + webhook: ${{ secrets.WEBHOOK_TOKEN }} + message: "**❤️ SUPPORT ONGOING DEVELOPMENT**\n➡️ https://github.com/Awilum#support-me" diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml deleted file mode 100644 index c7807a3..0000000 --- a/.github/workflows/static.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: Static Analysis -on: [push, pull_request] -jobs: - phpstan: - name: PHPStan - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: PHPStan - uses: docker://oskarstark/phpstan-ga - with: - args: analyse src/ diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index 3a34b8d..0000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Tests - -on: ['push', 'pull_request'] - -jobs: - build: - name: PHP ${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - php: ['7.4', '8.0', '8.1'] - dependency-version: [prefer-stable] - - steps: - - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - tools: composer:v2 - extensions: json, mbstring - coverage: xdebug - - - name: Setup Problem Matches - run: | - echo "::add-matcher::${{ runner.tool_cache }}/php.json" - echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - - name: Install PHP 7 dependencies - run: composer update --dev --${{ matrix.dependency-version }} --no-interaction --no-progress - if: "matrix.php < 8" - - - name: Install PHP 8 dependencies - run: composer update --dev --${{ matrix.dependency-version }} --ignore-platform-req=php --no-interaction --no-progress - if: "matrix.php >= 8" - - - name: Run Tests with Coverage - run: ./vendor/bin/pest --coverage