Skip to content

Commit fcd3164

Browse files
committed
Remove travis and appveyor in favor of GitHub Actions
1 parent 8b0f68b commit fcd3164

File tree

5 files changed

+159
-60
lines changed

5 files changed

+159
-60
lines changed

.github/workflows/integration.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: integration
2+
3+
on: [push]
4+
5+
jobs:
6+
7+
checks:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
max-parallel: 8
11+
matrix:
12+
check: [bluecheck, doc8, docs, flake8, isortcheck, mypy, pylint, rstcheck]
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up Python
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: 3.9
20+
- name: Install dependencies
21+
run: |
22+
pip install --upgrade pip
23+
pip install tox
24+
- name: Run checks with tox
25+
run: |
26+
tox -e ${{ matrix.check }}
27+
28+
tests:
29+
needs: checks
30+
runs-on: ${{ matrix.os }}
31+
strategy:
32+
max-parallel: 8
33+
matrix:
34+
os: [ubuntu-latest, macos-latest, windows-latest, ubuntu-16.04]
35+
python-version: [3.6, 3.7, 3.8, 3.9]
36+
37+
steps:
38+
- name: Set up Python ${{ matrix.python-version }} x64
39+
uses: actions/setup-python@v2
40+
with:
41+
python-version: ${{ matrix.python-version }}
42+
architecture: x64
43+
44+
- uses: actions/checkout@v2
45+
46+
- name: Install tox
47+
run: |
48+
pip install --upgrade pip
49+
pip install tox
50+
51+
- name: Test with tox
52+
run: tox -e py

.github/workflows/release.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
jobs:
9+
10+
upload:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: 3.9
20+
21+
- name: Install dependencies
22+
run: |
23+
pip install --upgrade pip
24+
pip install -r requirements.txt
25+
26+
- name: Create source dist
27+
run: python setup.py sdist
28+
29+
- name: Create wheel dist
30+
run: python setup.py bdist_wheel
31+
32+
- name: Upload with twine
33+
env:
34+
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
35+
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
36+
run: |
37+
ls -l dist/*
38+
twine upload dist/*

.travis.yml

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

appveyor.yml

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

tox.ini

Lines changed: 69 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,93 @@
11
[tox]
2-
envlist=py35,py36,py37,py38,pylint
2+
envlist=bluecheck,doc8,docs,isortcheck,flake8,mypy,pylint,rstcheck,py36,py37,py38,py39
33
skip_missing_interpreters=True
44

55
[testenv]
6+
commands=pytest
67
deps=
78
django==2.2.*
89
pytest
910
pytest-django
1011
pytest-xdist
11-
commands=python -m pytest
1212
setenv=
1313
DJANGO_SETTINGS_MODULE=tests.settings
14-
PYTHONPATH={toxinidir}
14+
15+
[testenv:blue]
16+
commands=blue {toxinidir}/setup.py {toxinidir}/diskcache {toxinidir}/tests
17+
deps=blue
18+
19+
[testenv:bluecheck]
20+
commands=blue --check {toxinidir}/setup.py {toxinidir}/diskcache {toxinidir}/tests
21+
deps=blue
22+
23+
[testenv:doc8]
24+
deps=doc8
25+
commands=doc8 docs
26+
27+
[testenv:docs]
28+
allowlist_externals=make
29+
changedir=docs
30+
commands=make html
31+
deps=sphinx
32+
33+
[testenv:flake8]
34+
commands=flake8 {toxinidir}/setup.py {toxinidir}/diskcache {toxinidir}/tests
35+
deps=flake8
36+
37+
[testenv:isort]
38+
commands=isort {toxinidir}/setup.py {toxinidir}/diskcache {toxinidir}/tests
39+
deps=isort
40+
41+
[testenv:isortcheck]
42+
commands=isort --check {toxinidir}/setup.py {toxinidir}/diskcache {toxinidir}/tests
43+
deps=isort
44+
45+
[testenv:mypy]
46+
commands=mypy {toxinidir}/diskcache
47+
deps=mypy
48+
49+
[testenv:pylint]
50+
commands=pylint {toxinidir}/diskcache
51+
deps=pylint
52+
53+
[testenv:rstcheck]
54+
commands=rstcheck {toxinidir}/README.rst
55+
deps=rstcheck
56+
57+
[testenv:uploaddocs]
58+
allowlist_externals=rsync
59+
changedir=docs
60+
commands=
61+
rsync -azP --stats --delete _build/html/ \
62+
grantjenks.com:/srv/www/www.grantjenks.com/public/docs/diskcache/
63+
64+
[isort]
65+
multi_line_output = 3
66+
include_trailing_comma = True
67+
force_grid_wrap = 0
68+
use_parentheses = True
69+
ensure_newline_before_comments = True
70+
line_length = 79
1571

1672
[pytest]
1773
addopts=
1874
-n auto
75+
--cov-branch
76+
--cov-fail-under=100
77+
--cov-report=term-missing
78+
--cov=diskcache
79+
--doctest-glob="*.rst"
1980
--ignore tests/benchmark_core.py
2081
--ignore tests/benchmark_djangocache.py
2182
--ignore tests/benchmark_glob.py
2283
--ignore tests/issue_85.py
2384
--ignore tests/plot.py
24-
norecursedirs=site-packages
25-
testpaths=docs diskcache tests
26-
27-
[testenv:pylint]
28-
deps=
29-
django==2.2.*
30-
flake8
31-
pylint
32-
commands=
33-
flake8 diskcache
34-
pylint diskcache
3585

3686
[doc8]
37-
ignore=D000
87+
# ignore=D000
3888

3989
[flake8]
40-
ignore=
41-
E124
42-
E303
43-
W503
90+
# ignore=
91+
# E124
92+
# E303
93+
# W503

0 commit comments

Comments
 (0)