Skip to content

Aggiornato il funzionamento del Toast su Manager e formattati i docum… #57

Aggiornato il funzionamento del Toast su Manager e formattati i docum…

Aggiornato il funzionamento del Toast su Manager e formattati i docum… #57

Workflow file for this run

name: Backend build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build-backend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 coverage
if [ -f requirements.txt ]; then
pip install -r requirements.txt;
fi
working-directory: "backend"
- name: Linting Codice Python (Flake8)
run: |
flake8 backend/ --count --exit-zero --select=E9,F63,F7,F82 --show-source --max-line-length=127 --statistics
flake8 backend/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run Python tests and generate coverage report
run: |
coverage run -m unittest discover -s tests/ -p "test_*.py"
coverage xml -o tests/coverage.xml
- name: Upload backend coverage report to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: tests/coverage.xml
flags: python
name: backend-coverage