Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unified testing framework #212

Merged
merged 4 commits into from Jan 28, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 0 additions & 21 deletions .github/workflows/mypy.yml

This file was deleted.

19 changes: 19 additions & 0 deletions .github/workflows/test.yml
@@ -0,0 +1,19 @@
name: Test

on:
- push
- pull_request

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install and run Tox
run: pip install tox
- name: Run Tox
run: tox -e py -c netkan
21 changes: 0 additions & 21 deletions .github/workflows/unittest.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -5,3 +5,5 @@
/pr_tester
__pycache__
.mypy_cache/
.eggs
.tox
3 changes: 0 additions & 3 deletions netkan/Dockerfile
Expand Up @@ -3,11 +3,9 @@ RUN useradd -ms /bin/bash netkan
ADD . /netkan
WORKDIR /netkan
RUN pip install pip --upgrade
RUN pip install mypy
RUN chown -R netkan:netkan /netkan
USER netkan
RUN pip install --user . --no-warn-script-location --force-reinstall
RUN mypy .
RUN python -m unittest -v

HebaruSan marked this conversation as resolved.
Show resolved Hide resolved
FROM python:3.7 as production
Expand All @@ -29,7 +27,6 @@ RUN chown -R netkan:netkan /netkan
ADD run_dev.sh /usr/local/bin/
USER netkan
RUN pip install --user /netkan/.[development]
RUN pip install --user /netkan/.[test]
ENTRYPOINT ["/usr/local/bin/run_dev.sh"]

FROM production
3 changes: 0 additions & 3 deletions netkan/setup.py
Expand Up @@ -38,9 +38,6 @@
'pylint',
'autopep8',
'troposphere',
],
'test': [
'mypy',
]
techman83 marked this conversation as resolved.
Show resolved Hide resolved
},
)
8 changes: 8 additions & 0 deletions netkan/tox.ini
@@ -0,0 +1,8 @@
[tox]
envlist = py

[testenv]
deps = mypy
commands =
python -m unittest -v
mypy .