Skip to content

Commit

Permalink
Move builds to GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Nov 18, 2020
1 parent 37e6a7e commit 588b277
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 31 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: python -m pip install --upgrade pip wheel
- run: pip install tox tox-gh-actions
- run: tox -eflake8
- run: tox -edocs
tests:
name: tests
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: ['2.7', '3.6', '3.7', '3.8', '3.9', 'pypy2', 'pypy3']
exclude:
# pypy3 currently fails to run on Windows
- os: windows-latest
python: pypy3
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- run: python -m pip install --upgrade pip wheel
- run: pip install tox tox-gh-actions
- run: tox
coverage:
name: coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: python -m pip install --upgrade pip wheel
- run: pip install tox tox-gh-actions codecov
- run: tox
- run: codecov
43 changes: 12 additions & 31 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,56 +1,37 @@
[tox]
envlist=flake8,py27,py36,py37,py38,py39,pypy,pypy3,docs,coverage
envlist=flake8,py27,py36,py37,py38,py39,pypy2,pypy3,docs,coverage
skip_missing_interpreters=True

[gh-actions]
python =
2.7: py27
3.6: py36
3.7: py37
3.8: py38
3.9: py39
pypy2: pypy2
pypy3: pypy3

[testenv]
commands=
coverage run --branch --include=flask_httpauth.py setup.py test
coverage report --show-missing
coverage xml -o coverage.xml
coverage erase
deps=
coverage

[testenv:flake8]
basepython=python3.8
deps=
flake8
commands=
flake8 --exclude=".*" --ignore=E402 flask_httpauth.py tests examples

[testenv:py27]
basepython=python2.7

[testenv:py36]
basepython=python3.6

[testenv:py37]
basepython=python3.7

[testenv:py38]
basepython=python3.8

[testenv:py39]
basepython=python3.9

[testenv:pypy]
basepython=pypy

[testenv:pypy3]
basepython=pypy3

[testenv:docs]
basepython=python3.8
changedir=docs
deps=
sphinx
whitelist_externals=
make
commands=
make html

[testenv:coverage]
basepython=python
commands=
coverage run --branch --source=flask_httpauth.py setup.py test
coverage html
coverage erase

0 comments on commit 588b277

Please sign in to comment.