diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index 2d323e3dd..084e162ea 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -9,13 +9,12 @@ on: jobs: tests: - name: "Python ${{ matrix.python-version }}" - runs-on: "ubuntu-latest" - + name: "Python ${{ matrix.python-version }} ${{ matrix.os }}" + runs-on: "${{ matrix.os }}" strategy: matrix: python-version: ["3.6", "3.7", "3.8"] - + os: [windows-latest, ubuntu-latest] steps: - uses: "actions/checkout@v2" - uses: "actions/setup-python@v1" @@ -23,5 +22,7 @@ jobs: python-version: "${{ matrix.python-version }}" - name: "Install dependencies" run: "scripts/install" + shell: bash - name: "Run tests" run: "scripts/test" + shell: bash diff --git a/requirements_windows.txt b/requirements_windows.txt new file mode 100644 index 000000000..486c96046 --- /dev/null +++ b/requirements_windows.txt @@ -0,0 +1,19 @@ +click +h11 + +# Optional +websockets==8.* +wsproto==0.13.* + +# Testing +autoflake +black +codecov +flake8 +isort +pytest +pytest-cov +requests + +# Efficient debug reload +watchgod>=0.6,<0.7 diff --git a/scripts/install b/scripts/install index 65885a720..b2c9963d2 100755 --- a/scripts/install +++ b/scripts/install @@ -1,9 +1,15 @@ -#!/bin/sh -e +#!/usr/bin/env bash + +set -e # Use the Python executable provided from the `-p` option, or a default. [ "$1" = "-p" ] && PYTHON=$2 || PYTHON="python3" -REQUIREMENTS="requirements.txt" +if [ "$OSTYPE" = "linux-gnu" ]; then + REQUIREMENTS="requirements.txt" +elif [ "$OSTYPE" = "msys" ]; then + REQUIREMENTS="requirements_windows.txt" +fi VENV="venv" set -x