Add normalized hash-based test IDs to draft2020-12/enum.json (POC for #698) #11
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: Test IDs | |
| on: [pull_request] | |
| jobs: | |
| generate: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ github.event.pull_request.head.repo.full_name }} | |
| ref: ${{ github.event.pull_request.head.ref }} # Check out the PR branch, not the merge commit | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: latest | |
| - name: Install dependencies | |
| run: npm ci | |
| # - name: Generate test IDs for v1 | |
| # run: node scripts/generate-ids-for.js v1 | |
| # | |
| # - name: Generate test IDs for draft2020-12 | |
| # run: node scripts/generate-ids-for.js draft2020-12 | |
| # | |
| # - name: Generate test IDs for draft2019-09 | |
| # run: node scripts/generate-ids-for.js draft2019-09 | |
| # | |
| # - name: Generate test IDs for draft7 | |
| # run: node scripts/generate-ids-for.js draft7 | |
| # | |
| # - name: Generate test IDs for draft6 | |
| # run: node scripts/generate-ids-for.js draft6 | |
| # | |
| # - name: Generate test IDs for draft4 | |
| # run: node scripts/generate-ids-for.js draft4 | |
| - name: Commit and push changes | |
| run: | | |
| git config user.name "test-id-action" | |
| git config user.email "test-id-action@users.noreply.github.com" | |
| git add "tests/**/*.json" | |
| git commit -m "Update test IDs based on the schema, test data, and expected result." || echo "No changes to commit" | |
| git push origin ${{ github.event.pull_request.head.ref }} |