Skip to content

fix github actions for backend #7

fix github actions for backend

fix github actions for backend #7

Workflow file for this run

# https://docs.github.com/en/free-pro-team@latest/actions/guides/building-and-testing-python
name: py3
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
py3:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r source/default/requirements.txt
pip install -r source/backend/requirements.txt
pip install -r tests/requirements.txt
- name: flake8
run: |
flake8 --count --show-source --statistics source
flake8 --count --show-source --statistics tests/test
- name: pylint
run: |
python -m pylint source
python -m pylint tests/test
- name: pytest
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
run: |
pytest --cov=source --cov-report xml --cov-report term:skip-covered --durations=5 tests
if [ "$CODACY_PROJECT_TOKEN" != "" ]; then
python-codacy-coverage -r coverage.xml
fi