diff options
-rwxr-xr-x | .github/workflows/install-deps.sh | 15 | ||||
-rw-r--r-- | .github/workflows/run_tests.yml | 22 |
2 files changed, 37 insertions, 0 deletions
diff --git a/.github/workflows/install-deps.sh b/.github/workflows/install-deps.sh new file mode 100755 index 0000000..848c24d --- /dev/null +++ b/.github/workflows/install-deps.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +set -e +set -x + +# Test utilities +pip install -U pip pytest coverage + +# Test dependencies (Server back-ends and template engines) +sudo apt-get install -y libev-dev +pip install mako jinja2 + +for name in waitress "cherrypy<9" cheroot paste tornado twisted diesel meinheld\ + gunicorn eventlet flup fapws3 rocket bjoern gevent uvloop; do + pip install $name || echo "Failed to install $name with $(python -V 2>&1)" 1>&2 +done diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml new file mode 100644 index 0000000..7664a95 --- /dev/null +++ b/.github/workflows/run_tests.yml @@ -0,0 +1,22 @@ +name: Run tests +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + max-parallel: 4 + matrix: + python-version: [2.7, 3.5, 3.6, 3.7, 3.8] + steps: + - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + .github/workflows/install-deps.sh + - name: Run tests + run: | + pytest |