Skip to content

Commit

Permalink
Brings back windows testing to CI (#685)
Browse files Browse the repository at this point in the history
* 1st pass on adding windows vm for CI

* 2nd pass, was testing nothing

* No arrays

* No arrays 2

* No arrays 3

* No arrays 4

* Removed appveyor PATH export

* Using scripts on windows CI, will need to write ps1 scripts

* Matrix indent

* Location of scripts

* Hate CI

* Why ps1 are ignored

* Adding ps1 scripts, was globally ignored

* Chmod +x ps1

* Removing uvloop from win reqs

* Added install and test.sh scripts, globally ignored wtf

* Align win reqs to old .travis file

* Run really on windows ?

* Lost in matrix....

* Blind ps1

* Blind ps1 2nd pass

* Blind ps1 3rd pass

* Blind test.ps1 !

* Blind test.ps1 love

* Attempt specifying shell explicitely

* Try using bash on windows

* Detect os for requirements

* Use sh comparison

* Live debug

* Live debug 2

* More echo

* More echo

* More echo 2

* OSTYPE only in bash

* OSTYPE seems to be msys

* Using old names for scripts since we dont need to differentiate now between os

* Removed echo leftovers from live debugging and indented back to 4 spaces

* Correct set

* Removin=g unboud variable check

* Set -x before pip only

* Update install

* Set -e

Co-authored-by: Tom Christie <tom@tomchristie.com>
  • Loading branch information
euri10 and tomchristie committed Jul 24, 2020
1 parent f623916 commit 81f2136
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 6 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/test-suite.yml
Expand Up @@ -9,19 +9,20 @@ 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"
with:
python-version: "${{ matrix.python-version }}"
- name: "Install dependencies"
run: "scripts/install"
shell: bash
- name: "Run tests"
run: "scripts/test"
shell: bash
19 changes: 19 additions & 0 deletions 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
10 changes: 8 additions & 2 deletions 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
Expand Down

0 comments on commit 81f2136

Please sign in to comment.