Skip to content

ВСК-35 Добавление pre-commit #314

ВСК-35 Добавление pre-commit

ВСК-35 Добавление pre-commit #314

Workflow file for this run

name: fastapi-app workflow
on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]
workflow_dispatch:
jobs:
tests:
runs-on: ubuntu-latest
name: Lint and Pytest
steps:
- name: Check out source repository
uses: actions/checkout@v3
- name: Set up Python environment
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: flake8 Lint
uses: py-actions/flake8@v2
with:
path: "app"
args: "--config setup.cfg"
- uses: isort/isort-action@master
with:
configuration: .setup.cfg
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r app/requirements.txt
- name: Test with pytest
env:
EMAIL_FROM: ${{ secrets.EMAIL_FROM }}
EMAIL_HOST: ${{ secrets.EMAIL_HOST }}
EMAIL_PORT: ${{ secrets.EMAIL_PORT }}
EMAIL_HOST_USER: ${{ secrets.EMAIL_HOST_USER }}
EMAIL_HOST_PASSWORD: ${{ secrets.EMAIL_HOST_PASSWORD }}
run: |
pytest