feat(query): Map hasKey/hasValue/hasKeyValue filter ops #866
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: CI | |
| on: | |
| # push: | |
| # branches: [main] # CI on main branch is handled by release.yaml workflow | |
| pull_request: | |
| branches: [main] | |
| workflow_call: | |
| inputs: | |
| publish_snapshot: | |
| description: Run snapshot publish inside this reusable workflow | |
| type: boolean | |
| default: false | |
| workflow_dispatch: | |
| env: | |
| CI: true | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: latest | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| run_install: false | |
| - name: Get pnpm store directory | |
| id: pnpm-cache | |
| shell: bash | |
| run: | | |
| echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
| - name: Setup pnpm cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-v2-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store-v2- | |
| - name: Install dependencies | |
| run: | | |
| pnpm install --frozen-lockfile || { | |
| echo "::warning::pnpm install failed; wiping store and retrying" | |
| rm -rf "$(pnpm store path)" | |
| pnpm install --frozen-lockfile | |
| } | |
| - name: Run lint | |
| run: pnpm lint | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: latest | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| run_install: false | |
| - name: Get pnpm store directory | |
| id: pnpm-cache | |
| shell: bash | |
| run: | | |
| echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
| - name: Setup pnpm cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-v2-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store-v2- | |
| - name: Install dependencies | |
| run: | | |
| pnpm install --frozen-lockfile || { | |
| echo "::warning::pnpm install failed; wiping store and retrying" | |
| rm -rf "$(pnpm store path)" | |
| pnpm install --frozen-lockfile | |
| } | |
| - name: Run build | |
| run: pnpm build | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-output | |
| path: packages/*/dist | |
| retention-days: 1 | |
| if-no-files-found: error | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: latest | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| run_install: false | |
| - name: Get pnpm store directory | |
| id: pnpm-cache | |
| shell: bash | |
| run: | | |
| echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
| - name: Setup pnpm cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-v2-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store-v2- | |
| - name: Install dependencies | |
| run: | | |
| pnpm install --frozen-lockfile || { | |
| echo "::warning::pnpm install failed; wiping store and retrying" | |
| rm -rf "$(pnpm store path)" | |
| pnpm install --frozen-lockfile | |
| } | |
| - name: Run tests | |
| run: pnpm test | |
| # On main, Changesets calls this workflow and then runs `version` with | |
| # `needs: [ci]`. Keep snapshot out of that reusable path so version does | |
| # not wait for pkg.pr.new. Main snapshot runs as a sibling in release.yaml. | |
| snapshot: | |
| name: Publish Snapshot | |
| needs: [build] | |
| if: | | |
| inputs.publish_snapshot || | |
| (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) || | |
| github.event_name == 'workflow_dispatch' | |
| uses: ./.github/workflows/publish-snapshot.yml | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| secrets: inherit |