Skip to content

Changed environment

Changed environment #7

Workflow file for this run

name: Backend API
on:
push:
paths:
- "backend/**"
- ".github/workflows/backend.yml"
jobs:
test: # new
strategy:
fail-fast: false
matrix:
python-version: [3.10]
poetry-version: [1.7.1]
os: [windows-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: backend/
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install dependencies
run: poetry install
# - name: Run tests
# run: poetry run pytest tests.py --cov=./ --cov-report=xml
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
code-quality:
strategy:
fail-fast: false
matrix:
python-version: [3.10]
poetry-version: [1.7.1]
os: [windows-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: backend/
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install dependencies
run: poetry install
# - name: Run automatically format code if not formatted
# run: bash format_code.sh
- name: Run black
run: poetry run black .
- name: Run isort
run: poetry run isort . --profile black
- name: Run flake8
run: poetry run flake8 .
- name: Run bandit
run: poetry run bandit .