Skip to content

Commit

Permalink
Add github actions
Browse files Browse the repository at this point in the history
Replace Travis CI with GitHub Actions

Signed-off-by: Christian Heimes <christian@python.org>
  • Loading branch information
tiran committed Jan 12, 2021
1 parent eb38a2d commit e1ef14e
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 43 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
workflow_dispatch:

jobs:
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9"]
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"
- name: "Update pip"
run: python -m pip install --upgrade pip setuptools wheel
- name: "Install tox dependencies"
run: python -m pip install --upgrade tox tox-gh-actions coverage[toml]
- name: "Run tox for ${{ matrix.python-version }}"
run: "python -m tox"
- name: "Upload coverage to Codecov"
uses: "codecov/codecov-action@v1"
with:
fail_ci_if_error: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ __pycache__
.tox
.cache
.coverage
coverage.xml
MANIFEST
README.html
42 changes: 0 additions & 42 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ clean:
@find . \( -name '*.o' -or -name '*.so' -or -name '*.sl' -or \
-name '*.py[cod]' -or -name README.html \) \
-and -type f -delete
@rm -f .coverage .coverage.* coverage.xml

distclean: clean
@rm -rf build
Expand Down
13 changes: 12 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
[tox]
envlist = py27,py35,py36,py37,py38,py39,black,pep8py2,pep8py3,doc
envlist = py27,py35,py36,py37,py38,py39,py310,black,pep8py2,pep8py3,doc
skip_missing_interpreters = true

[testenv]
commands =
coverage run --parallel-mode tests.py
coverage combine
coverage xml
coverage report -m
deps =
lxml
Expand Down Expand Up @@ -52,3 +53,13 @@ exclude = .tox,*.egg,dist,build,other
show-source = true
ignore = E402, F811
max-line-length = 98

[gh-actions]
python =
2.7: py27, pep8py2
3.5: py35
3.6: py36
3.7: py37
3.8: py38, pep8py3, doc
3.9: py39, black
3.10: py310

0 comments on commit e1ef14e

Please sign in to comment.