-
Notifications
You must be signed in to change notification settings - Fork 67
41 lines (34 loc) · 1.11 KB
/
unit-tests.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
39
40
41
name: Unit tests
on:
workflow_dispatch:
pull_request:
paths:
- 'src/backend/**'
env:
# Temporal change to detect actual test errors easily. Then change it to 95
REQUIRED_COVERAGE: 90
jobs:
unit-tests:
name: Unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install and start Redis server
run: |
sudo apt update -y
sudo apt install redis-server -y
sudo systemctl start redis-server
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Python dependencies
run: python3 -m pip install -r src/backend/requirements-dev.txt
- name: Run unit tests
working-directory: src/backend
run: coverage run manage.py test
- name: Check coverage
working-directory: src/backend
run: coverage report -m --skip-covered --omit="tests/*,platforms/telegram_app/bot/*,platforms/telegram_app/framework.py,platforms/**/notifications.py" --fail-under=$REQUIRED_COVERAGE