Skip to content

Commit eb2475f

Browse files
committed
Initial refactoring of pipelines
1 parent 48fd36d commit eb2475f

File tree

5 files changed

+33
-8
lines changed

5 files changed

+33
-8
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: PR Quality Check
1+
name: Create PR JIRA Link
22
on:
33
pull_request:
44
types: [opened]
Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: SonarCloud
1+
name: Quality Checks
22

33
on:
44
push:
@@ -12,14 +12,38 @@ env:
1212
LAMBDA_PATH: ${{ github.workspace }}/lambdas
1313

1414
jobs:
15-
sonarcloud:
16-
name: SonarCloud
15+
lint:
16+
name: Lint specification and Python projects
1717
runs-on: ubuntu-latest
18-
18+
1919
steps:
2020
- uses: actions/checkout@v5
21+
22+
- name: Install poetry
23+
run: pip install poetry==2.1.4
24+
25+
- uses: actions/setup-python@v5
2126
with:
22-
fetch-depth: 0
27+
python-version: 3.8
28+
cache: 'poetry'
29+
30+
- uses: actions/setup-node@v5
31+
with:
32+
node-version: '23.11.0'
33+
cache: 'npm'
34+
35+
- name: Install linting dependencies
36+
run: make install-node && poetry install --no-root
37+
38+
- name: Lint
39+
run: make lint
40+
41+
testcoverage_and_sonarcloud:
42+
name: Test Coverage and SonarCloud
43+
runs-on: ubuntu-latest
44+
45+
steps:
46+
- uses: actions/checkout@v5
2347

2448
- name: Install poetry
2549
run: pip install poetry==2.1.4

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ It is not necessary to activate the virtual environment (using `source .venv/bin
175175
The root-level virtual environment is primarily used for linting, as we create separate virtual environments for each folder that contains Lambda functions.
176176
Steps:
177177
1. Follow instructions above to [install dependencies](#install-dependencies) & [set up a virtual environment](#setting-up-a-virtual-environment-with-poetry).
178-
**Note: While this project uses Python 3.10 (e.g. for Lambdas), the NHSDigital/api-management-utils repository — which orchestrates setup and linting — defaults to Python 3.8.
178+
**Note: While this project uses Python 3.11 (e.g. for Lambdas), the NHSDigital/api-management-utils repository — which orchestrates setup and linting — defaults to Python 3.8.
179179
The linting command is executed from within that repo but calls the Makefile in this project, so be aware of potential Python version mismatches when running or debugging locally or in the pipeline.**
180180
2. Run `make lint`. This will:
181181
- Check the linting of the API specification yaml.

README.specification.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ To get started developing your API use this template repo alongside guidance pro
102102
This folder contains templates that can be customised for items such as opening pull requests or issues within the repo
103103

104104
`/.github/workflows`: This folder contains templates for github action workflows such as:
105-
- `pr-lint.yaml`: This workflow template shows how to link Pull Request's to Jira tickets and runs when a pull request is opened.
105+
- `pr-jira-link.yaml`: This workflow template links Pull Requests to Jira tickets and runs when a pull request is opened.
106106
- `continuous-integration.yml`: This workflow template shows how to publish a Github release when pushing to master.
107107

108108
#### `/azure`:

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[project]
2+
name = "immunisation-fhir-api"
23
python = "^3.8"
34

45
[tool.poetry]

0 commit comments

Comments
 (0)