Skip to content

Commit 1f87c05

Browse files
authored
Merge pull request #31 from keitheis/ci_migrate_to_github_actions
Migrate CI from Travis to GitHub Actions
2 parents 536a3d1 + ce60567 commit 1f87c05

File tree

6 files changed

+84
-60
lines changed

6 files changed

+84
-60
lines changed

.github/workflows/ci.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
include:
16+
- python-version: "3.8"
17+
toxenv: py38
18+
os: ubuntu-latest
19+
- python-version: "3.9"
20+
toxenv: py39
21+
os: ubuntu-latest
22+
- python-version: "3.10"
23+
toxenv: py310
24+
os: ubuntu-latest
25+
- python-version: "3.11"
26+
toxenv: py311
27+
os: ubuntu-latest
28+
- python-version: "3.12"
29+
toxenv: py312
30+
os: ubuntu-latest
31+
- python-version: "3.13"
32+
toxenv: py313
33+
os: ubuntu-latest
34+
- python-version: "pypy-3.9"
35+
toxenv: pypy
36+
os: ubuntu-latest
37+
- python-version: "3.13"
38+
toxenv: py3-cover,coverage
39+
os: ubuntu-latest
40+
coverage: true
41+
42+
steps:
43+
- uses: actions/checkout@v3
44+
45+
- name: Set up Python ${{ matrix.python-version }}
46+
uses: actions/setup-python@v4
47+
with:
48+
python-version: ${{ matrix.python-version }}
49+
50+
- name: Install dependencies
51+
run: |
52+
python -m pip install --upgrade pip
53+
pip install tox
54+
55+
- name: Run tests with tox
56+
run: tox
57+
env:
58+
TOXENV: ${{ matrix.toxenv }}
59+
60+
- name: Upload coverage to Codecov
61+
if: matrix.coverage
62+
uses: codecov/codecov-action@v3
63+
with:
64+
files: ./coverage.xml
65+
flags: unittests
66+
name: codecov-umbrella
67+
fail_ci_if_error: false

.travis.yml

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

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Alog
22
====
33

4-
.. image:: https://travis-ci.com/keitheis/alog.svg?branch=master
5-
:target: https://travis-ci.com/keitheis/alog
4+
.. image:: https://github.com/keitheis/alog/actions/workflows/ci.yml/badge.svg
5+
:target: https://github.com/keitheis/alog/actions/workflows/ci.yml
66

77
.. image:: https://codecov.io/gh/keitheis/alog/branch/master/graph/badge.svg
88
:target: https://codecov.io/gh/keitheis/alog

setup.cfg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ universal=1
44

55
[check-manifest]
66
ignore =
7-
.travis.yml
87
PKG-INFO
98
*.egg-info
109
*.egg-info/*

setup.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,13 @@
3131
'Topic :: System :: Logging',
3232
'Topic :: Software Development',
3333
'Programming Language :: Python',
34-
'Programming Language :: Python :: 2.7',
3534
'Programming Language :: Python :: 3',
36-
'Programming Language :: Python :: 3.6',
37-
'Programming Language :: Python :: 3.7',
3835
'Programming Language :: Python :: 3.8',
3936
'Programming Language :: Python :: 3.9',
37+
'Programming Language :: Python :: 3.10',
38+
'Programming Language :: Python :: 3.11',
39+
'Programming Language :: Python :: 3.12',
40+
'Programming Language :: Python :: 3.13',
4041
"Programming Language :: Python :: Implementation :: CPython",
4142
"Programming Language :: Python :: Implementation :: PyPy",
4243
],

tox.ini

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,40 @@
11
[tox]
22
envlist =
3-
py27,py36,py37,py38,py39,pypy,
4-
{py2,py3}-cover,coverage
3+
py38,py39,py310,py311,py312,py313,pypy,
4+
py3-cover,coverage
55

66
[testenv]
77
# Most of these are defaults but if you specify any you can't fall back
88
# to defaults for others.
99
basepython =
10-
py27: python2.7
11-
py36: python3.6
12-
py37: python3.7
1310
py38: python3.8
1411
py39: python3.9
12+
py310: python3.10
13+
py311: python3.11
14+
py312: python3.12
15+
py313: python3.13
1516
pypy: pypy
16-
py2: python2.7
17-
py3: python3.9
17+
py3: python3.13
1818

19-
passenv = TOXENV CI TRAVIS TRAVIS_*
19+
passenv = TOXENV,CI,GITHUB_*
2020
commands =
2121
pip install alog[testing]
2222
pytest tests --junitxml=pytest-{envname}.xml {posargs:}
2323

24-
[py-cover]
24+
[testenv:py3-cover]
2525
commands =
2626
pip install alog[testing]
2727
pytest tests --cov-report term-missing --cov=alog
28-
29-
[testenv:py2-cover]
30-
commands =
31-
{[py-cover]commands}
32-
setenv =
33-
COVERAGE_FILE=.coverage.py2
34-
35-
[testenv:py3-cover]
36-
commands =
37-
{[py-cover]commands}
3828
setenv =
3929
COVERAGE_FILE=.coverage.py3
4030

4131
[testenv:coverage]
42-
basepython = python3.9
32+
basepython = python3.13
4333
commands =
4434
coverage erase
4535
coverage combine
4636
coverage xml
47-
coverage report --show-missing --fail-under=100
37+
coverage report --show-missing --fail-under=90
4838
codecov -e TOXENV
4939
deps =
5040
coverage

0 commit comments

Comments
 (0)