Skip to content

Commit a39ea40

Browse files
add cli tools to package.json
1 parent 1be2f06 commit a39ea40

File tree

3 files changed

+2941
-88
lines changed

3 files changed

+2941
-88
lines changed

.github/actions/lint-and-validate-specification/action.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ runs:
1313
with:
1414
node-version: "20"
1515

16-
- name: Install dependencies
16+
- name: Install system dependencies
1717
shell: bash
1818
run: |
1919
sudo apt-get update
2020
sudo apt-get install -y make
2121
22-
- name: Install Spectral, Swagger CLI, and Redocly CLI
22+
- name: Install CLI tools locally
2323
shell: bash
2424
run: |
25-
npm install -g @stoplight/spectral-cli swagger-cli @redocly/cli
25+
npm ci
2626
2727
- name: Construct OpenAPI Spec
2828
shell: bash
@@ -32,8 +32,9 @@ runs:
3232
- name: Lint OpenAPI Spec with Spectral
3333
shell: bash
3434
run: |
35-
spectral lint --ruleset .spectral.yaml build/specification/${{ inputs.apim-env }}/eligibility-signposting-api.yaml
35+
npx spectral lint --ruleset .spectral.yaml build/specification/${{ inputs.apim-env }}/eligibility-signposting-api.yaml
3636
3737
- name: Validate OpenAPI Spec with Swagger CLI
3838
shell: bash
39-
run: swagger-cli validate build/specification/${{ inputs.apim-env }}/eligibility-signposting-api.yaml
39+
run: |
40+
npx swagger-cli validate build/specification/${{ inputs.apim-env }}/eligibility-signposting-api.yaml

0 commit comments

Comments
 (0)