feat(ipa): Upgrade warning-level rules to the error level #1777
Workflow file for this run
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | name: Spectral Lint Commited OpenAPI Spec | |
| # Trigger the workflow on pull requests and pushes to the main branch | |
| on: | |
| pull_request: | |
| paths: | |
| - 'tools/spectral/**' | |
| - 'openapi/**.yaml' | |
| - 'package.json' | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'tools/spectral/**' | |
| - 'openapi/**.yaml' | |
| - 'package.json' | |
| jobs: | |
| spectral-lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checkout the code | |
| - name: Checkout repository | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 | |
| with: | |
| sparse-checkout: | | |
| openapi/ | |
| tools/spectral | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| cache: 'npm' | |
| - name: Install npm dependencies | |
| run: npm install | |
| - name: Fetch OAS file from Dev Branch | |
| run: curl -O "https://raw.githubusercontent.com/mongodb/openapi/refs/heads/dev/openapi/.raw/v2.yaml" | |
| working-directory: ${{ github.workspace }} | |
| - name: Spectral action | |
| uses: stoplightio/spectral-action@6416fd018ae38e60136775066eb3e98172143141 | |
| with: | |
| # Path to the OpenAPI spec files and openapi/.raw/v2.yaml | |
| file_glob: openapi/.raw/v2.yaml | |
| spectral_ruleset: tools/spectral/.spectral.yaml #If updated, need to update in MMS too. | |
| - name: IPA validation action | |
| run: npx spectral lint v2.yaml --ruleset=./tools/spectral/ipa/ipa-spectral.yaml | |