Skip to content

Commit

Permalink
moving python tests from travis to GH actions
Browse files Browse the repository at this point in the history
  • Loading branch information
luizirber committed Dec 7, 2020
1 parent b99ed8e commit c9a4266
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 14 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: cibuildwheel
on:
push:
branches: [latest]
tags: v*
pull_request:
branches: [latest]
schedule:
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Python tests

on:
push:
branches: [latest]
tags: v*
pull_request:
branches: [latest]
schedule:
- cron: "0 0 * * *" # daily

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, macos-latest]
py: [3.9, 3.8, 3.7]

steps:
- uses: actions/checkout@v2
with:
fetch-deph: 0

- name: Set up Python ${{ matrix.py }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.py }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
run: tox -vv
env:
PYTHONDEVMODE: 1

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
fail_ci_if_error: true
12 changes: 0 additions & 12 deletions netlify.toml

This file was deleted.

9 changes: 7 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist=py37,py38,docs
envlist=py39,py38,py37,docs

[testenv]
passenv = CI TRAVIS TRAVIS_* PYTHONDEVMODE
Expand All @@ -13,11 +13,16 @@ deps=
codecov
commands=
make coverage
codecov --gcov-glob third-party

[testenv:docs]
basepython = python3.7
extras = doc
passenv = HOME
commands = sphinx-build -d "{toxworkdir}/docs_doctree" doc "{toxworkdir}/docs_out" --color -bhtml {posargs}
python -c 'import pathlib; print("documentation available under file://\{0\}".format(pathlib.Path(r"{toxworkdir}") / "docs_out" / "index.html"))'

[gh-actions]
python =
3.7: py37,docs
3.8: py38
3.9: py39

0 comments on commit c9a4266

Please sign in to comment.