Skip to content
Merged
Changes from all 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
16 changes: 15 additions & 1 deletion .github/workflows/optional-spec-validations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ jobs:
name: openapi-foas-${{ inputs.env }}
github-token: ${{ secrets.api_bot_pat }}
run-id: ${{ github.run_id }}
- name: Run IPA validation
id: ipa-spectral-validation
run: |
spectral lint openapi-foas.json --ruleset=./tools/spectral/ipa/ipa-spectral.yaml
- name: Validate the FOAS can be used to generate Postman collection
id: spectral-validation
env:
Expand All @@ -49,7 +53,7 @@ jobs:
make convert_to_collection
npx -- @stoplight/spectral-cli@"${SPECTRAL_VERSION}" lint ./tmp/collection.json --ruleset=./validation/spectral.yaml
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 wasn't sure why we run a pinned version for Postman here, passed as a variable (or where this variable is coming from). For IPA validations it will use the version from the package.json (same as the validation run on PRs/locally). We can update the Postman validation to use the same approach as IPA validation unless there is a reason for this approach here

popd
- name: Create Issue
- name: Create Issue - Postman validation Failed
if: ${{ failure() && steps.spectral-validation.outcome == 'failure' }}
uses: imjohnbo/issue-bot@572eed14422c4d6ca37e870f97e7da209422f5bd
env:
Expand All @@ -59,3 +63,13 @@ jobs:
title: "(${{env.target_env}}) Optional Postman validation failed :scream_cat:"
body: See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Create Issue - IPA validation Failed
if: ${{ failure() && steps.ipa-spectral-validation.outcome == 'failure' }}
uses: imjohnbo/issue-bot@572eed14422c4d6ca37e870f97e7da209422f5bd
env:
target_env: ${{ inputs.env }}
with:
labels: failed-release
title: "(${{env.target_env}}) Optional IPA validation failed :scream_cat:"
body: See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
token: ${{ secrets.GITHUB_TOKEN }}
Loading