Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
Use Github Actions for testing (#492)
Browse files Browse the repository at this point in the history
  • Loading branch information
samj1912 committed Aug 5, 2020
1 parent 2dfbb38 commit 6df2581
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 15 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/test.yml
@@ -0,0 +1,22 @@
name: Run tests

on: [push, pull_request]

jobs:
test-latest:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
python-version: [3.5, 3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: python -m pip install --upgrade pip tox
- name: Run Tests
run: tox -e py,install,docs
39 changes: 24 additions & 15 deletions tox.ini
Expand Up @@ -4,7 +4,7 @@
# install tox" and then run "tox" from this directory.

[tox]
envlist = {py35,py36,py37,py38}-{tests,install},py36-docs
envlist = {py35,py36,py37,py38}-{tests,install},docs,install,py36-docs

[testenv]
download = true
Expand All @@ -20,34 +20,43 @@ deps =
-rrequirements/runtime.txt
-rrequirements/tests.txt

[testenv:py37-install]
[testenv:install]
skip_install = True
commands =
python setup.py bdist_wheel
pip install --no-index --find-links=dist pydocstyle
pydocstyle --help

[testenv:docs]
changedir = docs
deps =
-rrequirements/runtime.txt
-rrequirements/docs.txt
commands = sphinx-build -b html . _build

[testenv:py36-docs]
changedir = {[testenv:docs]changedir}
deps = {[testenv:docs]deps}
commands = {[testenv:docs]commands}

# There's no way to generate sub-sections in tox.
# The following sections are all references to the `py37-install`.

[testenv:py35-install]
skip_install = {[testenv:py37-install]skip_install}
commands = {[testenv:py37-install]commands}
skip_install = {[testenv:install]skip_install}
commands = {[testenv:install]commands}

[testenv:py36-install]
skip_install = {[testenv:py37-install]skip_install}
commands = {[testenv:py37-install]commands}
skip_install = {[testenv:install]skip_install}
commands = {[testenv:install]commands}

[testenv:py38-install]
skip_install = {[testenv:py37-install]skip_install}
commands = {[testenv:py37-install]commands}
[testenv:py37-install]
skip_install = {[testenv:install]skip_install}
commands = {[testenv:install]commands}

[testenv:py36-docs]
changedir=docs
deps =
-rrequirements/runtime.txt
-rrequirements/docs.txt
commands=sphinx-build -b html . _build
[testenv:py38-install]
skip_install = {[testenv:install]skip_install}
commands = {[testenv:install]commands}

[pytest]
pep8ignore =
Expand Down

0 comments on commit 6df2581

Please sign in to comment.