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

Tox 4.0 compatibility #14139

Merged
merged 2 commits into from
Jan 16, 2023
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
command: |
sudo apt update
sudo apt install texlive texlive-latex-extra texlive-fonts-recommended dvipng cm-super
pip install pip "tox<4"
pip install pip tox --upgrade
- run:
name: Run tests
command: tox -v
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/ci_cron_daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ jobs:
fail-fast: false
matrix:
include:

- name: Bundling with pyinstaller
os: ubuntu-latest
python: 3.8
Expand All @@ -57,16 +56,20 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}

- name: Install language-pack-de and tzdata
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get update
sudo apt-get install language-pack-de tzdata

- name: Install Python dependencies
run: python -m pip install "tox<4"
run: python -m pip install --upgrade tox

- name: Run tests
run: tox ${{ matrix.toxargs}} -e ${{ matrix.toxenv}} -- ${{ matrix.toxposargs}}
2 changes: 1 addition & 1 deletion .github/workflows/ci_cron_weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
if: ${{ matrix.toxenv == 'linkcheck' }}
run: sudo apt-get install graphviz
- name: Install Python dependencies
run: python -m pip install --upgrade "tox<4"
run: python -m pip install --upgrade tox
- name: Run tests
run: tox ${{ matrix.toxargs}} -e ${{ matrix.toxenv}} -- ${{ matrix.toxposargs}}

Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ jobs:
with:
submodules: false
coverage: codecov
toxdeps: "'tox<4'"
libraries: |
apt:
- language-pack-fr
Expand Down Expand Up @@ -87,7 +86,6 @@ jobs:
with:
submodules: false
coverage: codecov
toxdeps: "'tox<4'"
libraries: |
apt:
- language-pack-de
Expand Down Expand Up @@ -118,7 +116,7 @@ jobs:
# test the ability to run the test suite in parallel.
# Numpy is pinned to avoid building it from source for numpy 1.21.5
- name: Install dependencies for Python 3.8
run: /opt/python/cp38-cp38/bin/pip install "tox<4"
run: /opt/python/cp38-cp38/bin/pip install --upgrade tox
- name: Run tests for Python 3.8
run: /opt/python/cp38-cp38/bin/python -m tox -e py38-numpy120-test -- -n=4 --durations=50
# We use the 3.8 build to check that running tests twice in a row in the
Expand Down
15 changes: 3 additions & 12 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,10 @@ envlist =
requires =
setuptools >= 30.3.0
pip >= 19.3.1
tox-pypi-filter >= 0.12
tox < 4
isolated_build = true
Cadair marked this conversation as resolved.
Show resolved Hide resolved

[testenv]

# The following option combined with the use of the tox-pypi-filter above allows
# project-wide pinning of dependencies, e.g. if new versions of pytest do not
# work correctly with pytest-astropy plugins. Most of the time the pinnings file
# should be empty.
pypi_filter = https://raw.githubusercontent.com/astropy/ci-helpers/main/pip_pinnings.txt
maxnoe marked this conversation as resolved.
Show resolved Hide resolved

# Pass through the following environment variables which are needed for the CI
passenv = HOME WINDIR LC_ALL LC_CTYPE CC CI IS_CRON ARCH_ON_CI
passenv = HOME,WINDIR,LC_ALL,LC_CTYPE,CC,CI,IS_CRON,ARCH_ON_CI

setenv =
NUMPY_WARN_IF_NO_MEM_POLICY = 1
Expand Down Expand Up @@ -132,7 +122,8 @@ pip_pre =
predeps: true
!predeps: false

# This lets developers to use tox to build docs and ignores warnings.

# This lets developers use tox to build docs and ignores warnings.
# This is not used in CI; For that, we have RTD PR builder.
[testenv:build_docs]
changedir = docs
Expand Down