-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from DavidWittman/ci-workflow
feat(ci): add github workflow
- Loading branch information
Showing
12 changed files
with
469 additions
and
360 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,35 @@ | ||
name: Python application | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.11" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements-dev.txt | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Test with pytest | ||
run: | | ||
pytest tests.py |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,16 +1,6 @@ | ||
FROM jazzdd/alpine-flask:python3 | ||
FROM unit:1.31.1-python3.11 | ||
LABEL maintainer="David Wittman" | ||
|
||
RUN apk add --no-cache \ | ||
gcc \ | ||
python3-dev \ | ||
musl-dev \ | ||
libffi-dev \ | ||
openssl \ | ||
openssl-dev | ||
|
||
ADD . /app/ | ||
|
||
RUN export CRYPTOGRAPHY_DONT_BUILD_RUST=1 && \ | ||
pip install -r requirements.txt && \ | ||
apk del gcc git python3-dev musl-dev libffi-dev openssl-dev | ||
EXPOSE 8080 | ||
COPY config.json /docker-entrypoint.d/config.json | ||
COPY . /www/ | ||
RUN pip install -r /www/requirements.txt |
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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,15 @@ | ||
{ | ||
"listeners": { | ||
"*:8080": { | ||
"pass": "applications/flask" | ||
} | ||
}, | ||
"applications": { | ||
"flask": { | ||
"type": "python", | ||
"path": "/www/", | ||
"module": "app", | ||
"callable": "app" | ||
} | ||
} | ||
} |
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
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 |
---|---|---|
@@ -1,14 +1,24 @@ | ||
-r requirements.txt | ||
# | ||
# These requirements were autogenerated by pipenv | ||
# To regenerate from the project's Pipfile, run: | ||
# | ||
# pipenv lock --requirements --dev-only | ||
# | ||
|
||
-i https://pypi.org/simple | ||
flake8==4.0.1 | ||
mccabe==0.6.1 | ||
nose==1.3.7 | ||
pycodestyle==2.8.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' | ||
pyflakes==2.4.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' | ||
exceptiongroup==1.2.0; python_version < '3.11' | ||
flake8==7.0.0; python_full_version >= '3.8.1' | ||
iniconfig==2.0.0; python_version >= '3.7' | ||
mccabe==0.7.0; python_version >= '3.6' | ||
packaging==23.2; python_version >= '3.7' | ||
pluggy==1.3.0; python_version >= '3.8' | ||
pycodestyle==2.11.1; python_version >= '3.8' | ||
pyflakes==3.2.0; python_version >= '3.8' | ||
pytest==7.4.4; python_version >= '3.7' | ||
tomli==2.0.1; python_version < '3.11' | ||
blinker==1.7.0; python_version >= '3.8' | ||
cffi==1.16.0; python_version >= '3.8' | ||
click==8.1.7; python_version >= '3.7' | ||
cryptography==41.0.7; python_version >= '3.7' | ||
flask==3.0.0; python_version >= '3.8' | ||
importlib-metadata==7.0.1; python_version < '3.10' | ||
itsdangerous==2.1.2; python_version >= '3.7' | ||
jinja2==3.1.2; python_version >= '3.7' | ||
markupsafe==2.1.3; python_version >= '3.7' | ||
pycparser==2.21 | ||
pyopenssl==23.2.0; python_version >= '3.6' | ||
werkzeug==3.0.1; python_version >= '3.8' | ||
zipp==3.17.0; python_version >= '3.8' |
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 |
---|---|---|
@@ -1,21 +1,14 @@ | ||
# | ||
# These requirements were autogenerated by pipenv | ||
# To regenerate from the project's Pipfile, run: | ||
# | ||
# pipenv lock --requirements | ||
# | ||
|
||
-i https://pypi.org/simple | ||
cffi==1.15.0 | ||
click==8.0.3; python_version >= '3.6' | ||
cryptography==36.0.1; python_version >= '3.6' | ||
flask==2.0.2 | ||
gunicorn==20.1.0 | ||
itsdangerous==2.0.1; python_version >= '3.6' | ||
jinja2==3.0.3; python_version >= '3.6' | ||
markupsafe==2.0.1; python_version >= '3.6' | ||
blinker==1.7.0; python_version >= '3.8' | ||
cffi==1.16.0; python_version >= '3.8' | ||
click==8.1.7; python_version >= '3.7' | ||
cryptography==41.0.7; python_version >= '3.7' | ||
flask==3.0.0; python_version >= '3.8' | ||
importlib-metadata==7.0.1; python_version < '3.10' | ||
itsdangerous==2.1.2; python_version >= '3.7' | ||
jinja2==3.1.2; python_version >= '3.7' | ||
markupsafe==2.1.3; python_version >= '3.7' | ||
pycparser==2.21 | ||
pyopenssl==21.0.0 | ||
setuptools==60.3.1; python_version >= '3.7' | ||
six==1.16.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' | ||
werkzeug==2.0.2; python_version >= '3.6' | ||
pyopenssl==23.2.0; python_version >= '3.6' | ||
werkzeug==3.0.1; python_version >= '3.8' | ||
zipp==3.17.0; python_version >= '3.8' |
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
Oops, something went wrong.