Skip to content

Commit

Permalink
Merge pull request #351 from ral-facilities/ci/python-3-10
Browse files Browse the repository at this point in the history
Add Python 3.10 to CI Testing
  • Loading branch information
MRichards99 authored Apr 4, 2022
2 parents c1e30ea + 72181f6 commit c737a44
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9"]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
name: Python ${{ matrix.python-version }} Build & Tests
steps:
- name: Add apt repo
Expand Down Expand Up @@ -103,6 +103,14 @@ jobs:
- name: Install older setuptools
run: poetry run pip install 'setuptools<58.0.0'

# This command is a workaround for getting Poetry working with Python 3.10. An
# fix is made in Poetry 1.2.0a2 but there is currently no official release for
# Poetry 1.2 and am apprehensive to moving to a pre-release. Disabling the
# experimental installer is a workaround for Poetry 1.1.x
# See https://github.com/python-poetry/poetry/issues/4210 for more details
- name: Disable Poetry's experimental new installer
run: poetry config experimental.new-installer false

- name: Install dependencies
run: poetry install

Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,10 @@ poetry remove python-icat
poetry add python-icat=0.21.0
```

If using Python 3.10, please use Payara 5 on the ICAT stack which the API is being
pointed at. There is a known issue when making HTTPS connections to Payara (via Python
ICAT).


## DataGateway API Authentication
Each request requires a valid session ID to be provided in the Authorization header.
Expand Down Expand Up @@ -427,8 +431,8 @@ your test environment, using `config.json.example` as a reference. The tests req
connection to an instance of ICAT, so set the rest of the config as needed.

By default, this will execute the repo's tests in
Python 3.6, 3.7 and 3.8. For most cases, running the tests in a single Python version
will be sufficient:
Python 3.6, 3.7, 3.8, 3.9 and 3.10. For most cases, running the tests in a single Python
version will be sufficient:

```bash
nox -p 3.6 -s tests
Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def safety(session):
session.log("Error: The temporary requirements file could not be closed")


@nox.session(python=["3.6", "3.7", "3.8", "3.9"], reuse_venv=True)
@nox.session(python=["3.6", "3.7", "3.8", "3.9", "3.10"], reuse_venv=True)
def tests(session):
args = session.posargs
# Installing setuptools that will work with `2to3` which is used when building
Expand Down
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c737a44

Please sign in to comment.