feat: implement naming-convention rule #2252
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: Check Generated Schemas | |
| permissions: {} | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }} | |
| cancel-in-progress: ${{ github.ref_name != 'main' }} | |
| jobs: | |
| check-schemas: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 1 # sufficient for checking changes | |
| submodules: true | |
| persist-credentials: false | |
| - name: Setup Node.js | |
| uses: oxc-project/setup-node@d59b270414aa7d0eed947eed4eb5b0b8a675f01d # v1.4.0 | |
| - name: Install Go | |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: go.mod | |
| - name: Install go-jsonschema | |
| run: go install github.com/atombender/go-jsonschema@v0.23.0 | |
| - name: Generate JSON schemas | |
| run: node tools/gen-json-schemas.ts | |
| - name: Check for uncommitted changes | |
| run: | | |
| if ! git diff --exit-code; then | |
| echo "::error::Generated schema files don't match committed versions. Please run 'node tools/gen-json-schemas.ts' and commit the changes." | |
| exit 1 | |
| fi | |
| echo "✓ All generated schemas match committed versions" |