Skip to content

Commit

Permalink
Add python 3.10.0-rc2 to GitHub Actions (#475)
Browse files Browse the repository at this point in the history
* Add python 3.10.0-rc.2 to GitHub Actions

* Make separate CI job for 3.10 to avoid conda failure

* Fix docs job in CI so that it now executes correctly
  • Loading branch information
FollowTheProcess authored Sep 9, 2021
1 parent 8ee3ebe commit d537c55
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,28 @@ jobs:
python -m pip install --disable-pip-version-check .
- name: Run tests on ${{ matrix.os }}
run: nox --non-interactive --session "tests-${{ matrix.python-version }}" -- --full-trace

build-py310:
name: Build python 3.10
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-2019]
python-version: ["3.10.0-rc.2"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# Conda does not support 3.10 yet, hence why it's skipped here
# TODO: Merge the two build jobs when 3.10 is released for conda
- name: Install Nox-under-test
run: |
python -m pip install --disable-pip-version-check .
- name: Run tests on ${{ matrix.os }}
run: nox --non-interactive --session "tests-${{ matrix.python-version }}" -- --full-trace

lint:
runs-on: ubuntu-20.04
steps:
Expand Down
6 changes: 4 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ def is_python_version(session, version):
return py_version.startswith(version)


@nox.session(python=["3.6", "3.7", "3.8", "3.9"])
# TODO: When 3.10 is released, change the version below to 3.10
# this is here so GitHub actions can pick up on the session name
@nox.session(python=["3.6", "3.7", "3.8", "3.9", "3.10.0-rc.2"])
def tests(session):
"""Run test suite with pytest."""
session.create_tmp()
Expand Down Expand Up @@ -103,7 +105,7 @@ def lint(session):
session.run("flake8", *files)


@nox.session(python="3.7")
@nox.session(python="3.8")
def docs(session):
"""Build the documentation."""
output_dir = os.path.join(session.create_tmp(), "output")
Expand Down

0 comments on commit d537c55

Please sign in to comment.