Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/code-health-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,25 @@ jobs:
- name: Run unit tests
working-directory: tools/cli
run: make unit-test
js-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
sparse-checkout: |
.github
tools
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: Wouldn't it be better if we check /tools/spectral/ipa than tools?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking to use /tools in case we add new jest tests in other tools as well in the future, but no strong opinion, I can change to /tools/spectral/ipa for now

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we only plan writing jest tests within /tools/spectral/ipa directory for the scope of IPA validation, but feel free to revert if any plan to add new tests outside of this directory

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah there's no plans now, so I'll keep the change 👍

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
- name: Install npm dependencies
run: npm install
- name: Run Jest tests
run: |
npm run test
lint:
runs-on: ubuntu-latest
steps:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/spectral-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ on:
- 'tools/spectral/**'
- 'openapi/**.yaml'
- '.spectral.yaml'
- 'ipa-spectral.yaml'
push:
branches:
- main
paths:
- 'tools/spectral/**'
- 'openapi/**.yaml'
- '.spectral.yaml'
- 'ipa-spectral.yaml'

jobs:
spectral-lint:
Expand All @@ -33,3 +35,8 @@ jobs:
# Path to the OpenAPI spec files and openapi/v2.yaml
file_glob: openapi/v2.yaml
spectral_ruleset: tools/spectral/.spectral.yaml #If updated, need to update in MMS too.
- name: IPA validation action
uses: stoplightio/spectral-action@2ad0b9302e32a77c1caccf474a9b2191a8060d83
with:
file_glob: openapi/v2.yaml
spectral_ruleset: tools/spectral/ipa/ipa-spectral.yaml
Loading