Skip to content

Commit 79b3e23

Browse files
committed
eli-225 removing docs, adding linting and validation action
1 parent 31ccaad commit 79b3e23

Some content is hidden

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

61 files changed

+56
-3327
lines changed

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
scripts/docker/** linguist-vendored
22
scripts/githooks/** linguist-vendored
33
scripts/reports/** linguist-vendored
4-
scripts/terraform/** linguist-vendored
54
scripts/tests/test.mk linguist-vendored
65
scripts/init.mk linguist-vendored
76
scripts/shellscript-linter.sh linguist-vendored
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: "Lint and Validate OpenAPI v2 Spec"
2+
description: "Lint and validate an OpenAPI v2 (Swagger) specification using Spectral and Swagger CLI"
3+
inputs:
4+
spec-file:
5+
description: "Path to the OpenAPI v2 (Swagger) specification file"
6+
required: true
7+
8+
runs:
9+
using: "composite"
10+
steps:
11+
- name: Set up Node.js
12+
uses: actions/setup-node@v4
13+
with:
14+
node-version: '20'
15+
16+
- name: Install Spectral and Swagger CLI
17+
shell: bash
18+
run: |
19+
npm install -g @stoplight/spectral-cli swagger-cli
20+
21+
- name: Lint OpenAPI Spec with Spectral
22+
shell: bash
23+
run: spectral lint ${{ inputs.spec-file }}
24+
25+
- name: Validate OpenAPI Spec with Swagger CLI
26+
shell: bash
27+
run: swagger-cli validate ${{ inputs.spec-file }}

.github/actions/lint-terraform/action.yaml

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

.github/dependabot.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,3 @@ updates:
2121
directory: "/"
2222
schedule:
2323
interval: "daily"
24-
25-
- package-ecosystem: "terraform"
26-
directory: "/"
27-
schedule:
28-
interval: "daily"

.github/workflows/cicd-1-pull-request.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ jobs:
2121
build_epoch: ${{ steps.variables.outputs.build_epoch }}
2222
nodejs_version: ${{ steps.variables.outputs.nodejs_version }}
2323
python_version: ${{ steps.variables.outputs.python_version }}
24-
terraform_version: ${{ steps.variables.outputs.terraform_version }}
2524
version: ${{ steps.variables.outputs.version }}
2625
does_pull_request_exist: ${{ steps.pr_exists.outputs.does_pull_request_exist }}
2726
steps:
@@ -38,7 +37,6 @@ jobs:
3837
echo "build_epoch=$(date --date=$datetime -u +'%s')" >> $GITHUB_OUTPUT
3938
echo "nodejs_version=$(grep "^nodejs\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
4039
echo "python_version=$(grep "^python\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
41-
echo "terraform_version=$(grep "^terraform\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
4240
echo "version=$(head -n 1 .version 2> /dev/null || echo unknown)" >> $GITHUB_OUTPUT
4341
- name: "Check if pull request exists for this branch"
4442
id: pr_exists
@@ -62,7 +60,6 @@ jobs:
6260
export BUILD_EPOCH="${{ steps.variables.outputs.build_epoch }}"
6361
export NODEJS_VERSION="${{ steps.variables.outputs.nodejs_version }}"
6462
export PYTHON_VERSION="${{ steps.variables.outputs.python_version }}"
65-
export TERRAFORM_VERSION="${{ steps.variables.outputs.terraform_version }}"
6663
export VERSION="${{ steps.variables.outputs.version }}"
6764
export DOES_PULL_REQUEST_EXIST="${{ steps.pr_exists.outputs.does_pull_request_exist }}"
6865
make list-variables
@@ -76,7 +73,6 @@ jobs:
7673
build_epoch: "${{ needs.metadata.outputs.build_epoch }}"
7774
nodejs_version: "${{ needs.metadata.outputs.nodejs_version }}"
7875
python_version: "${{ needs.metadata.outputs.python_version }}"
79-
terraform_version: "${{ needs.metadata.outputs.terraform_version }}"
8076
version: "${{ needs.metadata.outputs.version }}"
8177
secrets: inherit
8278
test-stage: # Recommended maximum execution time is 5 minutes
@@ -89,7 +85,6 @@ jobs:
8985
build_epoch: "${{ needs.metadata.outputs.build_epoch }}"
9086
nodejs_version: "${{ needs.metadata.outputs.nodejs_version }}"
9187
python_version: "${{ needs.metadata.outputs.python_version }}"
92-
terraform_version: "${{ needs.metadata.outputs.terraform_version }}"
9388
version: "${{ needs.metadata.outputs.version }}"
9489
secrets: inherit
9590
build-stage: # Recommended maximum execution time is 3 minutes
@@ -103,7 +98,6 @@ jobs:
10398
build_epoch: "${{ needs.metadata.outputs.build_epoch }}"
10499
nodejs_version: "${{ needs.metadata.outputs.nodejs_version }}"
105100
python_version: "${{ needs.metadata.outputs.python_version }}"
106-
terraform_version: "${{ needs.metadata.outputs.terraform_version }}"
107101
version: "${{ needs.metadata.outputs.version }}"
108102
secrets: inherit
109103
acceptance-stage: # Recommended maximum execution time is 10 minutes
@@ -117,6 +111,5 @@ jobs:
117111
build_epoch: "${{ needs.metadata.outputs.build_epoch }}"
118112
nodejs_version: "${{ needs.metadata.outputs.nodejs_version }}"
119113
python_version: "${{ needs.metadata.outputs.python_version }}"
120-
terraform_version: "${{ needs.metadata.outputs.terraform_version }}"
121114
version: "${{ needs.metadata.outputs.version }}"
122115
secrets: inherit

.github/workflows/cicd-2-publish.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ jobs:
1818
build_epoch: ${{ steps.variables.outputs.build_epoch }}
1919
nodejs_version: ${{ steps.variables.outputs.nodejs_version }}
2020
python_version: ${{ steps.variables.outputs.python_version }}
21-
terraform_version: ${{ steps.variables.outputs.terraform_version }}
2221
version: ${{ steps.variables.outputs.version }}
2322
steps:
2423
- name: "Checkout code"
@@ -32,7 +31,6 @@ jobs:
3231
echo "build_epoch=$(date --date=$datetime -u +'%s')" >> $GITHUB_OUTPUT
3332
echo "nodejs_version=$(grep "^nodejs\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
3433
echo "python_version=$(grep "^python\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
35-
echo "terraform_version=$(grep "^terraform\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
3634
# TODO: Get the version, but it may not be the .version file as this should come from the CI/CD Pull Request Workflow
3735
echo "version=$(head -n 1 .version 2> /dev/null || echo unknown)" >> $GITHUB_OUTPUT
3836
- name: "List variables"
@@ -42,7 +40,6 @@ jobs:
4240
export BUILD_EPOCH="${{ steps.variables.outputs.build_epoch }}"
4341
export NODEJS_VERSION="${{ steps.variables.outputs.nodejs_version }}"
4442
export PYTHON_VERSION="${{ steps.variables.outputs.python_version }}"
45-
export TERRAFORM_VERSION="${{ steps.variables.outputs.terraform_version }}"
4643
export VERSION="${{ steps.variables.outputs.version }}"
4744
make list-variables
4845
publish:

.github/workflows/cicd-3-deploy.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ jobs:
1919
build_epoch: ${{ steps.variables.outputs.build_epoch }}
2020
nodejs_version: ${{ steps.variables.outputs.nodejs_version }}
2121
python_version: ${{ steps.variables.outputs.python_version }}
22-
terraform_version: ${{ steps.variables.outputs.terraform_version }}
2322
version: ${{ steps.variables.outputs.version }}
2423
tag: ${{ steps.variables.outputs.tag }}
2524
steps:
@@ -34,7 +33,6 @@ jobs:
3433
echo "build_epoch=$(date --date=$datetime -u +'%s')" >> $GITHUB_OUTPUT
3534
echo "nodejs_version=$(grep "^nodejs\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
3635
echo "python_version=$(grep "^python\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
37-
echo "terraform_version=$(grep "^terraform\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
3836
# TODO: Get the version, but it may not be the .version file as this should come from the CI/CD Pull Request Workflow
3937
echo "version=$(head -n 1 .version 2> /dev/null || echo unknown)" >> $GITHUB_OUTPUT
4038
echo "tag=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
@@ -45,7 +43,6 @@ jobs:
4543
export BUILD_EPOCH="${{ steps.variables.outputs.build_epoch }}"
4644
export NODEJS_VERSION="${{ steps.variables.outputs.nodejs_version }}"
4745
export PYTHON_VERSION="${{ steps.variables.outputs.python_version }}"
48-
export TERRAFORM_VERSION="${{ steps.variables.outputs.terraform_version }}"
4946
export VERSION="${{ steps.variables.outputs.version }}"
5047
export TAG="${{ steps.variables.outputs.tag }}"
5148
make list-variables

.github/workflows/stage-1-commit.yaml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ on:
2323
description: "Python version, set by the CI/CD pipeline workflow"
2424
required: true
2525
type: string
26-
terraform_version:
27-
description: "Terraform version, set by the CI/CD pipeline workflow"
28-
required: true
29-
type: string
3026
version:
3127
description: "Version of the software, set by the CI/CD pipeline workflow"
3228
required: true
@@ -77,15 +73,6 @@ jobs:
7773
fetch-depth: 0 # Full history is needed to compare branches
7874
- name: "Check English usage"
7975
uses: ./.github/actions/check-english-usage
80-
lint-terraform:
81-
name: "Lint Terraform"
82-
runs-on: ubuntu-latest
83-
timeout-minutes: 2
84-
steps:
85-
- name: "Checkout code"
86-
uses: actions/checkout@v4
87-
- name: "Lint Terraform"
88-
uses: ./.github/actions/lint-terraform
8976
count-lines-of-code:
9077
name: "Count lines of code"
9178
runs-on: ubuntu-latest
@@ -124,3 +111,11 @@ jobs:
124111
idp_aws_report_upload_region: "${{ secrets.IDP_AWS_REPORT_UPLOAD_REGION }}"
125112
idp_aws_report_upload_role_name: "${{ secrets.IDP_AWS_REPORT_UPLOAD_ROLE_NAME }}"
126113
idp_aws_report_upload_bucket_endpoint: "${{ secrets.IDP_AWS_REPORT_UPLOAD_BUCKET_ENDPOINT }}"
114+
lint-and-validate-openapi:
115+
name: "Lint and validate OpenAPI"
116+
runs-on: ubuntu-latest
117+
steps:
118+
- uses: actions/checkout@v4
119+
- uses: ./.github/actions/lint-and-validate-specification
120+
with:
121+
spec-file: specification/eligibility-signposting-api.yaml

.github/workflows/stage-2-test.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ on:
2323
description: "Python version, set by the CI/CD pipeline workflow"
2424
required: true
2525
type: string
26-
terraform_version:
27-
description: "Terraform version, set by the CI/CD pipeline workflow"
28-
required: true
29-
type: string
3026
version:
3127
description: "Version of the software, set by the CI/CD pipeline workflow"
3228
required: true

.github/workflows/stage-3-build.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ on:
2323
description: "Python version, set by the CI/CD pipeline workflow"
2424
required: true
2525
type: string
26-
terraform_version:
27-
description: "Terraform version, set by the CI/CD pipeline workflow"
28-
required: true
29-
type: string
3026
version:
3127
description: "Version of the software, set by the CI/CD pipeline workflow"
3228
required: true

0 commit comments

Comments
 (0)