-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (34 loc) · 1.07 KB
/
node.js.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Node.js CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
unit-tests:
name: 🧪 Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install yarn
uses: borales/actions-yarn@v4
with:
cmd: install
- run: yarn test
fail-report:
if: ${{ failure() }}
needs: unit-tests
runs-on: ubuntu-latest
steps:
- name: Send Telegram message with fail report
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.CI_TELEGRAM_TO }}
token: ${{ secrets.CI_TELEGRAM_TOKEN }}
format: markdown
message: |
❌ **${{ github.repository }}** - Workflow: ${{ github.workflow }}
[Actions](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for commit "[${{ github.event.commits[0].message }}](https://github.com/${{ github.repository }}/commit/${{github.sha}})" (${{github.actor}})