{faq.question}
+ +{faq.answer}
+diff --git a/.github/workflows/config-preview.yaml b/.github/workflows/config-preview.yaml
new file mode 100644
index 00000000000..cca3c2d7de3
--- /dev/null
+++ b/.github/workflows/config-preview.yaml
@@ -0,0 +1,63 @@
+name: Config (Preview)
+
+on:
+ pull_request:
+ types:
+ - opened
+ - reopened
+ - synchronize
+ branches:
+ - master
+ paths:
+ - "supabase/**"
+ workflow_dispatch:
+
+jobs:
+ wait:
+ runs-on: ubuntu-latest
+ outputs:
+ status: ${{ steps.check.outputs.conclusion }}
+ steps:
+ - uses: fountainhead/action-wait-for-check@v1.2.0
+ id: check
+ with:
+ checkName: Supabase
+ ref: ${{ github.event.pull_request.head.sha }}
+ token: ${{ secrets.GITHUB_TOKEN }}
+
+ apply:
+ needs:
+ - wait
+ if: ${{ needs.wait.outputs.status == 'success' }}
+ runs-on: ubuntu-latest
+ env:
+ SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
+ TF_VAR_linked_project: xguihxuzqibwxjnimxev
+ TF_VAR_git_branch: ${{ github.head_ref }}
+ TF_CLI_ARGS_apply: -target=supabase_settings.preview
+ defaults:
+ run:
+ working-directory: supabase/remotes
+ outputs:
+ db_user: ${{ steps.branch.outputs.user }}
+ db_pass: ${{ steps.branch.outputs.password }}
+ db_host: ${{ steps.branch.outputs.host }}
+ db_port: ${{ steps.branch.outputs.port }}
+ jwt_secret: ${{ steps.branch.outputs.jwt_secret }}
+ ref: ${{ steps.branch.outputs.id }}
+ status: ${{ steps.branch.outputs.status }}
+ version: ${{ steps.branch.outputs.version }}
+
+ steps:
+ - uses: actions/checkout@v4
+ - uses: hashicorp/setup-terraform@v3
+ with:
+ terraform_wrapper: false
+
+ - run: terraform init
+ - run: terraform apply -auto-approve -no-color
+ - id: branch
+ run: |
+ terraform output -json branch_database \
+ | jq -r "to_entries|map(\"\(.key)=\(.value|tostring)\")|.[]" \
+ >> "$GITHUB_OUTPUT"
diff --git a/.github/workflows/config-production.yaml b/.github/workflows/config-production.yaml
new file mode 100644
index 00000000000..b7f3dd3d63c
--- /dev/null
+++ b/.github/workflows/config-production.yaml
@@ -0,0 +1,28 @@
+name: Config (Production)
+
+on:
+ push:
+ branches:
+ - master
+ paths:
+ - "supabase/remotes/**"
+ workflow_dispatch:
+
+jobs:
+ apply:
+ runs-on: ubuntu-latest
+ env:
+ SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
+ TF_VAR_linked_project: xguihxuzqibwxjnimxev
+ defaults:
+ run:
+ working-directory: supabase/remotes
+
+ steps:
+ - uses: actions/checkout@v4
+ - uses: hashicorp/setup-terraform@v3
+ with:
+ terraform_wrapper: false
+
+ - run: terraform init
+ - run: terraform apply -auto-approve -no-color
diff --git a/.github/workflows/lint-prose.yml b/.github/workflows/lint-prose.yml
new file mode 100644
index 00000000000..c2a402697a7
--- /dev/null
+++ b/.github/workflows/lint-prose.yml
@@ -0,0 +1,25 @@
+name: reviewdog
+on:
+ pull_request:
+ paths:
+ - '.vale.ini'
+ - 'vale/**'
+ - 'apps/docs/content/**'
+
+jobs:
+ vale:
+ name: runner / vale
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ sparse-checkout: |
+ .vale.ini
+ vale
+ apps/docs/content
+ - uses: errata-ai/vale-action@reviewdog
+ with:
+ files: apps/docs/content
+ # [Charis] Temporary because we still have to go through giant backlog of existing errors
+ # Don't want people to worry about this (just want them looking at the specific PR comments)
+ # fail_on_error: true
diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml
new file mode 100644
index 00000000000..2ab350c96ee
--- /dev/null
+++ b/.github/workflows/playwright.yml
@@ -0,0 +1,45 @@
+name: Playwright Tests
+on:
+ push:
+ branches: [master]
+ paths:
+ - 'apps/studio/**'
+ - 'package-lock.json'
+ pull_request:
+ branches: [master]
+ paths:
+ - 'apps/studio/**'
+ - 'package-lock.json'
+
+# Cancel old builds on new commit for same workflow + branch/PR
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ test:
+ timeout-minutes: 60
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v4
+ - name: Use Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version-file: '.nvmrc'
+ cache: 'npm'
+ - uses: supabase/setup-cli@v1
+ - name: Install dependencies
+ run: npm ci
+ - name: Install Playwright Browsers
+ run: npx playwright install --with-deps
+ - name: Run Playwright tests
+ run: npm run test:playwright
+ # mark the action as succeeded even if the tests failed. This is temporarily until we make the tests more stable.
+ continue-on-error: true
+ # - uses: actions/upload-artifact@v3
+ # if: always()
+ # with:
+ # name: playwright-report
+ # path: playwright-report/
+ # retention-days: 30
diff --git a/.github/workflows/studio-tests.yml b/.github/workflows/studio-tests.yml
new file mode 100644
index 00000000000..1dbc0bd8dd6
--- /dev/null
+++ b/.github/workflows/studio-tests.yml
@@ -0,0 +1,47 @@
+# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
+# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
+
+name: Studio Unit Tests & Build Check
+
+on:
+ push:
+ branches: [master, studio]
+ paths:
+ - 'apps/studio/**'
+ - 'package-lock.json'
+ pull_request:
+ branches: [master, studio]
+ paths:
+ - 'apps/studio/**'
+ - 'package-lock.json'
+
+# Cancel old builds on new commit for same workflow + branch/PR
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ check:
+ # Uses larger hosted runner as it significantly decreases build times
+ runs-on: [larger-runner-4cpu]
+
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ sparse-checkout: |
+ apps/studio
+ packages
+ - name: Use Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version-file: '.nvmrc'
+ cache: 'npm'
+ - name: Install deps
+ run: npm ci
+ working-directory: ./
+ - name: Run Tests
+ env:
+ # Default is 2 GB, increase to have less frequent OOM errors
+ NODE_OPTIONS: '--max_old_space_size=3072'
+ run: npm run test:studio
+ working-directory: ./
diff --git a/.vale.ini b/.vale.ini
new file mode 100644
index 00000000000..1ff9438668a
--- /dev/null
+++ b/.vale.ini
@@ -0,0 +1,14 @@
+StylesPath = './vale/styles'
+MinAlertLevel = 'suggestion'
+
+Vocab = Supabase
+
+[formats]
+mdx = md
+
+[*]
+BasedOnStyles = Vale, Custom
+BlockIgnores = (?s) *(
+ {message.content} +
+ {isLoading && } ++ Sent {hoursFromNow > 6 ? `on ${formattedCreatedAt}` : formattedTimeFromNow} +
+ )} ++ Everything you have ever wondered about database.design +
+{faq.answer}
+No conversations created yet
+ +Edit name
+Delete thread
+Error fetching user details
+ + const { data } = await supabase + .from('profile_threads') + .select() + .eq('user_id', user.id) + .order('created_at', { ascending: false }) + const threads = data ?? [] + + return ( +No user found
+ ) : ( + <> + +{user.user_metadata.full_name}
+@{user.user_metadata.user_name}
+{id}
+//{text}
+//{user.user_metadata.full_name}
+{user.user_metadata.email}
+Profile
+FAQs
+Supabase
+Sign in
+Supabase
+Copy SQL
+Download SQL
+Load SQL in Supabase
+URL
+URL
-