-
Notifications
You must be signed in to change notification settings - Fork 8
46 lines (44 loc) · 1.37 KB
/
tests.yaml
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
39
40
41
42
43
44
45
46
name: Automated tests
on: [pull_request]
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: KengoTODA/actions-setup-docker-compose@v1
with:
version: '2.23.3'
- name: "Running tests"
run: |
cp .env.default .env
echo -e "\nRABBITMQ__USE_SSL=False" >> .env
docker compose up -d
make dtest
on-failure:
runs-on: ubuntu-latest
if: ${{ always() && (needs.tests.result == 'failure' || needs.tests.result == 'timed_out') }}
needs:
- tests
steps:
- uses: actions/checkout@v4
- name: "Send Slack message on failure"
uses: rtCamp/action-slack-notify@v2
env:
SLACK_COLOR: failure
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL_TEST_WORKFLOW }}
SLACK_TITLE: Run Unit Tests
SLACK_MESSAGE: 'Error when executing Unit tests!'
on-success:
runs-on: ubuntu-latest
if: ${{ always() && (needs.tests.result == 'success') }}
needs:
- tests
steps:
- uses: actions/checkout@v4
- name: "Send Slack message on success"
uses: rtCamp/action-slack-notify@v2
env:
SLACK_COLOR: success
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL_TEST_WORKFLOW }}
SLACK_TITLE: Run Unit Tests
SLACK_MESSAGE: 'Unit tests performed successfully!'