Skip to content

Commit 620b5fb

Browse files
committed
Specify Python version using .tool-versions
This file is a fairly standard approach to managing different versions of Python and it ensures that our CI environment stays in sync with the local version of Python.
1 parent f1b467a commit 620b5fb

File tree

3 files changed

+13
-25
lines changed

3 files changed

+13
-25
lines changed

.github/workflows/MAVIS_TEST.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ jobs:
2121

2222
steps:
2323
- uses: actions/checkout@v4
24-
- name: Set up Python 3.13
25-
uses: actions/setup-python@v3
24+
- uses: actions/setup-python@v5
2625
with:
27-
python-version: "3.13"
26+
python-version-file: .tool-versions
2827
- name: Install dependencies
2928
run: |
3029
python -m pip install --upgrade pip

.tool-versions

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,2 @@
1-
# This file is for you! Please, updated to the versions agreed by your team.
2-
31
editorconfig-checker 3.2.1
4-
5-
# ==============================================================================
6-
# The section below is reserved for Docker image versions.
7-
8-
# TODO: Move this section - consider using a different file for the repository template dependencies.
9-
# docker/ghcr.io/anchore/grype v0.69.1@sha256:d41fcb371d0af59f311e72123dff46900ebd6d0482391b5a830853ee4f9d1a76 # SEE: https://github.com/anchore/grype/pkgs/container/grype
10-
# docker/ghcr.io/anchore/syft v0.92.0@sha256:63c60f0a21efb13e80aa1359ab243e49213b6cc2d7e0f8179da38e6913b997e0 # SEE: https://github.com/anchore/syft/pkgs/container/syft
11-
# docker/ghcr.io/gitleaks/gitleaks v8.18.0@sha256:fd2b5cab12b563d2cc538b14631764a1c25577780e3b7dba71657d58da45d9d9 # SEE: https://github.com/gitleaks/gitleaks/pkgs/container/gitleaks
12-
# docker/ghcr.io/igorshubovych/markdownlint-cli v0.37.0@sha256:fb3e79946fce78e1cde84d6798c6c2a55f2de11fc16606a40d49411e281d950d # SEE: https://github.com/igorshubovych/markdownlint-cli/pkgs/container/markdownlint-cli
13-
# docker/ghcr.io/make-ops-tools/gocloc latest@sha256:6888e62e9ae693c4ebcfed9f1d86c70fd083868acb8815fe44b561b9a73b5032 # SEE: https://github.com/make-ops-tools/gocloc/pkgs/container/gocloc
14-
# docker/ghcr.io/nhs-england-tools/github-runner-image 20230909-321fd1e-rt@sha256:ce4fd6035dc450a50d3cbafb4986d60e77cb49a71ab60a053bb1b9518139a646 # SEE: https://github.com/nhs-england-tools/github-runner-image/pkgs/container/github-runner-image
15-
# docker/hadolint/hadolint 2.12.0-alpine@sha256:7dba9a9f1a0350f6d021fb2f6f88900998a4fb0aaf8e4330aa8c38544f04db42 # SEE: https://hub.docker.com/r/hadolint/hadolint/tags
16-
# docker/hashicorp/terraform 1.5.6@sha256:180a7efa983386a27b43657ed610e9deed9e6c3848d54f9ea9b6cb8a5c8c25f5 # SEE: https://hub.docker.com/r/hashicorp/terraform/tags
17-
# docker/jdkato/vale v2.29.7@sha256:5ccfac574231b006284513ac3e4e9f38833989d83f2a68db149932c09de85149 # SEE: https://hub.docker.com/r/jdkato/vale/tags
18-
# docker/koalaman/shellcheck latest@sha256:e40388688bae0fcffdddb7e4dea49b900c18933b452add0930654b2dea3e7d5c # SEE: https://hub.docker.com/r/koalaman/shellcheck/tags
19-
# docker/mstruebing/editorconfig-checker 2.7.1@sha256:dd3ca9ea50ef4518efe9be018d669ef9cf937f6bb5cfe2ef84ff2a620b5ddc24 # SEE: https://hub.docker.com/r/mstruebing/editorconfig-checker/tags
20-
# docker/sonarsource/sonar-scanner-cli 5.0.1@sha256:494ecc3b5b1ee1625bd377b3905c4284e4f0cc155cff397805a244dee1c7d575 # SEE: https://hub.docker.com/r/sonarsource/sonar-scanner-cli/tags
2+
python 3.13.3

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,23 @@ It is currently configured to run on the QA environment. The project utilizes t
1010

1111
## Installation
1212

13-
This test pack requires Python 3.10 installed on the system or greater to run.
14-
15-
To execute the tests from your system, please follow the 4 easy steps below:
13+
To execute the tests from your system, please follow the steps below:
1614

1715
1. Clone the repository to any local folder
1816

1917
```console
2018
git clone https://github.com/NHSDigital/manage-vaccinations-in-schools-testing.git
2119
```
2220

21+
1. Install Python
22+
23+
The version of Python is specified in the `.tool-versions` file meaning it can be managed automatically using tools
24+
such as [Mise](https://mise.jdx.dev) or [Asdf](https://asdf-vm.com).
25+
26+
```console
27+
mise install
28+
```
29+
2330
1. Create a virtual environment
2431

2532
```console

0 commit comments

Comments
 (0)