Skip to content

update tests

update tests #77

Workflow file for this run

name: Supabase tests
on:
push:
pull_request:
types: [opened, synchronized, reopened]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
fail-fast: false
matrix:
package:
- hello-world
- supabase
env:
PGHOST: 127.0.0.1
PGPORT: 54322
PGUSER: supabase_admin
PGPASSWORD: postgres
DATABASE_URL: "postgresql://postgres:[email protected]:54322/postgres"
steps:
- name: Configure Git (for tests)
run: |
git config --global user.name "CI Test User"
git config --global user.email "[email protected]"
- name: Checkout
uses: actions/checkout@v4
- name: Setup Supabase CLI
uses: supabase/setup-cli@v1
with:
version: latest
- name: Initialize Supabase (if needed)
run: test -d supabase || supabase init
- name: Start Supabase stack
run: supabase start
- name: Show Supabase status
run: supabase status
- name: Install Postgres client
run: |
sudo apt-get update
sudo apt-get install -y postgresql-client
- name: Wait for Postgres
run: |
for i in {1..60}; do
if pg_isready -h 127.0.0.1 -p 54322 -U postgres; then
exit 0
fi
sleep 2
done
echo "postgres not ready in time"
docker ps
supabase status
exit 1
- name: Enable corepack and pnpm
run: |
corepack enable
corepack prepare pnpm@9 --activate
pnpm -v
node -v
- name: Install
run: pnpm install
- name: Install LaunchQL CLI globally
run: npm install -g @launchql/[email protected]
- name: Build
run: pnpm -r build
# - name: seed app_user
# run: |
# lql admin-users bootstrap --yes
# lql admin-users add --test --yes
# env:
# PGHOST: 127.0.0.1
# PGPORT: 54322
# PGUSER: postgres
# PGPASSWORD: postgres
- name: Test ${{ matrix.package }}
run: cd ./packages/${{ matrix.package }} && pnpm test