This repository has been archived by the owner on Apr 14, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test Windows Python 3.x with GitHub Actions
Keep testing 2.7 with AppVeyor as GitHub Actions makes it hard to test Python 2.7 on Windows and Nox.
- Loading branch information
Showing
4 changed files
with
42 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Continuous integration | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: windows-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [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: | | ||
python.exe -m pip install --upgrade pip wheel nox | ||
- name: Test | ||
run: | | ||
python.exe -m nox -s test-${{ matrix.python-version }} | ||
- name: Coverage upload | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
run: | | ||
python.exe -m pip install codecov | ||
python.exe -m codecov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,15 @@ | ||
import platform | ||
import sys | ||
|
||
import pytest | ||
|
||
# We support Python 3.6+ for async code | ||
if sys.version_info[:2] < (3, 6): | ||
collect_ignore_glob = ["async/*.py", "with_dummyserver/async/*.py"] | ||
|
||
# The Python 3.8+ default loop on Windows breaks Tornado | ||
@pytest.fixture(scope="session", autouse=True) | ||
def configure_windows_event_loop(): | ||
if sys.version_info >= (3, 8) and platform.system() == "Windows": | ||
import asyncio | ||
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) |