Skip to content

Commit

Permalink
Updates for tox and sphinx (#157)
Browse files Browse the repository at this point in the history
* Updates for tox and sphinx

* what a mess

* Remove -W for tests

* Ignore progress_message deprecation from Sphinx

* Put -W back and see what happens

* Bump workflow versions

* No clocale for Windows

* No longer need to ignore progress_message

* Nope still need it

* I don't care about Apple products

Co-authored-by: P. L. Lim <2090236+pllim@users.noreply.github.com>
  • Loading branch information
saimn and pllim committed Jan 20, 2023
1 parent 13d0033 commit 0479bd4
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 13 deletions.
28 changes: 17 additions & 11 deletions .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,17 @@ jobs:
- os: ubuntu-latest
python-version: '3.10'
toxenv: py310-test-sphinxdev
- os: ubuntu-latest
python-version: '3.11'
toxenv: py310-test-sphinx53
- os: ubuntu-latest
python-version: '3.11'
toxenv: py310-test-sphinx61

# MacOS X - just the oldest, stable, and dev
- os: macos-latest
python-version: 3.7
toxenv: py37-test-sphinx24
#- os: macos-latest
# python-version: 3.7
# toxenv: py37-test-sphinx24
- os: macos-latest
python-version: 3.8
toxenv: py38-test-sphinx43-clocale
Expand All @@ -57,22 +63,22 @@ jobs:
toxenv: py39-test-sphinxdev

# Windows - just the oldest, stable, and dev
- os: windows-2019
- os: windows-latest
python-version: 3.7
toxenv: py37-test-sphinx24
- os: windows-2019
- os: windows-latest
python-version: 3.8
toxenv: py38-test-sphinx43-clocale
- os: windows-2019
toxenv: py38-test-sphinx43
- os: windows-latest
python-version: 3.9
toxenv: py39-test-sphinxdev

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install graphviz on Linux
Expand All @@ -89,14 +95,14 @@ jobs:
if: startsWith(matrix.os, 'windows')
run: choco install graphviz
- name: Install tox
run: python -m pip install "tox<4"
run: python -m pip install tox
- name: Install codecov
if: ${{ contains(matrix.toxenv,'-cov') }}
run: python -m pip install codecov
- name: Run tox
run: tox ${{ matrix.toxargs }} -v -e ${{ matrix.toxenv }}
- name: Upload coverage to codecov
if: ${{ contains(matrix.toxenv,'-cov') }}
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ filterwarnings =
ignore:'contextfunction' is renamed to 'pass_context':DeprecationWarning
ignore:'environmentfilter' is renamed to 'pass_environment':DeprecationWarning
ignore:distutils Version classes are deprecated:DeprecationWarning
ignore:'imghdr' is deprecated and slated for removal in Python 3.13:DeprecationWarning
ignore:The alias 'sphinx\.util\.SkipProgressMessage' is deprecated
ignore:The alias 'sphinx\.util\.progress_message' is deprecated

[flake8]
max-line-length = 125
Expand Down
7 changes: 5 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{37,38,39,310}-test-sphinx{24,35,40,41,42,43,dev}{,-cov}{-clocale,}
envlist = py{37,38,39,310,311}-test-sphinx{24,35,40,41,42,43,53,60,61,dev}{,-cov}{-clocale,}
requires = pip >= 18.0
setuptools >= 30.3.0
isolated_build = true
Expand All @@ -15,6 +15,9 @@ deps =
sphinx41: sphinx==4.1.*
sphinx42: sphinx==4.2.*
sphinx43: sphinx==4.3.*
sphinx53: sphinx==5.3.*
sphinx60: sphinx==6.0.*
sphinx61: sphinx==6.1.*
sphinxdev: git+https://github.com/sphinx-doc/sphinx.git
extras =
test: test
Expand All @@ -23,7 +26,7 @@ commands =
!cov: pytest --pyargs sphinx_automodapi
cov: pytest --pyargs sphinx_automodapi --cov sphinx_automodapi --cov-config={toxinidir}/setup.cfg {posargs}
cov: coverage xml -o {toxinidir}/coverage.xml
passenv = HOME WINDIR LC_ALL LC_CTYPE LANG CC CI
passenv = HOME, WINDIR, LC_ALL, LC_CTYPE, LANG, CC, CI
setenv =
cov: CFLAGS = --coverage -fno-inline-functions -O0
clocale: LC_CTYPE=C
Expand Down

0 comments on commit 0479bd4

Please sign in to comment.