summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2021-01-12 17:29:45 +0100
committerChristian Heimes <christian@python.org>2021-01-12 17:44:22 +0100
commite1ef14e7dc763fe356f0b6142be23972e4a2310b (patch)
tree5a52960742bc8c929ca65392dd977af7be7f08bf
parenteb38a2d710b67df48614cb5098ddb8472289ce6d (diff)
downloaddefusedxml-git-e1ef14e7dc763fe356f0b6142be23972e4a2310b.tar.gz
Add github actions
Replace Travis CI with GitHub Actions Signed-off-by: Christian Heimes <christian@python.org>
-rw-r--r--.github/workflows/main.yml30
-rw-r--r--.gitignore1
-rw-r--r--.travis.yml42
-rw-r--r--Makefile1
-rw-r--r--tox.ini13
5 files changed, 44 insertions, 43 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 0000000..f66d308
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -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
diff --git a/.gitignore b/.gitignore
index f74a7ca..e568a11 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,5 +7,6 @@ __pycache__
.tox
.cache
.coverage
+coverage.xml
MANIFEST
README.html
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index f901a4b..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,42 +0,0 @@
-sudo: false
-
-language: python
-
-cache: pip
-
-dist: xenial
-
-matrix:
- include:
- - python: 2.7
- env: TOXENV=py27
- - python: 3.5
- env: TOXENV=py35
- - python: 3.6
- env: TOXENV=py36
- - python: 3.7
- env: TOXENV=py37
- - python: 3.8
- env: TOXENV=py38
- - python: 3.9-dev
- env: TOXENV=py39
- - python: 3.7
- env: TOXENV=black
- - python: 2.7
- env: TOXENV=pep8py2
- - python: 3.7
- env: TOXENV=pep8py3
- - python: 3.7
- env: TOXENV=doc
-
-install:
- - pip install --upgrade pip setuptools
- - pip --version
- - pip install tox codecov
- - tox --version
-
-script:
- - tox
-
-after_success:
- - codecov
diff --git a/Makefile b/Makefile
index 2e7cd2d..088e9a7 100644
--- a/Makefile
+++ b/Makefile
@@ -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
diff --git a/tox.ini b/tox.ini
index 5f5f357..d9d64fe 100644
--- a/tox.ini
+++ b/tox.ini
@@ -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
@@ -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