-
Couldn't load subscription status.
- Fork 14
task: add ipa validation to run during CI/CD process #516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| - name: Run IPA Spectral Tests against current raw OpenAPI | ||
| run: | | ||
| echo "Ensuring no error violations available in OpenAPI" | ||
| npm run ipa-validation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That does not run our "classic" spectral rules. Ideally we might want to run both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does it differentiate if there are validation failures or some other error happening?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these not already running on PRs? Reference: https://github.com/mongodb/openapi/blob/main/.github/workflows/spectral-lint.yml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lovisaberggren Good catch. I will adjust that job to run on javascript files and package.json bumps (when spectral is bumped)
@yelizhenden-mdb Error message will be different. Validation failure vs Spectral failure (which is unlikely since we try catch logic in each rule at the moment).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, yeah that's why it didn't run in a few cases 👍
b434bfa to
e9f1f0d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Proposed changes
IPA validation needs to run during PR process to verify if:
PR should be never merged with failed spectral validation as it will affect and break downstream builds.
Testing
Run echo "Ensuring no error violations available in OpenAPI"
Ensuring no error violations available in OpenAPI
No results with a severity of 'error' found!
No results with a severity of 'error' found!