--- ################ # Build & Test # ################ kind: pipeline name: test steps: - name: test image: node:16 commands: - yarn install - 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}} 号构建测试已通过\n 📝 {{commit.author}} 在 `{{commit.branch}}` 的提交:\n ``` {{commit.message}} ``` \n🌐 {{ build.link }} {{else}} ❌ `{{repo.name}}` #{{build.number}} 号构建测试已失败\n 📝 {{commit.author}} 在 `{{commit.branch}}` 的提交:\n ``` {{commit.message}} ``` \n🌐 {{ build.link }} {{/success}}