feat(zero-schema): allow remapping column and table names #437
This file contains 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: Bencher PR | |
on: | |
pull_request: | |
types: [opened, reopened, edited, synchronize] | |
jobs: | |
file_sizes: | |
name: File Sizes PR | |
# DO NOT REMOVE: For handling Fork PRs see Pull Requests from Forks | |
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository | |
permissions: | |
pull-requests: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
cache: 'npm' | |
- uses: bencherdev/bencher@main | |
- run: npm ci | |
- run: npm run build | |
- name: Build npm zero package | |
working-directory: packages/zero | |
run: | | |
npm pack --pack-destination ./out | |
mv ./out/*.tgz ./out/zero-package.tgz | |
- name: Build zero client single file package | |
working-directory: packages/zero | |
run: npx tsx tool/build.ts --bundle-sizes --minify | |
- name: Compress | |
working-directory: packages/zero | |
run: brotli out/zero.js | |
- name: Upload PR benchmarks results to bencher.dev | |
working-directory: packages/zero | |
run: | | |
bencher run \ | |
--project zero \ | |
--token '${{ secrets.BENCHER_API_TOKEN }}' \ | |
--adapter json \ | |
--github-actions '${{ secrets.GITHUB_TOKEN }}' \ | |
--ci-id size \ | |
--branch "$GITHUB_HEAD_REF" \ | |
--start-point "$GITHUB_BASE_REF" \ | |
--start-point-hash '${{ github.event.pull_request.base.sha }}' \ | |
--start-point-clone-thresholds \ | |
--start-point-reset \ | |
--threshold-measure file-size \ | |
--threshold-test percentage \ | |
--threshold-upper-boundary 0.02 \ | |
--threshold-max-sample-size 2 \ | |
--err \ | |
--file-size out/zero-package.tgz \ | |
--file-size out/zero.js.br \ | |
--file-size out/zero.js | |
perf: | |
name: Perf PR | |
# DO NOT REMOVE: For handling Fork PRs see Pull Requests from Forks | |
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository | |
permissions: | |
pull-requests: write | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
cache: 'npm' | |
- uses: bencherdev/bencher@main | |
- run: npm ci | |
- name: Install Playwright Deps | |
run: npx playwright install --with-deps | |
- name: Run benchmarks | |
working-directory: packages/zero-client | |
run: npm run bench -- --outputJson output.json | |
- name: Upload PR benchmarks results to bencher.dev | |
working-directory: packages/zero-client | |
run: | | |
cat output.json |\ | |
npx tsx ../shared/src/tool/vitest-perf-json-to-bmf.ts |\ | |
bencher run \ | |
--project zero \ | |
--token '${{ secrets.BENCHER_API_TOKEN }}' \ | |
--adapter json \ | |
--github-actions '${{ secrets.GITHUB_TOKEN }}' \ | |
--ci-id perf \ | |
--branch "$GITHUB_HEAD_REF" \ | |
--start-point "$GITHUB_BASE_REF" \ | |
--start-point-hash '${{ github.event.pull_request.base.sha }}' \ | |
--start-point-clone-thresholds \ | |
--start-point-reset \ | |
--threshold-measure throughput \ | |
--threshold-test t_test \ | |
--threshold-lower-boundary 0.90 \ | |
--err |