Skip to content

Commit

Permalink
Use tox 4.0 in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnoe committed Jan 2, 2023
1 parent 2b74b87 commit 6b480b5
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
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
9 changes: 5 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ requires =
setuptools >= 30.3.0
pip >= 19.3.1
tox-pypi-filter >= 0.12
tox < 4
isolated_build = true

[testenv]

Expand All @@ -23,7 +21,7 @@ isolated_build = true
pypi_filter = https://raw.githubusercontent.com/astropy/ci-helpers/main/pip_pinnings.txt

# 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 All @@ -34,6 +32,8 @@ setenv =
clocale: LC_CTYPE = C.ascii
clocale: LC_ALL = C
devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/scipy-wheels-nightly/simple
PYTHONHASHSEED = 1


# Run the tests in a temporary directory to make sure that we don't import
# astropy from the source tree
Expand Down Expand Up @@ -132,7 +132,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

0 comments on commit 6b480b5

Please sign in to comment.