Skip to content

Issue174WIP

Issue174WIP #107

Workflow file for this run

name: Backend CI
on:
push:
branches:
- main
- docker-main
pull_request:
branches:
- main
- docker-main
jobs:
backend-setup:
runs-on: windows-latest
strategy:
matrix:
python-version: [3.10]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Cache pip dependencies
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r backend/requirements.txt
- name: Lint backend code
run: |
pip install flake8
flake8 backend/ --max-line-length 160 --ignore E127,E251,E302,E501,E261,E262,E265,F401,F403,F405,F841,W293,E128,E303,E305,W292,E122,W391,E111,E117,E301,E125,E222,E226,E201,E203,E202,E721,W503,W504,E272,E126,E225,W291,E211,E231,E722,W191,E712,F523,E402,E306
- name: Format backend code with Black
run: |
pip install black
black backend/
- name: Perform Dependency Audit
run: |
pip install safety
safety check -r backend/requirements.txt