-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from vhpx/main
chore: verify supabase migration workflow
- Loading branch information
Showing
8 changed files
with
2,473 additions
and
10 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Supabase CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- production | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy: | ||
name: Migrate production database | ||
timeout-minutes: 15 | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }} | ||
SUPABASE_DB_PASSWORD: ${{ secrets.PRODUCTION_DB_PASSWORD }} | ||
PRODUCTION_PROJECT_ID: ${{ secrets.PRODUCTION_PROJECT_ID }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: supabase/setup-cli@v1 | ||
|
||
- name: Deploy migrations to production | ||
run: | | ||
cd apps/web | ||
supabase link --project-ref ${{ env.PRODUCTION_PROJECT_ID }} | ||
supabase db push |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: ["main", "production"] | ||
pull_request: | ||
types: [opened, synchronize] | ||
|
||
jobs: | ||
build: | ||
name: Automated Tests | ||
timeout-minutes: 15 | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [20] | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- uses: pnpm/action-setup@v3 | ||
with: | ||
version: 8 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: "pnpm" | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Test | ||
run: pnpm test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { describe, expect, test } from "vitest"; | ||
|
||
describe("Verify test setup", () => { | ||
test("vitest should be working", () => { | ||
expect(true).toBe(true); | ||
}); | ||
}); |
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
Oops, something went wrong.
34659a3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
genie – ./
supagenie.vercel.app
intelligenie.vercel.app
genie.vohoangphuc.com
genie-vhpx.vercel.app
genie-git-production-vhpx.vercel.app