Skip to content

Commit 4f41d1d

Browse files
CLOUDP-290332: Run IPA validation and Jest tests as workflow (#311)
1 parent 89b16b0 commit 4f41d1d

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

.github/workflows/code-health-tools.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,25 @@ jobs:
4646
- name: Run unit tests
4747
working-directory: tools/cli
4848
run: make unit-test
49+
js-tests:
50+
runs-on: ubuntu-latest
51+
steps:
52+
- name: Checkout
53+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
54+
with:
55+
sparse-checkout: |
56+
.github
57+
tools/spectral/ipa
58+
- name: Setup Node
59+
uses: actions/setup-node@v4
60+
with:
61+
node-version: '20.x'
62+
cache: 'npm'
63+
- name: Install npm dependencies
64+
run: npm install
65+
- name: Run Jest tests
66+
run: |
67+
npm run test
4968
lint:
5069
runs-on: ubuntu-latest
5170
steps:

.github/workflows/spectral-lint.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ on:
77
- 'tools/spectral/**'
88
- 'openapi/**.yaml'
99
- '.spectral.yaml'
10+
- 'ipa-spectral.yaml'
1011
push:
1112
branches:
1213
- main
1314
paths:
1415
- 'tools/spectral/**'
1516
- 'openapi/**.yaml'
1617
- '.spectral.yaml'
18+
- 'ipa-spectral.yaml'
1719

1820
jobs:
1921
spectral-lint:
@@ -33,3 +35,8 @@ jobs:
3335
# Path to the OpenAPI spec files and openapi/v2.yaml
3436
file_glob: openapi/v2.yaml
3537
spectral_ruleset: tools/spectral/.spectral.yaml #If updated, need to update in MMS too.
38+
- name: IPA validation action
39+
uses: stoplightio/spectral-action@2ad0b9302e32a77c1caccf474a9b2191a8060d83
40+
with:
41+
file_glob: openapi/v2.yaml
42+
spectral_ruleset: tools/spectral/ipa/ipa-spectral.yaml

0 commit comments

Comments
 (0)