Skip to content

feat: add execution of check_query_planner #2266

feat: add execution of check_query_planner

feat: add execution of check_query_planner #2266

Workflow file for this run

name: wgc CI
on:
pull_request:
paths:
- 'cli/**/*'
- 'connect/**/*'
- '.github/workflows/cli-ci.yaml'
concurrency:
group: ${{github.workflow}}-${{github.head_ref}}
cancel-in-progress: true
env:
CI: true
DO_NOT_TRACK: '1'
jobs:
build_test_default:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/node
- uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: pnpm --filter ./cli --filter ./connect --filter ./shared --filter ./composition install --frozen-lockfile
- name: Generate code
run: pnpm buf generate --template buf.ts.gen.yaml
- name: Check if git is not dirty after generating files
run: git diff --no-ext-diff --exit-code
- name: Build Node.js NPM Package
run: pnpm --filter ./cli --filter ./connect --filter ./shared --filter ./composition run build
- name: 'Build wgc binary'
working-directory: cli
run: bun build --compile --minify --sourcemap src/index.ts --outfile wgc
- name: E2E test
working-directory: cli
run: bun test e2e
build_test_node_matrix:
timeout-minutes: 10
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['20.x', '22.x']
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/node
with:
node-version: ${{ matrix.node-version }}
- uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: pnpm --filter ./cli --filter ./connect --filter ./shared --filter ./composition install --frozen-lockfile
- name: Build Node.js NPM Package
run: pnpm --filter ./cli --filter ./connect --filter ./shared --filter ./composition run build
- name: Unit Test
run: pnpm run --filter wgc test
- name: E2E test (node)
working-directory: cli
run: bun test e2e --test-name-pattern node
build_bun_matrix:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
target: [bun-linux-x64, bun-linux-arm64, bun-darwin-x64, bun-darwin-arm64, bun-windows-x64]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/cli-build
id: cli-build
with:
target: ${{ matrix.target }}
github-sha: ${{ github.sha }}
build_test:
runs-on: ubuntu-latest
needs: [build_test_default, build_test_node_matrix, build_bun_matrix]
if: always()
steps:
- name: 'All tests passed'
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: 'Some tests failed'
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1