Skip to content

Commit 87aff89

Browse files
workflow changes
1 parent 18961b4 commit 87aff89

9 files changed

Lines changed: 72 additions & 89 deletions

File tree

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/pr-link.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: PR Link ticket
2-
on:
2+
on:
33
pull_request:
44
types: [opened]
55
jobs:
@@ -9,21 +9,15 @@ jobs:
99
REF: ${{ github.event.pull_request.head.ref }}
1010
steps:
1111
- name: Check ticket name conforms to requirements
12-
run: echo "$REF" | grep -i -E -q "(aea-[0-9]+)|(apm-[0-9]+)|(apmspii-[0-9]+)|(adz-[0-9]+)|(amb-[0-9]+)|(dependabot\/)"
12+
run: echo "$REF" | grep -i -E -q "(eli-[0-9]+)|(dependabot\/)"
1313
continue-on-error: true
1414

1515
- name: Grab ticket name
16-
if: contains(github.event.pull_request.head.ref, 'aea-') || contains(github.event.pull_request.head.ref, 'AEA-') || contains(github.event.pull_request.head.ref, 'apm-') || contains(github.event.pull_request.head.ref, 'APM-') || contains(github.event.pull_request.head.ref, 'apmspii-') || contains(github.event.pull_request.head.ref, 'APMSPII-') || contains(github.event.pull_request.head.ref, 'adz-') || contains(github.event.pull_request.head.ref, 'ADZ-') || contains(github.event.pull_request.head.ref, 'amb-') || contains(github.event.pull_request.head.ref, 'AMB-')
16+
if: contains(github.event.pull_request.head.ref, 'eli-')
1717
continue-on-error: true
1818
run: |
1919
# Match ticket name patterns
20-
REGEX='
21-
(aea-[0-9]+)|
22-
(apm-[0-9]+)|
23-
(apmspii-[0-9]+)|
24-
(adz-[0-9]+)|
25-
(amb-[0-9]+)
26-
'
20+
REGEX='(eli-[0-9]+)'
2721
2822
# Remove whitespace and newlines from the regex
2923
REGEX=$(echo "$REGEX" | tr -d '[:space:]')
@@ -35,12 +29,12 @@ jobs:
3529
echo "TICKET_NAME=$TICKET_NAME" >> "$GITHUB_ENV"
3630
3731
- name: Comment on PR with link to JIRA ticket
38-
if: contains(github.event.pull_request.head.ref, 'aea-') || contains(github.event.pull_request.head.ref, 'AEA-') || contains(github.event.pull_request.head.ref, 'apm-') || contains(github.event.pull_request.head.ref, 'APM-') || contains(github.event.pull_request.head.ref, 'apmspii-') || contains(github.event.pull_request.head.ref, 'APMSPII-') || contains(github.event.pull_request.head.ref, 'adz-') || contains(github.event.pull_request.head.ref, 'ADZ-') || contains(github.event.pull_request.head.ref, 'amb-') || contains(github.event.pull_request.head.ref, 'AMB-')
32+
if: contains(github.event.pull_request.head.ref, 'eli-')
3933
continue-on-error: true
4034
uses: unsplash/comment-on-pr@b5610c6125a7197eaec80072ea35ef53e1fc6035
4135
env:
4236
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4337
with:
4438
msg: |
45-
This branch is work on a ticket in an NHS Digital JIRA Project. Here's a handy link to the ticket:
39+
This branch is work on a ticket in an NHS England JIRA Project. Here's a handy link to the ticket:
4640
# [${{ env.TICKET_NAME }}](https://nhsd-jira.digital.nhs.uk/browse/${{ env.TICKET_NAME }})

.github/workflows/pr_title_check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
echo "PR title is not prefixed with change type."
1818
echo "Please prefix your PR title with a change type (Fix, Update, New, Breaking, Docs, Build, Upgrade, Chore)."
1919
echo "See the contributing guide for more details:"
20-
echo "https://github.com/NHSDigital/eps-prescription-status-update-api/blob/main/CONTRIBUTING.md"
20+
echo "https://github.com/NHSDigital/eligibility-signposting-api-regression-tests/blob/main/CONTRIBUTING.md"
2121
exit 1
2222
fi
2323
- name: Check PR Title contains Ticket/Dependabot Reference
@@ -28,6 +28,6 @@ jobs:
2828
echo "PR title contains ticket or dependabot reference."
2929
else
3030
echo "PR title does not contain ticket or dependabot reference."
31-
echo "Please ensure PR title contains a ticket (eg. 'Fix: [AEA-####] - ...', or 'Chore: [dependabot] - ...')."
31+
echo "Please ensure PR title contains a ticket (eg. 'Fix: [ELI-####] - ...', or 'Chore: [dependabot] - ...')."
3232
exit 1
3333
fi

.github/workflows/pull_request.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ env:
99

