From d00d70f410edb30faaa471a2a015c595f9bc510b Mon Sep 17 00:00:00 2001 From: Tom Fleet Date: Thu, 9 Sep 2021 18:19:29 +0100 Subject: [PATCH 1/3] Add python 3.10.0-rc.2 to GitHub Actions --- .github/workflows/ci.yml | 2 +- noxfile.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a73d7b30..533a090f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ jobs: strategy: matrix: os: [ubuntu-20.04, windows-2019] - python-version: [3.6, 3.7, 3.8, 3.9] + python-version: [3.6, 3.7, 3.8, "3.10.0-rc.2"] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} diff --git a/noxfile.py b/noxfile.py index 36150cd8..25a8ee63 100644 --- a/noxfile.py +++ b/noxfile.py @@ -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() From b4f76c1dd3d20967c61a82d48fb9d3936e77110c Mon Sep 17 00:00:00 2001 From: Tom Fleet Date: Thu, 9 Sep 2021 18:24:23 +0100 Subject: [PATCH 2/3] Make separate CI job for 3.10 to avoid conda failure --- .github/workflows/ci.yml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 533a090f..9c0214ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ jobs: strategy: matrix: os: [ubuntu-20.04, windows-2019] - python-version: [3.6, 3.7, 3.8, "3.10.0-rc.2"] + python-version: [3.6, 3.7, 3.8, 3.9] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} @@ -23,6 +23,27 @@ 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 + - 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: From 3cb6c868f718be40dee01c3aee06aa8a3f5c75ef Mon Sep 17 00:00:00 2001 From: Tom Fleet Date: Thu, 9 Sep 2021 18:32:47 +0100 Subject: [PATCH 3/3] Fix docs job in CI so that it now executes correctly --- .github/workflows/ci.yml | 1 + noxfile.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9c0214ef..59cefcd1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,6 +38,7 @@ jobs: 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 . diff --git a/noxfile.py b/noxfile.py index 25a8ee63..6b31e022 100644 --- a/noxfile.py +++ b/noxfile.py @@ -105,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")