Skip to content

Commit 81f2136

Browse files
euri10tomchristie
andauthored
Brings back windows testing to CI (#685)
* 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 <[email protected]>
1 parent f623916 commit 81f2136

File tree

3 files changed

+32
-6
lines changed

3 files changed

+32
-6
lines changed

Diff for: .github/workflows/test-suite.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,20 @@ on:
99

1010
jobs:
1111
tests:
12-
name: "Python ${{ matrix.python-version }}"
13-
runs-on: "ubuntu-latest"
14-
12+
name: "Python ${{ matrix.python-version }} ${{ matrix.os }}"
13+
runs-on: "${{ matrix.os }}"
1514
strategy:
1615
matrix:
1716
python-version: ["3.6", "3.7", "3.8"]
18-
17+
os: [windows-latest, ubuntu-latest]
1918
steps:
2019
- uses: "actions/checkout@v2"
2120
- uses: "actions/setup-python@v1"
2221
with:
2322
python-version: "${{ matrix.python-version }}"
2423
- name: "Install dependencies"
2524
run: "scripts/install"
25+
shell: bash
2626
- name: "Run tests"
2727
run: "scripts/test"
28+
shell: bash

Diff for: requirements_windows.txt

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
click
2+
h11
3+
4+
# Optional
5+
websockets==8.*
6+
wsproto==0.13.*
7+
8+
# Testing
9+
autoflake
10+
black
11+
codecov
12+
flake8
13+
isort
14+
pytest
15+
pytest-cov
16+
requests
17+
18+
# Efficient debug reload
19+
watchgod>=0.6,<0.7

Diff for: scripts/install

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
#!/bin/sh -e
1+
#!/usr/bin/env bash
2+
3+
set -e
24

35
# Use the Python executable provided from the `-p` option, or a default.
46
[ "$1" = "-p" ] && PYTHON=$2 || PYTHON="python3"
57

6-
REQUIREMENTS="requirements.txt"
8+
if [ "$OSTYPE" = "linux-gnu" ]; then
9+
REQUIREMENTS="requirements.txt"
10+
elif [ "$OSTYPE" = "msys" ]; then
11+
REQUIREMENTS="requirements_windows.txt"
12+
fi
713
VENV="venv"
814

915
set -x

0 commit comments

Comments
 (0)