Skip to content

Commit

Permalink
Merge pull request #45 from php-casbin/develop
Browse files Browse the repository at this point in the history
ci: thinkphp8.0.3 already supports psr2.0
  • Loading branch information
leeqvip authored Oct 20, 2023
2 parents e9af573 + d40aa59 commit 9aabaa5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 31 deletions.
35 changes: 5 additions & 30 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down

0 comments on commit 9aabaa5

Please sign in to comment.