Skip to content

Commit 51f5bfe

Browse files
authored
Add GitHub Actions CI, test with 3.9 to 3.11 (#1)
1 parent bdbcc5d commit 51f5bfe

File tree

3 files changed

+70
-3
lines changed

3 files changed

+70
-3
lines changed

.github/workflows/main.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: CI
3+
4+
on:
5+
push:
6+
branches: [ "master", "v*" ]
7+
pull_request:
8+
branches: [ "master", "v*" ]
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
tests:
16+
name: "Python ${{ matrix.python-version }}"
17+
# 20.04 because https://github.com/actions/python-versions
18+
# does not have 2.7 and 3.6 binaries for 22.04.
19+
runs-on: "ubuntu-20.04"
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
python-version:
24+
- "2.7"
25+
- "3.6"
26+
- "3.7"
27+
- "3.8"
28+
- "3.9"
29+
- "3.10"
30+
- "3.11-dev"
31+
steps:
32+
- uses: "actions/checkout@v3"
33+
- uses: "actions/setup-python@v4"
34+
with:
35+
python-version: "${{ matrix.python-version }}"
36+
cache: "pip"
37+
- name: "Update pip"
38+
run: python -m pip install --upgrade pip setuptools wheel
39+
- name: "Install tox dependencies"
40+
run: python -m pip install --upgrade tox tox-gh-actions
41+
- name: "Run tox for ${{ matrix.python-version }}"
42+
run: "python -m tox"

setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737
Programming Language :: Python :: 3.6
3838
Programming Language :: Python :: 3.7
3939
Programming Language :: Python :: 3.8
40+
Programming Language :: Python :: 3.9
41+
Programming Language :: Python :: 3.10
42+
Programming Language :: Python :: 3.11
4043
Topic :: Communications
4144
Topic :: System :: Monitoring
4245
Topic :: System :: Networking :: Monitoring

tox.ini

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[tox]
22
minversion = 3.4.0
33
envlist =
4-
{py27, py35, py36, py37, py38}-{unittest},
5-
cover, docs, bandit, build
4+
{py27, py35, py36, py37, py38, py39, py310, py311}-{unittest},
5+
cover, bandit, build
66
isolated_build = true
77
skip_missing_interpreters = true
88

@@ -43,8 +43,20 @@ commands = {[testenv:unittest]commands}
4343
deps = {[testenv:unittest]deps}
4444
commands = {[testenv:unittest]commands}
4545

46+
[testenv:py39-unittest]
47+
deps = {[testenv:unittest]deps}
48+
commands = {[testenv:unittest]commands}
49+
50+
[testenv:py310-unittest]
51+
deps = {[testenv:unittest]deps}
52+
commands = {[testenv:unittest]commands}
53+
54+
[testenv:py311-unittest]
55+
deps = {[testenv:unittest]deps}
56+
commands = {[testenv:unittest]commands}
57+
4658
[testenv:cover]
47-
basepython = python3.7
59+
basepython = python3
4860
setenv =
4961
{[testenv]setenv}
5062
PYTHON=coverage run --parallel-mode
@@ -70,3 +82,13 @@ deps =
7082
setuptools
7183
commands =
7284
python setup.py -q sdist bdist_wheel
85+
86+
[gh-actions]
87+
python =
88+
2.7: py27-unittest
89+
3.6: py36-unittest
90+
3.7: py37-unittest
91+
3.8: py38-unittest
92+
3.9: py39-unittest, bandit
93+
3.10: py310-unittest, cover, build
94+
3.11: py311-unittest

0 commit comments

Comments
 (0)