Files
2021-06-13 18:36:39 +08:00

82 lines
1.8 KiB
YAML

kind: pipeline
name: default
steps:
# - name: restore-cache
# image: drillster/drone-volume-cache
# volumes:
# - name: cache
# path: /cache
# settings:
# restore: true
# mount:
# - ./node_modules
- name: build
image: node:lts-alpine
commands:
- npm set config package-lock false
- npm install
- npm test
- name: coveralls
pull: true
image: lizheming/drone-coveralls
environment:
COVERALLS_REPO_TOKEN:
from_secret: coveralls_token
settings:
debug: true
files:
- coverage/lcov.info
# - name: code analysis
# image: jgentry/drone-sonar
# environment:
# sonar_host: "https://sonarcloud.io"
# sonar_login:
# from_secret: sonar_token
# - name: rebuild-cache
# image: drillster/drone-volume-cache
# volumes:
# - name: cache
# path: /cache
# settings:
# rebuild: true
# mount:
# - ./node_modules
# - name: wechat
# image: lizheming/drone-wechat
# pull: always
# settings:
# title: >
# {% if success %}
# ✅ {{repo.owner}}/{{repo.name}} 第 {{build.number}} 次构建成功!
# {% else %}
# ❌ {{repo.owner}}/{{repo.name}} 第 {{build.number}} 次构建失败了,快来修理下吧。
# {% endif %}
# corpid:
# from_secret: corpid
# corp_secret:
# from_secret: corp_secret
# agent_id:
# from_secret: agent_id
# to_user: "@all"
# message: >
# {% if success %}
# 😊主人,{{repo.owner}}/{{repo.name}}第{{build.number}}次构建成功!
# {% else %}
# 😭主人,{{repo.owner}}/{{repo.name}}第{{build.number}}次构建失败了,快来修理下吧。
# {% endif %}
# when:
# status:
# - success
# - failure
# volumes:
# - name: cache
# host:
# path: /tmp/cache