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-9.yml b/.github/workflows/laravel-9.yml deleted file mode 100644 index 82629f9..0000000 --- a/.github/workflows/laravel-9.yml +++ /dev/null @@ -1,32 +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-8.yml b/.github/workflows/phpunit.yml similarity index 58% rename from .github/workflows/laravel-8.yml rename to .github/workflows/phpunit.yml index 11a32f0..c2f728b 100644 --- a/.github/workflows/laravel-8.yml +++ b/.github/workflows/phpunit.yml @@ -1,4 +1,4 @@ -name: "Laravel 8" +name: phpunit on: [ push ] @@ -9,10 +9,14 @@ jobs: strategy: fail-fast: true matrix: - php: [ "8.0", "8.1" ] - laravel: [ "8.0" ] + php: [ "8.0", "8.1", "8.2" ] + laravel: [ "8.0", "9.0", "10.0" ] + dragon: [ "5.8", "6.0" ] + exclude: + - laravel: "10.0" + php: "8.0" - name: PHP ${{ matrix.php }} + name: PHP ${{ matrix.php }}, Laravel ${{ matrix.laravel }}, Dragon ${{ matrix.dragon }} steps: - name: Checkout code @@ -26,7 +30,7 @@ jobs: coverage: none - name: Install dependencies - run: composer require --dev laravel/framework:^${{ matrix.laravel }} + run: composer require --dev laravel/framework:^${{ matrix.laravel }} dragon-code/support:^${{ matrix.dragon }} - name: Execute tests - run: sudo vendor/bin/phpunit --colors=always + run: sudo vendor/bin/phpunit diff --git a/composer.json b/composer.json index f3a9a20..5102c3a 100644 --- a/composer.json +++ b/composer.json @@ -48,16 +48,16 @@ "php": "^8.0", "doctrine/dbal": "^3.3", "dragon-code/support": "^5.8 || ^6.0", - "illuminate/contracts": "^8.37 || ^9.0", - "illuminate/database": "^8.37 || ^9.0", - "illuminate/http": "^8.37 || ^9.0", - "illuminate/routing": "^8.37 || ^9.0", - "illuminate/support": "^8.37 || ^9.0" + "illuminate/contracts": "^8.37 || ^9.0 || ^10.0", + "illuminate/database": "^8.37 || ^9.0 || ^10.0", + "illuminate/http": "^8.37 || ^9.0 || ^10.0", + "illuminate/routing": "^8.37 || ^9.0 || ^10.0", + "illuminate/support": "^8.37 || ^9.0 || ^10.0" }, "require-dev": { "mockery/mockery": "^1.5", - "orchestra/testbench": "^6.0 || ^7.0", - "phpunit/phpunit": "^9.5" + "orchestra/testbench": "^6.0 || ^7.0 || ^8.0", + "phpunit/phpunit": "^9.6" }, "minimum-stability": "stable", "prefer-stable": true,