Skip to content

Commit dc0bb75

Browse files
authored
Merge branch 'main' into feature/eja-eli-759-adding-repo-check-for-regression-tests
2 parents 5bdf60b + b41af0c commit dc0bb75

55 files changed

Lines changed: 819 additions & 145 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/error_handling_utils_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout code
17-
uses: actions/checkout@v6
17+
uses: actions/checkout@v6.0.2
1818

1919
- name: Set up Python
2020
uses: actions/setup-python@v6

.github/workflows/my-vaccs-int-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
echo "Workflow triggered by allowed repository: $CALLER_REPO"
4444
4545
- name: Checkout main
46-
uses: actions/checkout@v6
46+
uses: actions/checkout@v6.0.2
4747
with:
4848
repository: NHSDigital/eligibility-signposting-api-regression-tests
4949
ref: main

.github/workflows/performance_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
echo "spawn_rate: ${spawn_rate}"
5353
5454
- name: Checkout
55-
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
55+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
5656

5757
# using git commit sha for version of action to ensure we have stable version
5858
- name: Install asdf

.github/workflows/quality-checks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-22.04
1212
steps:
1313
- name: Checkout code
14-
uses: actions/checkout@v6
14+
uses: actions/checkout@v6.0.2
1515
with:
1616
ref: ${{ github.event.pull_request.head.sha || github.sha }}
1717
fetch-depth: 0
@@ -69,7 +69,7 @@ jobs:
6969
.git
7070
7171
- name: SonarQube
72-
uses: actions/checkout@v6
72+
uses: actions/checkout@v6.0.2
7373
with:
7474
ref: ${{ github.event.pull_request.head.sha || github.sha }}
7575
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis

.github/workflows/regression_tests.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,32 @@ jobs:
6767
runs-on: ubuntu-22.04
6868
environment: ${{ inputs.environment }}
6969
steps:
70+
- name: Verify caller repository
71+
run: |
72+
ALLOWED_REPOS=("NHSDigital/eligibility-signposting-api")
73+
CALLER_REPO="${{ github.repository }}"
74+
75+
# If triggered by workflow_call, the calling repo is in github.repository
76+
# If triggered manually, it's this repo itself which is allowed
77+
if [[ "${{ github.event_name }}" == "workflow_call" ]]; then
78+
CALLER_REPO="${{ github.event.workflow_run.repository.full_name || github.repository }}"
79+
fi
80+
81+
ALLOWED=false
82+
for repo in "${ALLOWED_REPOS[@]}"; do
83+
if [[ "$CALLER_REPO" == "$repo" ]]; then
84+
ALLOWED=true
85+
break
86+
fi
87+
done
88+
89+
if [[ "$ALLOWED" == "false" && "${{ github.event_name }}" == "workflow_call" ]]; then
90+
echo "Error: Repository $CALLER_REPO is not allowed to trigger this workflow"
91+
exit 1
92+
fi
93+
94+
echo "Workflow triggered by allowed repository: $CALLER_REPO"
95+
7096
- name: show_input_parameters
7197
env:
7298
tags: ${{ inputs.tags }}

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
spec_version: ${{steps.output_version_tag.outputs.SPEC_VERSION}}
3131
steps:
3232
- name: Checkout code
33-
uses: actions/checkout@v6
33+
uses: actions/checkout@v6.0.2
3434
with:
3535
ref: ${{ env.BRANCH_NAME }}
3636
fetch-depth: 0

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,5 +98,8 @@ endif
9898
run-vita-preprod-tests:
9999
poetry run pytest --env=preprod --log-cli-level=info tests/test_vita_integration_tests.py tests/test_upload_consumer_configs.py
100100

101+
run-nbs-preprod-tests:
102+
poetry run pytest --env=preprod --log-cli-level=info tests/test_nbs_integration_tests.py tests/test_upload_consumer_configs.py
103+
101104
run-unit-tests: guard-env guard-log_level
102105
poetry run pytest --env=${env} --log-cli-level=${log_level} tests/test_error_handling_utils.py -v

data/configs/consumerMappings/consumer_mapping_config.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,32 @@
1919
],
2020
"test-P.XWA-VFF": [
2121
{
22-
"CampaignConfigID": "7fcb742b-45fa-4w0d-8f2f-9c2efb1f46d1",
22+
"CampaignConfigID": "7fcb742b-43fa-4a0d-8f2f-9c2efb1f46d1",
2323
"Description": "RSV Ongoing for NBS"
2424
},
2525
{
2626
"CampaignConfigID": "b21cff69-a2c7-4e78-a514-ce067c09df0c",
2727
"Description": "FLU Ongoing for NBS"
2828
},
29+
{
30+
"CampaignConfigID": "3ecb346g-45ea-4g0d-8e2e-9g2feb1e46d0",
31+
"Description": "COVID Ongoing for NBS"
32+
},
2933
{
3034
"CampaignConfigID": "NBS_Campaign_Config_ID_RSV",
3135
"Description": "RSV Test Config for NBS"
3236
},
3337
{
3438
"CampaignConfigID": "NBS_Campaign_Config_ID_COVID",
35-
"Description": "COVID Ongoing for NBS"
39+
"Description": "COVID Test for NBS"
3640
},
3741
{
3842
"CampaignConfigID": "NBS_Campaign_Config_ID_COVID_ACTIVE",
3943
"Description": "COVID Ongoing for NBS"
4044
},
4145
{
4246
"CampaignConfigID": "NBS_Campaign_Config_ID_FLU",
43-
"Description": "Flu for NBS Story Tests"
47+
"Description": "Flu Test for NBS"
4448
},
4549
{
4650
"CampaignConfigID": "VITA_NBS_Campaign_Config_ID_COVID",

data/configs/consumerMappings/preprod/consumer_mapping_config.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,24 @@
1919
],
2020
"P.XWA-VFF": [
2121
{
22-
"CampaignConfigID": "7fcb742b-45fa-4w0d-8f2f-9c2efb1f46d1",
22+
"CampaignConfigID": "7fcb742b-43fa-4a0d-8f2f-9c2efb1f46d1",
2323
"Description": "RSV Ongoing for NBS"
2424
},
2525
{
2626
"CampaignConfigID": "b21cff69-a2c7-4e78-a514-ce067c09df0c",
2727
"Description": "FLU Ongoing for NBS"
2828
},
29+
{
30+
"CampaignConfigID": "3ecb346g-45ea-4g0d-8e2e-9g2feb1e46d0",
31+
"Description": "COVID Ongoing for NBS"
32+
},
2933
{
3034
"CampaignConfigID": "NBS_Campaign_Config_ID_RSV",
31-
"Description": "RSV Ongoing for NBS"
35+
"Description": "RSV Test for NBS"
3236
},
3337
{
3438
"CampaignConfigID": "NBS_Campaign_Config_ID_COVID",
35-
"Description": "COVID Ongoing for NBS"
39+
"Description": "COVID Test Config for NBS"
3640
},
3741
{
3842
"CampaignConfigID": "NBS_Campaign_Config_ID_COVID_ACTIVE",

0 commit comments

Comments
 (0)