Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add: [Actions] flake8, black, and docker build tests (#2)
Currently this doesn't do anything of course, but this allows for later Pull Request to be validated before merge.
- Loading branch information
Showing
3 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
FROM python:3.8-slim | ||
|