diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 51bce92..429923b 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -19,26 +19,9 @@ jobs: strategy: fail-fast: true matrix: - include: - # ThinkPHP 6.* - - php: 7.2 - thinkphp: 6.* - - php: 7.4 - thinkphp: 6.* - - php: 8.0 - thinkphp: 6.* - - php: 8.1 - thinkphp: 6.* + php: [ 7.2, 7.3, 7.4, 8.0, 8.1, 8.2 ] - # ThinkPHP 8.* - - php: 8.0 - thinkphp: 8.* - - php: 8.1 - thinkphp: 8.* - - php: 8.2 - thinkphp: 8.* - - name: ThinkPHP${{ matrix.thinkphp }}-PHP${{ matrix.php }} + name: PHP${{ matrix.php }} steps: - name: Checkout code @@ -51,10 +34,6 @@ jobs: tools: composer:v2 coverage: xdebug - - name: Pre composer - if: matrix.thinkphp == '8.*' - run: composer remove php-coveralls/php-coveralls --dev - - name: Validate composer.json and composer.lock run: composer validate @@ -63,22 +42,18 @@ jobs: uses: actions/cache@v3 with: path: vendor - key: ${{ runner.os }}-${{ matrix.php }}-${{ matrix.thinkphp }}-${{ hashFiles('**/composer.lock') }} + key: ${{ runner.os }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }} restore-keys: | - ${{ runner.os }}-${{ matrix.php }}-${{ matrix.thinkphp }} + ${{ runner.os }}-${{ matrix.php }} - name: Install dependencies if: steps.composer-cache.outputs.cache-hit != 'true' - run: | - composer require topthink/framework:${{ matrix.thinkphp }} --no-update --no-interaction - composer require topthink/think:${{ matrix.thinkphp }} --no-update --no-interaction --dev - composer install --prefer-dist --no-progress --no-suggest + run: composer install --prefer-dist --no-progress --no-suggest - name: Run test suite run: ./vendor/bin/phpunit - name: Run Coveralls - if: matrix.thinkphp != '8.*' env: COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} COVERALLS_PARALLEL: true diff --git a/composer.json b/composer.json index db046c6..40f3767 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "license": "Apache-2.0", "require": { "casbin/casbin": "~3.0", - "topthink/framework": "~6.0|~8.0", + "topthink/framework": "~6.0|^8.0.3", "topthink/think-migration": "^3.1.0", "casbin/psr3-bridge": "^1.1" },