-
Notifications
You must be signed in to change notification settings - Fork 0
28 lines (26 loc) · 967 Bytes
/
_unit-test.yml
File metadata and controls
28 lines (26 loc) · 967 Bytes
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
name: 'Unit test'
on:
workflow_call:
jobs:
unit-test:
name: "/"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: technology-studio/github-workflows/.github/actions/install-dependencies@main
- run: yarn test --coverage
- id: check-dir
run: |
if [[ -d "coverage" ]]; then
echo "::set-output name=exists::true"
else
echo "::set-output name=exists::false"
fi
- if: steps.check-dir.outputs.exists == 'true'
uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5
- name: Send a Slack message on failure
if: failure()
uses: technology-studio/github-workflows/.github/actions/slack-failed-job-message@main
with:
slack_bot_token: ${{ secrets.TXO_SLACK_BOT_APP_TOKEN }}
channel_id: ${{ secrets.TXO_SLACK_GITHUB_OPS_CHANNEL_ID }}