Update schema-tests.yaml #264
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: schema-test | |
| # Author: @MikeRalphson / runs @jdesrosiers tests | |
| # Issue: https://github.com/OAI/OpenAPI-Specification/pull/2489 | |
| # | |
| # This workflow | |
| # - converts the YAML metaschemas to JSON | |
| # - runs the npm test script to validate passing and failing | |
| # testcases for the metaschemas | |
| # - checks in changed JSON files | |
| # | |
| # run this on push to any branch and creation of pull-requests | |
| on: | |
| push: {} | |
| pull_request: {} | |
| workflow_dispatch: {} | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 # checkout repo content | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v4 # setup Node.js | |
| with: | |
| node-version: '20.x' | |
| - name: Install dependencies from main | |
| run: | | |
| git checkout remotes/origin/main -- package.json package-lock.json | |
| npm ci | |
| - name: convert YAML metaschemas to JSON | |
| run: find schemas/v3* -type f -name "*.yaml" | xargs node scripts/yaml2json/yaml2json.js | |
| - name: Run tests | |
| run: npm run test | |