Skip to content

chore: update codegen to include GraphQL #1666

chore: update codegen to include GraphQL

chore: update codegen to include GraphQL #1666

# Test coverage job. It is run on pull request because it prints the results via comment
name: Parser conformance and comparison
on:
pull_request:
branches:
- main
paths:
- 'crates/biome_js_syntax/**'
- 'crates/biome_js_factory/**'
- 'crates/biome_js_semantic/**'
- 'crates/biome_js_parser/**'
- 'crates/biome_rowan/**'
- 'xtask/**'
env:
RUST_LOG: info
RUST_BACKTRACE: 1
jobs:
coverage:
permissions:
pull-requests: write
name: Parser conformance
runs-on: ubuntu-latest
steps:
- name: Checkout PR Branch
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Support longpaths
run: git config core.longpaths true
- name: Checkout PR Branch
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
submodules: recursive
- name: Free Disk Space
uses: ./.github/actions/free-disk-space
- name: Install toolchain
uses: moonrepo/setup-rust@d8048d4fdff0633123678b093726e6d7c8ad6de5 # v1.2.0
with:
cache-target: release
cache-base: main
- name: Compile
run: cargo build --release --locked -p xtask_coverage
- name: Run Test suites
continue-on-error: true
run: cargo coverage --json > new_results.json
- name: Checkout main Branch
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
clean: false
ref: main
submodules: recursive
- name: Run Test suites on main branch
continue-on-error: true
run: cargo coverage --json > base_results.json
- name: Compare results on ${{ matrix.os }}
if: github.event_name == 'pull_request'
id: comparison
shell: bash
run: |
echo "## Parser conformance results on ${{ matrix.os }}" > output
cargo coverage compare ./base_results.json ./new_results.json --markdown >> output
cat output
echo "comment<<EOF" >> $GITHUB_OUTPUT
cat output >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Get the PR number
if: github.event_name == 'pull_request'
id: pr-number
uses: kkak10/pr-number-action@8f5358941366822cd0825e04dfe68437f2f5f15b # v1.3
- name: Find Previous Comment
if: github.event_name == 'pull_request'
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e # v3.1.0
id: previous-comment
with:
issue-number: ${{ steps.pr-number.outputs.pr }}
body-includes: Parser conformance results on ${{ matrix.os }}
- name: Update existing comment
if: github.event_name == 'pull_request' && steps.previous-comment.outputs.comment-id
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4
continue-on-error: true
with:
comment-id: ${{ steps.previous-comment.outputs.comment-id }}
body: |
${{ steps.comparison.outputs.comment }}
edit-mode: replace
- name: Write a new comment
if: github.event_name == 'pull_request' && !steps.previous-comment.outputs.comment-id
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4
continue-on-error: true
with:
issue-number: ${{ steps.pr-number.outputs.pr }}
body: |
${{ steps.comparison.outputs.comment }}
- name: Clean cache
run: cargo cache --autoclean