diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml new file mode 100644 index 00000000..93157bb4 --- /dev/null +++ b/.github/workflows/python-app.yml @@ -0,0 +1,27 @@ +# based on https://github.com/actions/starter-workflows/blob/main/ci/python-app.yml + +name: ahriman + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: run check and tests in archlinux container + run: | + docker run \ + -v ${{ github.workspace }}:/build -w /build \ + archlinux:latest \ + /bin/bash -c "pacman --noconfirm -Syu base-devel python python-pip && \ + pip install -e .[web] && \ + pip install -e .[check] && \ + pip install -e .[test] && \ + make check tests" diff --git a/setup.py b/setup.py index 54831b34..4ed52369 100644 --- a/setup.py +++ b/setup.py @@ -71,8 +71,25 @@ setup( ], extras_require={ - "html-templates": ["Jinja2"], - "test": ["pytest", "pytest-cov", "pytest-helpers-namespace", "pytest-mock", "pytest-pspec", "pytest-resource-path"], - "web": ["Jinja2", "aiohttp", "aiohttp_jinja2", "requests"], + "check": [ + "autopep8", + "mypy", + "pylint", + ], + "test": [ + "pytest", + "pytest-aiohttp", + "pytest-cov", + "pytest-helpers-namespace", + "pytest-mock", + "pytest-pspec", + "pytest-resource-path", + ], + "web": [ + "Jinja2", + "aiohttp", + "aiohttp_jinja2", + "requests", + ], }, )