Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub Actions CI, test with 3.9 to 3.11 #1

Merged
merged 1 commit into from
Jul 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: CI

on:
push:
branches: [ "master", "v*" ]
pull_request:
branches: [ "master", "v*" ]
workflow_dispatch:

permissions:
contents: read

jobs:
tests:
name: "Python ${{ matrix.python-version }}"
# 20.04 because https://github.com/actions/python-versions
# does not have 2.7 and 3.6 binaries for 22.04.
runs-on: "ubuntu-20.04"
strategy:
fail-fast: false
matrix:
python-version:
- "2.7"
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11-dev"
steps:
- uses: "actions/checkout@v3"
- uses: "actions/setup-python@v4"
with:
python-version: "${{ matrix.python-version }}"
cache: "pip"
- 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
- name: "Run tox for ${{ matrix.python-version }}"
run: "python -m tox"
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Topic :: Communications
Topic :: System :: Monitoring
Topic :: System :: Networking :: Monitoring
Expand Down
28 changes: 25 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[tox]
minversion = 3.4.0
envlist =
{py27, py35, py36, py37, py38}-{unittest},
cover, docs, bandit, build
{py27, py35, py36, py37, py38, py39, py310, py311}-{unittest},
cover, bandit, build
isolated_build = true
skip_missing_interpreters = true

Expand Down Expand Up @@ -43,8 +43,20 @@ commands = {[testenv:unittest]commands}
deps = {[testenv:unittest]deps}
commands = {[testenv:unittest]commands}

[testenv:py39-unittest]
deps = {[testenv:unittest]deps}
commands = {[testenv:unittest]commands}

[testenv:py310-unittest]
deps = {[testenv:unittest]deps}
commands = {[testenv:unittest]commands}

[testenv:py311-unittest]
deps = {[testenv:unittest]deps}
commands = {[testenv:unittest]commands}

[testenv:cover]
basepython = python3.7
basepython = python3
setenv =
{[testenv]setenv}
PYTHON=coverage run --parallel-mode
Expand All @@ -70,3 +82,13 @@ deps =
setuptools
commands =
python setup.py -q sdist bdist_wheel

[gh-actions]
python =
2.7: py27-unittest
3.6: py36-unittest
3.7: py37-unittest
3.8: py38-unittest
3.9: py39-unittest, bandit
3.10: py310-unittest, cover, build
3.11: py311-unittest