diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-09-28 21:10:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-28 21:10:40 +0200 |
commit | 2eaa2791b75f7c2c8c7892a5354f6e93fedaf396 (patch) | |
tree | 53228899fd168de9c6052707b20dd648bf0c7f41 | |
parent | f4eee1d3a543bdd1c424a96bdd58fd2101ebe578 (diff) | |
parent | b85b6abda86b3dc238bcba9475ef73f142dc075b (diff) | |
download | nextcloud-server-2eaa2791b75f7c2c8c7892a5354f6e93fedaf396.tar.gz nextcloud-server-2eaa2791b75f7c2c8c7892a5354f6e93fedaf396.zip |
Merge pull request #1561 from nextcloud/codecov
Add codecov
-rw-r--r-- | .codecov.yml | 11 | ||||
-rw-r--r-- | .drone.yml | 12 | ||||
-rw-r--r-- | build/signed-off-checker.php | 6 |
3 files changed, 28 insertions, 1 deletions
diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 00000000000..c974c0998cd --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,11 @@ +codecov: + branch: master + +coverage: + precision: 2 + round: down + range: "70...100" + +comment: + layout: "header, diff, changes, sunburst, uncovered, tree" + behavior: default diff --git a/.drone.yml b/.drone.yml index 3e50be209b6..a3c3870dcdd 100644 --- a/.drone.yml +++ b/.drone.yml @@ -301,10 +301,21 @@ pipeline: when: matrix: TESTS: integration-sharees-features + codecov: + image: nextcloudci/php7.0:php7.0-2 + commands: + - TEST_SELECTION=NODB ./autotest.sh sqlite + - wget https://codecov.io/bash -O codecov.sh + - sh -c "if [ '$DRONE_BUILD_EVENT' = 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -P $DRONE_PULL_REQUEST -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-clover-sqlite.xml; fi" + - sh -c "if [ '$DRONE_BUILD_EVENT' != 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-clover-sqlite.xml; fi" + when: + matrix: + TESTS: codecov matrix: include: - TESTS: signed-off-check + - TESTS: codecov - TESTS: integration-capabilities_features - TESTS: integration-federation_features - TESTS: integration-auth @@ -369,4 +380,3 @@ services: when: matrix: DB: mysql - diff --git a/build/signed-off-checker.php b/build/signed-off-checker.php index d4aaf044481..49890cb0f3d 100644 --- a/build/signed-off-checker.php +++ b/build/signed-off-checker.php @@ -30,6 +30,12 @@ $baseDir = __DIR__ . '/../'; $pullRequestNumber = getenv('DRONE_PULL_REQUEST'); $repoOwner = getenv('DRONE_REPO_OWNER'); $repoName = getenv('DRONE_REPO_NAME'); +$droneEvent = getenv('DRONE_BUILD_EVENT'); + +if(is_string($droneEvent) && $droneEvent === 'push') { + echo("Push event - no signed-off check required.\n"); + exit(0); +} if(!is_string($pullRequestNumber) || $pullRequestNumber === '') { echo("The environment variable DRONE_PULL_REQUEST has no proper value.\n"); |