Skip to content

flake8

flake8 #677

Workflow file for this run

name: Test
on: [push]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:11.16
env:
POSTGRES_DB: contentrepo
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
env:
CONTENTREPO_DATABASE: postgres://postgres:postgres@localhost:5432/contentrepo
strategy:
matrix:
python-version: [3.10.6]
redis-version: [6]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Start Redis
uses: supercharge/redis-github-action@1.2.0
with:
redis-version: ${{ matrix.redis-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
black --check .
flake8 . --count --show-source --statistics
isort -c .
- name: Django Test
run: |
./manage.py test --settings=contentrepo.settings.dev