框架升级及修复升级后的bug
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
name: CI
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
phpunit:
|
||||
name: PHPUnit (PHP ${{ matrix.php-version }} on ${{ matrix.operating-system }})
|
||||
runs-on: ${{ matrix.operating-system }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
operating-system: [ubuntu-latest, windows-latest]
|
||||
php-version: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
|
||||
steps:
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-version }}
|
||||
extensions: curl, mbstring, openssl, xml
|
||||
coverage: none
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: composer install --ansi --prefer-dist --no-interaction --no-progress
|
||||
|
||||
- name: PHPUnit Migrate Configuration
|
||||
if: ${{ matrix.php-version >= '8.0' }}
|
||||
run: vendor/bin/phpunit --migrate-configuration
|
||||
|
||||
- name: Run Unit Tests (PHP 5.6 - 8.0)
|
||||
if: ${{ matrix.php-version < '8.1' }}
|
||||
run: vendor/bin/phpunit --testsuite UnitTest
|
||||
env:
|
||||
PHP_ERROR_REPORTING: E_ALL
|
||||
|
||||
- name: Run Unit Tests (PHP 8.1+)
|
||||
if: ${{ matrix.php-version >= '8.1' }}
|
||||
run: vendor/bin/phpunit --testsuite UnitTest --fail-on-deprecation --display-deprecations
|
||||
env:
|
||||
PHP_ERROR_REPORTING: E_ALL
|
||||
@@ -0,0 +1,35 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
build-phar:
|
||||
name: Build PHAR
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '7.4'
|
||||
extensions: phar, curl, mbstring, openssl, xml
|
||||
tools: phar-composer
|
||||
|
||||
- name: Install dependencies
|
||||
run: composer install --no-dev --prefer-dist --no-interaction --no-progress
|
||||
|
||||
- name: Build PHAR
|
||||
run: |
|
||||
version=$(grep 'const OSS_VERSION' src/OSS/OssClient.php | grep -oE '[0-9.]+')
|
||||
phar-composer build . aliyun-oss-php-sdk-${version}.phar
|
||||
|
||||
- name: Upload to Release
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
version=$(grep 'const OSS_VERSION' src/OSS/OssClient.php | grep -oE '[0-9.]+')
|
||||
gh release upload ${{ github.event.release.tag_name }} aliyun-oss-php-sdk-${version}.phar
|
||||
Reference in New Issue
Block a user