supabase / setup-cli

A GitHub action for interacting with your Supabase projects using the CLI.
MIT License
110 stars 16 forks source link

extension "pg_tle" is not available #177

Closed sagi-gamago closed 1 year ago

sagi-gamago commented 1 year ago

Bug report

Describe the bug

I run CI with git actions and trying to use PG_TLE in my SQL scripts

To Reproduce

Have this action in the git workflow:

name: CI

on:
  pull_request:
  workflow_dispatch:

jobs:
  test:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v3

      - uses: supabase/setup-cli@v1

      - name: Start Supabase local development setup
        run: |
          supabase db start
          supabase db lint
          supabase test db

      - name: Verify generated types are up-to-date
        run: |
          supabase gen types typescript --local > types.ts
          if [ "$(git diff --ignore-space-at-eol types.ts | wc -l)" -gt "0" ]; then
            echo "Detected uncommitted changes after build. See status below:"
            git diff
            exit 1
          fi

and have the following script in the migration file:

CREATE EXTENSION IF NOT EXISTS pg_tle;

Expected behavior

I expected it to run successfully in the git actions

Screenshots

image

System information

Additional context

I'm trying to have a CI process that have "usebasejump/supabase-test-helpers" In order to have it them I need pg_tle.

sweatybridge commented 1 year ago

pg_tle support is only added recently so you need to pin the setup cli to the latest version.

- uses: supabase/setup-cli@v1
  with:
    version: latest
sagi-gamago commented 1 year ago

pg_tle support is only added recently so you need to pin the setup cli to the latest version.

- uses: supabase/setup-cli@v1
  with:
    version: latest

Thanks @sweatybridge! that seemed to do the trick!