Skip to content

Commit

Permalink
Merge pull request pyusb#308 from ap--/github-actions-tox
Browse files Browse the repository at this point in the history
run tests via tox and github actions
  • Loading branch information
jonasmalacofilho committed Jun 15, 2020
2 parents e3f3814 + 99849ac commit ca9af60
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 32 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/run_tox.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: pyusb

on: [push]

jobs:
build:
runs-on: ${{ matrix.platform }}
strategy:
max-parallel: 4
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
python-version: [2.7, 3.5, 3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools>=30.3.0 tox
- id: pyver2toxenv
run: |
python -c "import sys; print('::set-output name=toxenv::py' + sys.argv[1].replace('.', ''))" ${{ matrix.python-version }}
- name: Test with tox
run: tox -e ${{ steps.pyver2toxenv.outputs.toxenv }}
35 changes: 3 additions & 32 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,37 +1,8 @@
# Tox is broken with Python 2.4
# setuptools is broken with Python 2.5
# pythonz is broken with Python 3.0
# Pip 1.5.4 (distributed with Ubuntu 14.04) is broken with Python 3.1
[tox]
envlist = py26,py27,py32,py33,py34
envlist = py{27,35,36,37,38}
requires =
setuptools >= 30.3.0

[testenv]
changedir=tests
commands=python testall.py

[testenv:py24]
basepython = {homedir}/.pythonz/pythons/CPython-2.4.6/bin/python

[testenv:py25]
basepython = {homedir}/.pythonz/pythons/CPython-2.5.6/bin/python

[testenv:py26]
basepython = {homedir}/.pythonz/pythons/CPython-2.6.9/bin/python

[testenv:py27]
basepython = {homedir}/.pythonz/pythons/CPython-2.7.8/bin/python

[testenv:py30]
basepython = {homedir}/.pythonz/pythons/CPython-3.0.1/bin/python

[testenv:py31]
basepython = {homedir}/.pythonz/pythons/CPython-3.1.5/bin/python

[testenv:py32]
basepython = {homedir}/.pythonz/pythons/CPython-3.2.5/bin/python

[testenv:py33]
basepython = {homedir}/.pythonz/pythons/CPython-3.3.5/bin/python

[testenv:py34]
basepython = {homedir}/.pythonz/pythons/CPython-3.4.1/bin/python

0 comments on commit ca9af60

Please sign in to comment.