1010
jobs:
1111
quality_checks:
12-
uses: NHSDigital/eps-workflow-quality-checks/.github/workflows/quality-checks.yml@v4.0.5
12+
uses: .github/workflows/quality-checks.yml
1313
secrets:
1414
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
15-
15+
1616
pr_title_format_check:
1717
uses: ./.github/workflows/pr_title_check.yml
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Quality Checks
2+
3+
on:
4+
workflow_call:
5+
secrets:
6+
SONAR_TOKEN:
7+
required: false
8+
9+
jobs:
10+
quality_checks:
11+
runs-on: ubuntu-22.04
12+
steps:
13+
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
with:
17+
ref: ${{ env.BRANCH_NAME }}
18+
fetch-depth: 0
19+
20+
- name: Check licenses (Makefile)
21+
run: |
22+
make check-licenses
23+
24+
- name: Check licenses (Python)
25+
run: make check-licenses
26+
27+
- name: Run code lint
28+
run: make lint
29+
30+
- name: actionlint
31+
uses: raven-actions/actionlint@v2
32+
33+
- name: Run ShellCheck
34+
uses: ludeeus/action-shellcheck@master
35+
with:
36+
ignore_paths: >-
37+
*test*
38+
.venv
39+
node_modules
40+
.git
41+
42+
- name: "check is SONAR_TOKEN exists"
43+
env:
44+
super_secret: ${{ secrets.SONAR_TOKEN }}
45+
if: ${{ env.super_secret != '' }}
46+
run: echo "SONAR_TOKEN_EXISTS=true" >> "$GITHUB_ENV"
47+
48+
- name: Run SonarQube analysis
49+
if: ${{ env.SONAR_TOKEN_EXISTS == 'true' }}
50+
run: mvn sonar:sonar -Dsonar.login=${{ secrets.SONAR_TOKEN }}
51+
52+
- name: SonarCloud Scan
53+
uses: SonarSource/sonarqube-scan-action@master
54+
if: ${{ env.SONAR_TOKEN_EXISTS == 'true' }}
55+
env:
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.github/workflows/regression_tests.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
description: 'Environment to run tests against'
1212
type: environment
1313
required: true
14-
default: "DEV"
14+
default: "dev"
1515
id:
1616
description: 'Unique run identifier (Do not change this)'
1717
required: false
@@ -30,8 +30,6 @@ jobs:
3030
runs-on: ubuntu-22.04
3131
environment: ${{ inputs.environment }}
3232
steps:
33-
# we need to leave this step in as run_regression test scripts expect the third step in the job to have the name of the input id
34-
# the first step is auto generated 'set up job' step
3533
- name: show_input_parameters
3634
env:
3735
tags: ${{ inputs.tags }}
@@ -62,11 +60,6 @@ jobs:
6260
echo run identifier "$ID"-"$ENV"-"$PULL_REQUEST_ID"
6361
echo run identifier "$ID"-"$ENV"-"$PULL_REQUEST_ID" >> "$GITHUB_STEP_SUMMARY"
6462
65-
run_regression_tests:
66-
runs-on: ubuntu-22.04
67-
environment: ${{ inputs.environment }}
68-
needs: [regression_tests]
69-
steps:
7063
- name: Checkout
7164
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
7265
with:
@@ -124,8 +117,7 @@ jobs:
124117
ENVIRONMENT: ${{ inputs.environment }}
125118
PULL_REQUEST_ID: ${{ inputs.pull_request_id }}
126119
INPUT_TAG: ${{ inputs.tags }}
127-
run: |
128-
echo Automated E2E Regression tests coming soon
120+
run: make run-tests
129121

130122
- name: force error on failure
131123
if: steps.tests.outcome != 'success'

.github/workflows/release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ env:
99

1010
jobs:
1111
quality_checks:
12-
uses: NHSDigital/eps-workflow-quality-checks/.github/workflows/quality-checks.yml@v4.0.5
12+
uses: .github/workflows/quality-checks.yml
1313
secrets:
1414
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
1515

@@ -68,7 +68,6 @@ jobs:
6868

6969
- name: Install node packages
7070
run: |
71-
export PATH="/home/runner/.asdf/installs/poetry/2.1.4/bin:$PATH"
7271
make install-node
7372
7473
- name: Set VERSION_TAG env var to be short git SHA and get next tag version

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ lint-flake8:
5454

5555
lint: lint-black lint-pyright lint-flake8
5656

57-
run-tests: guard-env
57+
run-tests-old: guard-env
5858
echo "Running Regression Tests"
5959
poetry run python ./runner.py --env=$(env) --tags=$(tags)
6060

@@ -76,5 +76,5 @@ deep-clean-install:
7676
pre-commit:
7777
poetry run pre-commit run --all-files
7878

79-
run-all-tests:
79+
run-tests:
8080
poetry run pytest

0 commit comments

Comments
 (0)