Skip to content

feat: add batch stats endpoint support #6943

feat: add batch stats endpoint support

feat: add batch stats endpoint support #6943

Workflow file for this run

name: Run tests
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
workflow_call: # Allow this workflow to be called by other workflows
env:
DENO_DIR: my_cache_directory
jobs:
test_all:
runs-on: ubuntu-latest
name: Run tests
steps:
- name: Cache Deno dependencies
uses: actions/cache@v4
with:
path: ${{ env.DENO_DIR }}
key: my_cache_key
- name: Checkout capgo
uses: actions/checkout@v6
- name: Setup bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Check for typos
uses: crate-ci/[email protected]
- name: Show bun version
run: bun --version
- name: Show capgo version
run: bunx @capgo/cli@latest -v
- name: Check for console statements
run: |
if grep -r --exclude="logging.ts" --exclude=".env" --exclude=".env.*" "console\." supabase/functions/; then
echo "❌ Found console statements in supabase/functions directory, use cloudlog instead"
exit 1
else
echo "✅ No console statements found in supabase/functions directory"
fi
- name: Install dependencies
run: bun install
# - name: Install playwright
# run: bunx playwright install
- name: Lint
run: bun lint && bun lint:backend
- name: Typecheck
run: bun typecheck
# TODO: enable I18n linting when the issue they have with npm not found is fixed
# - name: Lint I18n
# run: bunx @inlang/cli lint --project project.inlang
- name: Install Supabase CLI
uses: supabase/setup-cli@v1
with:
version: latest
- name: Show Supabase CLI version
run: supabase --version
- name: Run Supabase Start
run: supabase start -x imgproxy,studio,mailpit,realtime,postgres-meta,supavisor,studio,logflare,vector,realtime,gotrue
- name: Run Supabase Test DB
run: supabase test db
- name: Lint SQL
run: supabase db lint -s public --fail-on warning
- uses: JarvusInnovations/background-action@v1
name: Bootstrap Edge server
with:
run: supabase functions serve &
wait-on: |
http-get://127.0.0.1:54321/functions/v1/ok
# IMPORTANT: to use environment variables in wait-on, you must use this form: ${{ env.VAR }}
# See wait-on section below for all resource types and prefixes
tail: stderr,stdout # true = stderr,stdout
# This will allow you to monitor the progress live
log-output-resume: stderr,stdout
# Eliminates previously output stderr log entries from post-run output
wait-for: 1m
log-output: stderr,stdout # same as true
log-output-if: true
# failure = exit-early or timeout
working-directory: .
- name: Run all backend and CLI tests
run: bun run test:all
# TODO: enable these tests when they are stable
# - uses: JarvusInnovations/background-action@v1
# name: Start Cloudflare Workers for testing
# with:
# run: |
# chmod +x scripts/start-cloudflare-workers.sh
# ./scripts/start-cloudflare-workers.sh
# wait-on: |
# http-get://127.0.0.1:8790/ok
# http-get://127.0.0.1:8787/ok
# http-get://127.0.0.1:8788/ok
# http-get://127.0.0.1:8789/ok
# tail: stderr,stdout
# log-output-resume: stderr,stdout
# wait-for: 2m
# log-output: stderr,stdout
# log-output-if: true
# working-directory: .
# - name: Verify D1 sync is ready
# run: |
# echo "Verifying D1 sync worker is operational..."
# for i in {1..30}; do
# response=$(curl -s -w "%{http_code}" -X POST http://127.0.0.1:8790/sync -H "x-webhook-signature: testsecret" -o /dev/null)
# if [ "$response" = "200" ]; then
# echo "✓ D1 sync is ready"
# exit 0
# fi
# echo "Waiting for D1 sync... ($i/30) - HTTP $response"
# sleep 2
# done
# echo "✗ D1 sync failed to become ready"
# exit 1
# - name: Run Cloudflare Workers plugin tests
# run: bun run test:cloudflare:plugin
# - name: Run playwright tests
# run: bun run test:front