Skip to content

Commit

Permalink
Add: [Actions] flake8, black, and docker build tests (#2)
Browse files Browse the repository at this point in the history
Currently this doesn't do anything of course, but this allows for
later Pull Request to be validated before merge.
  • Loading branch information
TrueBrain committed Mar 14, 2020
1 parent bd7013d commit fca0179
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .flake8
@@ -0,0 +1,8 @@
[flake8]
max-line-length = 120
inline-quotes = double

# We use 'black' for coding style; these next two warnings are not PEP-8
# compliant.
# E231 is a bug in 'black', see https://github.com/psf/black/issues/1202
ignore = E203, E231, W503
44 changes: 44 additions & 0 deletions .github/workflows/testing.yml
@@ -0,0 +1,44 @@
name: Testing

on:
push:
branches:
- master
pull_request:

jobs:
docker:
name: Docker build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: docker build .

flake8:
name: Flake8
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Flake8
uses: TrueBrain/actions-flake8@master
with:
path: content_api

black:
name: Black
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Black
run: |
python -m pip install --upgrade pip
pip install black
black -l 120 --check content_api
2 changes: 2 additions & 0 deletions Dockerfile
@@ -0,0 +1,2 @@
FROM python:3.8-slim

0 comments on commit fca0179

Please sign in to comment.