Skip to content

Commit 73619fa

Browse files
authored
Merge pull request #358 from qiniu/test-ci
Create test-ci.yml
2 parents 0a461e1 + 6d244f1 commit 73619fa

File tree

4 files changed

+47
-32
lines changed

4 files changed

+47
-32
lines changed

.github/workflows/test-ci.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: PHP CI with Composer
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- '**.md'
7+
8+
jobs:
9+
build:
10+
strategy:
11+
fail-fast: false
12+
max-parallel: 1
13+
matrix:
14+
php-versions: ['5.4', '5.5', '5.6', '7.0']
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
20+
- name: Setup php
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: ${{ matrix.php-versions }}
24+
25+
- name: Install dependencies
26+
run: |
27+
composer self-update
28+
composer install --no-interaction --prefer-source --dev
29+
30+
- name: Run cases
31+
run: |
32+
./vendor/bin/phpcs --standard=PSR2 src
33+
./vendor/bin/phpcs --standard=PSR2 examples
34+
./vendor/bin/phpcs --standard=PSR2 tests
35+
./vendor/bin/phpunit --coverage-clover=coverage.xml
36+
37+
env:
38+
QINIU_ACCESS_KEY: ${{ secrets.QINIU_ACCESS_KEY }}
39+
QINIU_SECRET_KEY: ${{ secrets.QINIU_SECRET_KEY }}
40+
QINIU_TEST_BUCKET: ${{ secrets.QINIU_TEST_BUCKET }}
41+
QINIU_TEST_DOMAIN: ${{ secrets.QINIU_TEST_DOMAIN }}
42+
43+
- name: After_success
44+
run: bash <(curl -s https://codecov.io/bash)

.travis.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
},
1818
"require-dev": {
1919
"phpunit/phpunit": "~4.0",
20-
"squizlabs/php_codesniffer": "~2.3"
20+
"squizlabs/php_codesniffer": "~3.6"
2121
},
2222
"autoload": {
2323
"psr-4": {"Qiniu\\": "src/Qiniu"},
2424
"files": ["src/Qiniu/functions.php"]
2525
}
26-
}
26+
}

examples/upload_multi_demos.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
$policy = array(
5050
'callbackUrl' => 'http://172.30.251.210/upload_verify_callback.php',
5151
'callbackBody' => 'filename=$(fname)&filesize=$(fsize)'
52-
// 'callbackBodyType' => 'application/json',
52+
// 'callbackBodyType' => 'application/json',
5353
// 'callbackBody' => '{"filename":$(fname), "filesize": $(fsize)}' //设置application/json格式回调
5454
);
5555
$token = $auth->uploadToken($bucket, null, 3600, $policy);

0 commit comments

Comments
 (0)