From 44d669085377f28a99028762d7b14de1d15bf158 Mon Sep 17 00:00:00 2001 From: Andrey Helldar Date: Wed, 15 Feb 2023 12:54:04 +0300 Subject: [PATCH] Added Laravel 10 support --- .github/workflows/code-style.yml | 35 +++++++++++++++++++ .github/workflows/laravel-8.yml | 31 ---------------- .github/workflows/laravel-9.yml | 31 ---------------- .github/workflows/lint-check.yml | 14 -------- .github/workflows/lint-fixer.yml | 19 ---------- .../workflows/{laravel-7.yml => phpunit.yml} | 26 +++++++++++--- composer.json | 6 ++-- 7 files changed, 59 insertions(+), 103 deletions(-) create mode 100644 .github/workflows/code-style.yml delete mode 100644 .github/workflows/laravel-8.yml delete mode 100644 .github/workflows/laravel-9.yml delete mode 100644 .github/workflows/lint-check.yml delete mode 100644 .github/workflows/lint-fixer.yml rename .github/workflows/{laravel-7.yml => phpunit.yml} (50%) diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml new file mode 100644 index 0000000..665db2e --- /dev/null +++ b/.github/workflows/code-style.yml @@ -0,0 +1,35 @@ +name: code-style + +on: + push: + pull_request: + +permissions: write-all + +jobs: + check: + if: ${{ ! (github.event_name == 'push' && github.ref == 'refs/heads/main') }} + + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Checking PHP Syntax + uses: TheDragonCode/codestyler@v2.6.2 + + fix: + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} + + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Checking PHP Syntax + uses: TheDragonCode/codestyler@v2.6.2 + with: + github_token: ${{ secrets.COMPOSER_TOKEN }} + fix: true diff --git a/.github/workflows/laravel-8.yml b/.github/workflows/laravel-8.yml deleted file mode 100644 index eb1cada..0000000 --- a/.github/workflows/laravel-8.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: "Laravel 8" -on: [ push ] - -jobs: - build: - runs-on: ubuntu-latest - - strategy: - fail-fast: true - matrix: - php: [ "7.4", "8.0", "8.1" ] - laravel: [ "8.0" ] - - name: PHP ${{ matrix.php }} - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv - coverage: none - - - name: Install dependencies - run: composer require --dev laravel/framework:^${{ matrix.laravel }} - - - name: Execute tests - run: sudo vendor/bin/phpunit --colors=always diff --git a/.github/workflows/laravel-9.yml b/.github/workflows/laravel-9.yml deleted file mode 100644 index 9ff3952..0000000 --- a/.github/workflows/laravel-9.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: "Laravel 9" -on: [ push ] - -jobs: - build: - runs-on: ubuntu-latest - - strategy: - fail-fast: true - matrix: - php: [ "8.0", "8.1" ] - laravel: [ "9.0" ] - - name: PHP ${{ matrix.php }} - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv - coverage: none - - - name: Install dependencies - run: composer require --dev laravel/framework:^${{ matrix.laravel }} - - - name: Execute tests - run: sudo vendor/bin/phpunit --colors=always diff --git a/.github/workflows/lint-check.yml b/.github/workflows/lint-check.yml deleted file mode 100644 index cf847b8..0000000 --- a/.github/workflows/lint-check.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: "Code-Style Check" - -on: [ push, pull_request ] - -jobs: - check: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Checking PHP Syntax - uses: TheDragonCode/codestyler@v2.6.2 diff --git a/.github/workflows/lint-fixer.yml b/.github/workflows/lint-fixer.yml deleted file mode 100644 index 1663da7..0000000 --- a/.github/workflows/lint-fixer.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: "Code-Style Fixer" - -on: - push: - branches: [ main ] - -jobs: - fix: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Checking PHP Syntax - uses: TheDragonCode/codestyler@v2.6.2 - with: - github_token: ${{ secrets.COMPOSER_TOKEN }} - fix: true diff --git a/.github/workflows/laravel-7.yml b/.github/workflows/phpunit.yml similarity index 50% rename from .github/workflows/laravel-7.yml rename to .github/workflows/phpunit.yml index 8864980..bf42620 100644 --- a/.github/workflows/laravel-7.yml +++ b/.github/workflows/phpunit.yml @@ -1,4 +1,5 @@ -name: "Laravel 7" +name: phpunit + on: [ push ] jobs: @@ -8,10 +9,25 @@ jobs: strategy: fail-fast: true matrix: - php: [ "7.4", "8.0" ] - laravel: [ "7.0" ] + php: [ "7.4", "8.0", "8.1", "8.2" ] + laravel: [ "7.0", "8.0", "9.0", "10.0" ] + exclude: + - laravel: "7.0" + php: "8.1" + + - laravel: "7.0" + php: "8.2" + + - laravel: "9.0" + php: "7.4" + + - laravel: "10.0" + php: "7.4" + + - laravel: "10.0" + php: "8.0" - name: PHP ${{ matrix.php }} + name: PHP ${{ matrix.php }}, Laravel ${{ matrix.laravel }} steps: - name: Checkout code @@ -28,4 +44,4 @@ jobs: run: composer require --dev laravel/framework:^${{ matrix.laravel }} - name: Execute tests - run: sudo vendor/bin/phpunit --colors=always + run: sudo vendor/bin/phpunit diff --git a/composer.json b/composer.json index 7fc9858..51a3831 100644 --- a/composer.json +++ b/composer.json @@ -42,12 +42,12 @@ "require": { "php": "^7.4 || ^8.0", "fig/http-message-util": "^1.1", - "illuminate/routing": "^7.0 || ^8.0 || ^9.0" + "illuminate/routing": "^7.0 || ^8.0 || ^9.0 || ^10.0" }, "require-dev": { "dragon-code/extended-routes": "^3.1", - "orchestra/testbench": "^5.0 || ^6.0 || ^7.0", - "phpunit/phpunit": "^9.5" + "orchestra/testbench": "^5.0 || ^6.0 || ^7.0 || ^8.0", + "phpunit/phpunit": "^9.6" }, "minimum-stability": "stable", "prefer-stable": true,