Skip to content

Commit

Permalink
Add Python 3.12 CI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
larrybradley committed Sep 26, 2023
1 parent 2214bf9 commit 01b1c0f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@ jobs:
allow_failure: true
prefix: '(Allowed failure)'

- os: ubuntu-latest
python: '3.12-dev'
tox_env: 'py312-test-devdeps'
toxposargs: --remote-data=any
allow_failure: true
prefix: '(Allowed failure)'

steps:
- name: Check out repository
uses: actions/checkout@v4
Expand All @@ -114,9 +121,7 @@ jobs:
with:
python-version: ${{ matrix.python }}
- name: Install base dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
run: python -m pip install --upgrade pip setuptools tox
- name: Print Python, pip, setuptools, and tox versions
run: |
python -c "import sys; print(f'Python {sys.version}')"
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ filterwarnings = [
'error', # turn warnings into exceptions
'ignore:numpy.ufunc size changed:RuntimeWarning',
'ignore:numpy.ndarray size changed:RuntimeWarning',
# python 3.12 deprecation in matplotlib 3.9dev
'ignore:datetime.datetime.utcfromtimestamp\(\) is deprecated:DeprecationWarning',
]

[tool.coverage.run]
Expand Down
7 changes: 5 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
envlist =
py{39,310,311}-test{,-alldeps,-devdeps,-oldestdeps,-devinfra}{,-cov}
py{39,310,311}-test-numpy{122,123,124,125,126}
py{39,310,311,312}-test{,-alldeps,-devdeps,-oldestdeps,-devinfra}{,-cov}
py{39,310,311,312}-test-numpy{122,123,124,125,126}
build_docs
linkcheck
codestyle
Expand Down Expand Up @@ -83,6 +83,9 @@ extras =
build_docs: docs

commands =
# Force numpy-dev after matplotlib downgrades it
# (https://github.com/matplotlib/matplotlib/issues/26847)
devdeps: python -m pip install --pre --upgrade --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy
pip freeze
pytest --pyargs lacosmic {toxinidir}/docs \
cov: --cov lacosmic --cov-config={toxinidir}/pyproject.toml --cov-report xml:{toxinidir}/coverage.xml --cov-report term-missing \
Expand Down

0 comments on commit 01b1c0f

Please sign in to comment.