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

Commit 6df2581

Browse files
authored
Use Github Actions for testing (#492)
1 parent 2dfbb38 commit 6df2581

File tree

2 files changed

+46
-15
lines changed

2 files changed

+46
-15
lines changed

.github/workflows/test.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Run tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test-latest:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
os: [macos-latest, ubuntu-latest, windows-latest]
11+
python-version: [3.5, 3.6, 3.7, 3.8]
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@v1
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
- name: Install tox
20+
run: python -m pip install --upgrade pip tox
21+
- name: Run Tests
22+
run: tox -e py,install,docs

tox.ini

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# install tox" and then run "tox" from this directory.
55

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

99
[testenv]
1010
download = true
@@ -20,34 +20,43 @@ deps =
2020
-rrequirements/runtime.txt
2121
-rrequirements/tests.txt
2222

23-
[testenv:py37-install]
23+
[testenv:install]
2424
skip_install = True
2525
commands =
2626
python setup.py bdist_wheel
2727
pip install --no-index --find-links=dist pydocstyle
2828
pydocstyle --help
2929

30+
[testenv:docs]
31+
changedir = docs
32+
deps =
33+
-rrequirements/runtime.txt
34+
-rrequirements/docs.txt
35+
commands = sphinx-build -b html . _build
36+
37+
[testenv:py36-docs]
38+
changedir = {[testenv:docs]changedir}
39+
deps = {[testenv:docs]deps}
40+
commands = {[testenv:docs]commands}
41+
3042
# There's no way to generate sub-sections in tox.
3143
# The following sections are all references to the `py37-install`.
3244

3345
[testenv:py35-install]
34-
skip_install = {[testenv:py37-install]skip_install}
35-
commands = {[testenv:py37-install]commands}
46+
skip_install = {[testenv:install]skip_install}
47+
commands = {[testenv:install]commands}
3648

3749
[testenv:py36-install]
38-
skip_install = {[testenv:py37-install]skip_install}
39-
commands = {[testenv:py37-install]commands}
50+
skip_install = {[testenv:install]skip_install}
51+
commands = {[testenv:install]commands}
4052

41-
[testenv:py38-install]
42-
skip_install = {[testenv:py37-install]skip_install}
43-
commands = {[testenv:py37-install]commands}
53+
[testenv:py37-install]
54+
skip_install = {[testenv:install]skip_install}
55+
commands = {[testenv:install]commands}
4456

45-
[testenv:py36-docs]
46-
changedir=docs
47-
deps =
48-
-rrequirements/runtime.txt
49-
-rrequirements/docs.txt
50-
commands=sphinx-build -b html . _build
57+
[testenv:py38-install]
58+
skip_install = {[testenv:install]skip_install}
59+
commands = {[testenv:install]commands}
5160

5261
[pytest]
5362
pep8ignore =

0 commit comments

Comments
 (0)