Skip to content

Frontend optimization #233

Frontend optimization

Frontend optimization #233

Workflow file for this run

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