-
Notifications
You must be signed in to change notification settings - Fork 3
refactor(compliance): native TOML runner and generated JSON5 tests #1047
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
2058273
feat(compliance): add native TOML and JSON5 runners
frostney cb2341d
refactor(compliance): delegate JSON5 suite to TestRunner
frostney 6690045
refactor(compliance): run JSON5 as generated tests
frostney 06d4717
Merge remote-tracking branch 'origin/main' into codex/issue-986-nativ…
frostney 4b3cd2e
fix(compliance): classify TOML runner failures
frostney 820f3c3
test(toml): cover dotted keys after arrays
frostney File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| name: JSON5 suite weekly bump | ||
|
|
||
| # Updates the pinned json5/json5 revision and deterministically regenerates | ||
| # the executable JavaScript parser suite from a prepared checkout. | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: '45 6 * * 1' | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| bump: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| steps: | ||
| - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 | ||
| with: | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
|
|
||
| - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 | ||
|
|
||
| - id: latest | ||
| run: | | ||
| sha=$(gh api repos/json5/json5/commits/main --jq .sha) | ||
| echo "sha=$sha" >> "$GITHUB_OUTPUT" | ||
| echo "short=${sha:0:8}" >> "$GITHUB_OUTPUT" | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Update pin | ||
| run: bun scripts/suite-bump-pin.ts tests/compliance/json5.pin ${{ steps.latest.outputs.sha }} | ||
|
|
||
| - name: Prepare pinned checkout | ||
| run: | | ||
| git init "$RUNNER_TEMP/json5" | ||
| git -C "$RUNNER_TEMP/json5" remote add origin https://github.com/json5/json5.git | ||
| git -C "$RUNNER_TEMP/json5" fetch --depth 1 origin "${{ steps.latest.outputs.sha }}" | ||
| git -C "$RUNNER_TEMP/json5" checkout --detach "${{ steps.latest.outputs.sha }}" | ||
|
|
||
| - name: Regenerate parser tests | ||
| run: | | ||
| node scripts/regenerate-json5-tests.js \ | ||
| "$RUNNER_TEMP/json5" \ | ||
| "${{ steps.latest.outputs.sha }}" \ | ||
| tests/built-ins/JSON5/upstream-parse.js | ||
|
|
||
| - id: changed | ||
| run: | | ||
| if git diff --quiet -- tests/compliance/json5.pin tests/built-ins/JSON5/upstream-parse.js; then | ||
| echo "changed=false" >> "$GITHUB_OUTPUT" | ||
| echo "JSON5 suite already pinned to ${{ steps.latest.outputs.short }} — no PR to open." | ||
| else | ||
| echo "changed=true" >> "$GITHUB_OUTPUT" | ||
| fi | ||
|
|
||
| - name: Open or update PR | ||
| if: steps.changed.outputs.changed == 'true' | ||
| uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 | ||
| with: | ||
| branch: chore/json5-test-bump | ||
| commit-message: "chore(json5): bump suite pin to ${{ steps.latest.outputs.short }}" | ||
| title: "chore(json5): bump suite pin to ${{ steps.latest.outputs.short }}" | ||
| body: | | ||
| Automated bump of the json5/json5 SHA pin to `${{ steps.latest.outputs.sha }}`. | ||
|
|
||
| The executable JavaScript parser suite was regenerated from that | ||
| exact checkout. CI will run it with the stringify suite through | ||
| `GocciaTestRunner`. | ||
|
|
||
| Cron: weekly, Mondays 06:45 UTC. | ||
| labels: | | ||
| json5 | ||
| automated |
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.