2022-05-03 10:57:20 +00:00
|
|
|
---
|
|
|
|
################
|
|
|
|
# Build & Test #
|
|
|
|
################
|
|
|
|
|
|
|
|
kind: pipeline
|
|
|
|
name: test
|
|
|
|
|
2022-05-14 06:22:39 +00:00
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: arm64
|
|
|
|
|
|
|
|
services:
|
2022-05-13 07:28:13 +00:00
|
|
|
- name: setup-database
|
2022-05-14 06:22:39 +00:00
|
|
|
image: mongo:5
|
|
|
|
|
|
|
|
steps:
|
2022-05-04 13:04:44 +00:00
|
|
|
- name: test
|
2022-05-03 11:05:28 +00:00
|
|
|
image: node:16
|
2022-05-03 10:57:20 +00:00
|
|
|
commands:
|
|
|
|
- yarn install
|
2022-05-16 05:25:50 +00:00
|
|
|
- env CI=1 yarn test
|
2022-05-04 13:04:44 +00:00
|
|
|
- name: notify
|
2022-05-03 10:57:20 +00:00
|
|
|
image: appleboy/drone-telegram
|
|
|
|
when:
|
|
|
|
status:
|
|
|
|
- success
|
|
|
|
- failure
|
|
|
|
settings:
|
|
|
|
token:
|
|
|
|
from_secret: telegram_token
|
2022-05-03 11:10:19 +00:00
|
|
|
to: -1001605162182
|
2022-05-03 10:57:20 +00:00
|
|
|
format: markdown
|
|
|
|
message: >
|
|
|
|
{{#success build.status}}
|
2022-05-13 07:28:13 +00:00
|
|
|
✅ `{{repo.name}}` #{{build.number}} 号构建测试已通过
|
|
|
|
|
|
|
|
📝 {{commit.author}} 在 `{{commit.branch}}` 的提交:
|
|
|
|
|
2022-05-03 10:57:20 +00:00
|
|
|
```
|
|
|
|
{{commit.message}}
|
|
|
|
```
|
2022-05-13 07:28:13 +00:00
|
|
|
|
|
|
|
🌐 {{ build.link }}
|
2022-05-03 10:57:20 +00:00
|
|
|
{{else}}
|
2022-05-13 07:28:13 +00:00
|
|
|
❌ `{{repo.name}}` #{{build.number}} 号构建测试已失败
|
|
|
|
|
|
|
|
📝 {{commit.author}} 在 `{{commit.branch}}` 的提交:
|
|
|
|
|
2022-05-03 10:57:20 +00:00
|
|
|
```
|
|
|
|
{{commit.message}}
|
|
|
|
```
|
2022-05-13 07:28:13 +00:00
|
|
|
|
|
|
|
🌐 {{ build.link }}
|
|
|
|
{{/success}}
|