You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.0 KiB
55 lines
1.0 KiB
--- |
|
################ |
|
# Build & Test # |
|
################ |
|
|
|
kind: pipeline |
|
name: test |
|
|
|
platform: |
|
os: linux |
|
arch: arm64 |
|
|
|
services: |
|
- name: setup-database |
|
image: mongo:5 |
|
|
|
steps: |
|
- name: test |
|
image: node:16 |
|
commands: |
|
- yarn install |
|
- env CI=1 yarn test |
|
- name: notify |
|
image: appleboy/drone-telegram |
|
when: |
|
status: |
|
- success |
|
- failure |
|
settings: |
|
token: |
|
from_secret: telegram_token |
|
to: -1001605162182 |
|
format: markdown |
|
message: > |
|
{{#success build.status}} |
|
✅ `{{repo.name}}` #{{build.number}} 号构建测试已通过 |
|
|
|
📝 {{commit.author}} 在 `{{commit.branch}}` 的提交: |
|
|
|
``` |
|
{{commit.message}} |
|
``` |
|
|
|
🌐 {{ build.link }} |
|
{{else}} |
|
❌ `{{repo.name}}` #{{build.number}} 号构建测试已失败 |
|
|
|
📝 {{commit.author}} 在 `{{commit.branch}}` 的提交: |
|
|
|
``` |
|
{{commit.message}} |
|
``` |
|
|
|
🌐 {{ build.link }} |
|
{{/success}} |