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

Commit 12a5374

Browse files
committed
Use GitHub actions as CI.
1 parent d113596 commit 12a5374

File tree

7 files changed

+80
-295
lines changed

7 files changed

+80
-295
lines changed

.github/workflows/tests.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
type: [ "opened", "reopened", "synchronize" ]
9+
schedule:
10+
- cron: '0 12 * * 0' # run once a week on Sunday
11+
jobs:
12+
tests:
13+
strategy:
14+
matrix:
15+
config:
16+
# [Python version, tox env]
17+
- ["3.8", "flake8"]
18+
- ["2.7", "py27"]
19+
- ["3.6", "py36"]
20+
- ["3.7", "py37"]
21+
- ["3.8", "py38"]
22+
- ["3.8", "coverage"]
23+
runs-on: ubuntu-latest
24+
name: ${{ matrix.config[1] }}
25+
steps:
26+
- uses: actions/checkout@v2
27+
- name: Set up Python
28+
uses: actions/setup-python@v2
29+
with:
30+
python-version: ${{ matrix.config[0] }}
31+
- name: Pip cache
32+
uses: actions/cache@v2
33+
with:
34+
path: ~/.cache/pip
35+
key: ${{ runner.os }}-pip-${{ hashFiles('setup.*', 'tox.ini') }}
36+
restore-keys: |
37+
${{ runner.os }}-pip-
38+
- name: Install dependencies
39+
run: |
40+
python -m pip install --upgrade pip
41+
pip install tox
42+
- name: Test
43+
run: tox -e ${{ matrix.config[1] }}
44+
- name: Coverage
45+
if: matrix.config[1] == 'coverage'
46+
run: |
47+
pip install coveralls coverage-python-version
48+
coveralls --service=github
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.travis.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

CHANGES.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
CHANGES
22
*******
33

4-
0.1 (unreleased)
5-
================
4+
1.9.4-1 (unreleased)
5+
====================
66

77
- Initial Release
88

9-
- Migrate to Github.
9+
- Migrate to GitHub.
10+
11+
- Use GitHub actions as CI.

bootstrap.py

Lines changed: 0 additions & 260 deletions
This file was deleted.

buildout.cfg

Lines changed: 0 additions & 8 deletions
This file was deleted.

js/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__import__('pkg_resources').declare_namespace(__name__)
1+
__import__('pkg_resources').declare_namespace(__name__) # pragma: nocover

tox.ini

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,30 @@
11
[tox]
22
envlist =
3-
py27,
4-
py38,
3+
flake8,
4+
py27,
5+
py36,
6+
py37,
7+
py38,
8+
coverage,
9+
minversion = 1.6
510

611
[testenv]
12+
usedevelop = True
13+
extras = test
714
deps =
8-
py27: pytest < 5.0
9-
!py27: pytest
15+
pytest
1016
pytest-cov
11-
commands = py.test --doctest-glob='*.rst' --cov js {posargs}
12-
usedevelop = True
17+
commands = py.test --doctest-glob='*.rst' []
18+
19+
[testenv:coverage]
20+
deps =
21+
pytest
22+
pytest-cov
23+
commands = py.test --doctest-glob='*.rst' --cov js --cov-report=term []
24+
25+
26+
[testenv:flake8]
27+
basepython = python3
28+
skip_install = true
29+
deps = flake8
30+
commands = flake8 js setup.py --doctests

0 commit comments

Comments
 (0)