Skip to content

Commit

Permalink
Use tox in GitHub CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jakkdl committed Oct 4, 2022
1 parent 08c4467 commit a39562a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
@@ -1,3 +1,4 @@
# Uses https://github.com/ymyzk/tox-gh-actions
name: ci

on: [push, pull_request]
Expand All @@ -8,7 +9,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", '3.11.0-rc - 3.11']
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11.0-rc - 3.11"]

os: [ubuntu-latest]

Expand All @@ -20,15 +21,14 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Update pip, setuptools + wheel
- name: Update pip and setuptools
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade pip setuptools
- name: Install flake8-bugbear w/dev extra install
- name: Install tox and tox-gh-actions
run: |
python -m pip install .[dev]
python -m pip install tox tox-gh-actions
- name: Run Unittests
- name: Run tox
run: |
coverage run tests/test_bugbear.py
coverage report -m
tox
1 change: 1 addition & 0 deletions pyproject.toml
Expand Up @@ -47,6 +47,7 @@ Homepage = "https://github.com/PyCQA/flake8-bugbear"

[project.optional-dependencies]
dev = [
"tox",
"coverage",
"hypothesis",
"hypothesmith>=0.2",
Expand Down
9 changes: 9 additions & 0 deletions tox.ini
Expand Up @@ -3,6 +3,14 @@
# default environments to run without `-e`
envlist = py37, py38, py39, py310, py311

[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310
"3.11.0-rc - 3.11": py311

[testenv:{py37, py38, py39, py310, py311}]
description = Run coverage
deps =
Expand All @@ -11,3 +19,4 @@ deps =
hypothesmith
commands =
coverage run tests/test_bugbear.py {posargs}
coverage report -m

0 comments on commit a39562a

Please sign in to comment.