Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Commit

Permalink
ci: add code coverity
Browse files Browse the repository at this point in the history
  • Loading branch information
hanhxiao committed Jul 11, 2019
1 parent b6c4e84 commit c8b5b7d
Showing 1 changed file with 79 additions and 79 deletions.
158 changes: 79 additions & 79 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -1,81 +1,81 @@
#kind: pipeline
#name: default
#
#clone:
# depth: 50
#
#steps:
#
#- name: notify the start on wechat work
# image: byrnedo/alpine-curl
# environment:
# BOT_URL:
# from_secret: BOT_URL
# commands:
# - export MSG_LINK=${DRONE_BUILD_LINK}
# - export MSG_TITLE="⌛🏗 Start a CI pipeline \`$DRONE_SOURCE_BRANCH\`(\`${DRONE_BUILD_NUMBER}\`)"
# - export MSG_CONTENT="submit by [$DRONE_COMMIT_AUTHOR]($DRONE_COMMIT_AUTHOR_EMAIL), click the link below to see the status"
# - ./shell/push-wechatwork.sh
#
#- name: check commit style
# image: node:alpine
# commands:
# - npm install --global --save-dev @commitlint/config-conventional @commitlint/cli
# - "echo \"module.exports = {extends: ['@commitlint/config-conventional']}\" > commitlint.config.js"
# - echo $DRONE_COMMIT_MESSAGE | commitlint
#
#- name: setup ci environment
# image: gnes/ci-base
# commands:
# - mkdir -p .cache && ln -snf $(pwd)/.cache $HOME/.cache
# - export PIP_DOWNLOAD_CACHE=${pwd}.cache/pip_download_cache && export XDG_CACHE_HOME=${pwd}.cache/pip
# - printf "XDG_CACHE_HOME=$XDG_CACHE_HOME\nPIP_DOWNLOAD_CACHE=$PIP_DOWNLOAD_CACHE\n"
# - cat /proc/cpuinfo | grep flags
# - "python -c 'import tensorflow as tf; print(tf.__version__); a=tf.constant(1, tf.int32); print(tf.Session().run(a))'"
#
#- name: pip-install gnes
# image: gnes/ci-base
# environment:
# GNES_ENV_SET: orange-ci
# commands:
# - pip install -e .[all]
# - pylint gnes/**/*.py --exit-zero
# - python -m unittest tests/*.py
#
#
#- name: notify the sucess on wechat work
# image: byrnedo/alpine-curl
# environment:
# BOT_URL:
# from_secret: BOT_URL
# commands:
# - export MSG_LINK=$DRONE_REPO_LINK
# - export MSG_TITLE="✅😃 All tests passed, good job! \`$DRONE_SOURCE_BRANCH\`(\`${DRONE_BUILD_NUMBER}\`)"
# - export MSG_CONTENT="the branch \`$DRONE_SOURCE_BRANCH\` submit by [$DRONE_COMMIT_AUTHOR]($DRONE_COMMIT_AUTHOR_EMAIL) is ready to merge to master"
# - ./shell/push-wechatwork.sh
#
#
#- name: notify the failure on wechat work
# image: byrnedo/alpine-curl
# environment:
# BOT_URL:
# from_secret: BOT_URL
# commands:
# - export MSG_LINK=$DRONE_BUILD_LINK
# - export MSG_TITLE="❌😥 CI pipeline \`$DRONE_SOURCE_BRANCH\`(\`${DRONE_BUILD_NUMBER}\`) is failed!"
# - export MSG_CONTENT="please inform [$DRONE_COMMIT_AUTHOR]($DRONE_COMMIT_AUTHOR_EMAIL) to modify and fix [\`$DRONE_SOURCE_BRANCH\`]($DRONE_COMMIT_LINK). click the link below to see the details."
# - ./shell/push-wechatwork.sh
# when:
# status:
# - failure
#
#trigger:
# branch:
# - master
# event:
# - pull_request
#
#---
kind: pipeline
name: default

clone:
depth: 50

steps:

- name: notify the start on wechat work
image: byrnedo/alpine-curl
environment:
BOT_URL:
from_secret: BOT_URL
commands:
- export MSG_LINK=${DRONE_BUILD_LINK}
- export MSG_TITLE="⌛🏗 Start a CI pipeline \`$DRONE_SOURCE_BRANCH\`(\`${DRONE_BUILD_NUMBER}\`)"
- export MSG_CONTENT="submit by [$DRONE_COMMIT_AUTHOR]($DRONE_COMMIT_AUTHOR_EMAIL), click the link below to see the status"
- ./shell/push-wechatwork.sh

- name: check commit style
image: node:alpine
commands:
- npm install --global --save-dev @commitlint/config-conventional @commitlint/cli
- "echo \"module.exports = {extends: ['@commitlint/config-conventional']}\" > commitlint.config.js"
- echo $DRONE_COMMIT_MESSAGE | commitlint

- name: setup ci environment
image: gnes/ci-base
commands:
- mkdir -p .cache && ln -snf $(pwd)/.cache $HOME/.cache
- export PIP_DOWNLOAD_CACHE=${pwd}.cache/pip_download_cache && export XDG_CACHE_HOME=${pwd}.cache/pip
- printf "XDG_CACHE_HOME=$XDG_CACHE_HOME\nPIP_DOWNLOAD_CACHE=$PIP_DOWNLOAD_CACHE\n"
- cat /proc/cpuinfo | grep flags
- "python -c 'import tensorflow as tf; print(tf.__version__); a=tf.constant(1, tf.int32); print(tf.Session().run(a))'"

- name: pip-install gnes
image: gnes/ci-base
environment:
GNES_ENV_SET: orange-ci
commands:
- pip install -e .[all]
- pylint gnes/**/*.py --exit-zero
- python -m unittest tests/*.py


- name: notify the sucess on wechat work
image: byrnedo/alpine-curl
environment:
BOT_URL:
from_secret: BOT_URL
commands:
- export MSG_LINK=$DRONE_REPO_LINK
- export MSG_TITLE="✅😃 All tests passed, good job! \`$DRONE_SOURCE_BRANCH\`(\`${DRONE_BUILD_NUMBER}\`)"
- export MSG_CONTENT="the branch \`$DRONE_SOURCE_BRANCH\` submit by [$DRONE_COMMIT_AUTHOR]($DRONE_COMMIT_AUTHOR_EMAIL) is ready to merge to master"
- ./shell/push-wechatwork.sh


- name: notify the failure on wechat work
image: byrnedo/alpine-curl
environment:
BOT_URL:
from_secret: BOT_URL
commands:
- export MSG_LINK=$DRONE_BUILD_LINK
- export MSG_TITLE="❌😥 CI pipeline \`$DRONE_SOURCE_BRANCH\`(\`${DRONE_BUILD_NUMBER}\`) is failed!"
- export MSG_CONTENT="please inform [$DRONE_COMMIT_AUTHOR]($DRONE_COMMIT_AUTHOR_EMAIL) to modify and fix [\`$DRONE_SOURCE_BRANCH\`]($DRONE_COMMIT_LINK). click the link below to see the details."
- ./shell/push-wechatwork.sh
when:
status:
- failure

trigger:
branch:
- master
event:
- pull_request

---

kind: pipeline
name: master-coverity
Expand Down Expand Up @@ -137,4 +137,4 @@ trigger:
branch:
- master
event:
- pull_request
- push

0 comments on commit c8b5b7d

Please sign in to comment.