Skip to content

Commit be646e9

Browse files
authored
Merge pull request #28 from Oneflow/development
Release
2 parents bda8df8 + 5e4ff97 commit be646e9

File tree

8 files changed

+1741
-5
lines changed

8 files changed

+1741
-5
lines changed

.circleci/config.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
version: 2
2+
jobs:
3+
checkout_and_test:
4+
docker:
5+
- image: circleci/php:7.1-node-browsers
6+
steps:
7+
- checkout
8+
- run: sudo docker-php-ext-install zip
9+
- run: sudo composer self-update
10+
- restore_cache: # special step to restore the dependency cache if `composer.lock` does not change
11+
keys:
12+
- composer-v1-{{ checksum "composer.lock" }}
13+
# fallback to using the latest cache if no exact match is found (See https://circleci.com/docs/2.0/caching/)
14+
- composer-v1-
15+
- run: composer install -n --prefer-dist
16+
- save_cache: # special step to save the dependency cache with the `composer.lock` cache key template
17+
key: composer-v1-{{ checksum "composer.lock" }}
18+
paths:
19+
- vendor
20+
- run:
21+
name: run the tests
22+
command: composer test
23+
- run:
24+
name: upload coverage report
25+
command: bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN
26+
- save_cache:
27+
key: v1-source-{{ .Environment.CIRCLE_SHA1 }}
28+
paths:
29+
- ~
30+
31+
workflows:
32+
version: 2
33+
php_coverage:
34+
jobs:
35+
- checkout_and_test:
36+
context: oneflow

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
composer.lock
21
composer.phar
32
vendor/*
43
.DS_Store
54
samples/run.sh
6-
.idea
5+
.idea
6+
coverage
7+
coverage.xml

composer.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,11 @@
1212
],
1313
"autoload": {
1414
"files": ["src/OneflowSDK.php", "src/ProductionSDK.php"]
15+
},
16+
"require-dev": {
17+
"phpunit/phpunit": "^6.5"
18+
},
19+
"scripts": {
20+
"test": "phpunit --bootstrap vendor/autoload.php --testdox --coverage-clover=coverage.xml --coverage-html coverage --whitelist src tests"
1521
}
1622
}

0 commit comments

Comments
 (0)