Skip to content

Commit fb9f706

Browse files
committed
Migrate CI from Travis to GitHub Actions
1 parent 536a3d1 commit fb9f706

File tree

4 files changed

+85
-22
lines changed

4 files changed

+85
-22
lines changed

.github/workflows/ci.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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.7"
17+
toxenv: py37
18+
os: ubuntu-latest
19+
- python-version: "3.8"
20+
toxenv: py38
21+
os: ubuntu-latest
22+
- python-version: "3.9"
23+
toxenv: py39
24+
os: ubuntu-latest
25+
- python-version: "3.10"
26+
toxenv: py310
27+
os: ubuntu-latest
28+
- python-version: "3.11"
29+
toxenv: py311
30+
os: ubuntu-latest
31+
- python-version: "3.12"
32+
toxenv: py312
33+
os: ubuntu-latest
34+
- python-version: "3.13"
35+
toxenv: py313
36+
os: ubuntu-latest
37+
- python-version: "pypy-3.9"
38+
toxenv: pypy
39+
os: ubuntu-latest
40+
- python-version: "3.13"
41+
toxenv: py3-cover,coverage
42+
os: ubuntu-latest
43+
coverage: true
44+
45+
steps:
46+
- uses: actions/checkout@v3
47+
48+
- name: Set up Python ${{ matrix.python-version }}
49+
uses: actions/setup-python@v4
50+
with:
51+
python-version: ${{ matrix.python-version }}
52+
53+
- name: Install dependencies
54+
run: |
55+
python -m pip install --upgrade pip
56+
pip install tox
57+
58+
- name: Run tests with tox
59+
run: tox
60+
env:
61+
TOXENV: ${{ matrix.toxenv }}
62+
63+
- name: Upload coverage to Codecov
64+
if: matrix.coverage
65+
uses: codecov/codecov-action@v3
66+
with:
67+
files: ./coverage.xml
68+
flags: unittests
69+
name: codecov-umbrella
70+
fail_ci_if_error: false

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.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,14 @@
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',
3735
'Programming Language :: Python :: 3.7',
3836
'Programming Language :: Python :: 3.8',
3937
'Programming Language :: Python :: 3.9',
38+
'Programming Language :: Python :: 3.10',
39+
'Programming Language :: Python :: 3.11',
40+
'Programming Language :: Python :: 3.12',
41+
'Programming Language :: Python :: 3.13',
4042
"Programming Language :: Python :: Implementation :: CPython",
4143
"Programming Language :: Python :: Implementation :: PyPy",
4244
],

tox.ini

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,36 @@
11
[tox]
22
envlist =
3-
py27,py36,py37,py38,py39,pypy,
4-
{py2,py3}-cover,coverage
3+
py37,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
1210
py37: python3.7
1311
py38: python3.8
1412
py39: python3.9
13+
py310: python3.10
14+
py311: python3.11
15+
py312: python3.12
16+
py313: python3.13
1517
pypy: pypy
16-
py2: python2.7
17-
py3: python3.9
18+
py3: python3.13
1819

1920
passenv = TOXENV CI TRAVIS TRAVIS_*
2021
commands =
2122
pip install alog[testing]
2223
pytest tests --junitxml=pytest-{envname}.xml {posargs:}
2324

24-
[py-cover]
25+
[testenv:py3-cover]
2526
commands =
2627
pip install alog[testing]
2728
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}
3829
setenv =
3930
COVERAGE_FILE=.coverage.py3
4031

4132
[testenv:coverage]
42-
basepython = python3.9
33+
basepython = python3.13
4334
commands =
4435
coverage erase
4536
coverage combine

0 commit comments

Comments
 (0)