Add comprehensive modify nodes interface design #116
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: "Lint and Test" | |
| permissions: | |
| contents: read | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| check-parser-build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - run: npm ci | |
| - name: Copy original parser | |
| run: cp -r src/grammar/jsonpath_js.js ${{ runner.temp }} | |
| - run: npm run build:parser | |
| - name: Compare with original parser | |
| run: | | |
| if ! diff -qr src/grammar/jsonpath_js.js ${{ runner.temp }}/jsonpath_js.js; then | |
| echo 'Generated parser code is out of sync. Please run "npm run build:parser", and commit the changes.' | |
| exit 1 | |
| fi | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - run: npm ci | |
| - run: npx biome ci | |
| test-node: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node: [ 20, 22, 24 ] | |
| name: Test on node v${{ matrix.node }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - run: npm ci | |
| - run: npm run test | |
| test-deno: | |
| runs-on: ubuntu-latest | |
| name: Test on deno | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - uses: denoland/setup-deno@v2 | |
| with: | |
| deno-version: v2.x | |
| - run: npm ci | |
| - run: deno task test | |
| test-bun: | |
| runs-on: ubuntu-latest | |
| name: Test on bun | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.2.5 | |
| - run: bun install | |
| - run: bun test |