Update Supabase server instructions and scripts
Updated README.md and scripts to separate the 'web application' and 'Supabase server' in the development process. Modified package.json to include specific scripts for starting, stopping, and generating the Supabase schema. Also adjusted GitHub workflow to start Supabase server before running the app and reduced retention of Playwright report artifacts from 30 to 7 days.
This commit is contained in:
13
.github/workflows/workflow.yml
vendored
13
.github/workflows/workflow.yml
vendored
@@ -62,10 +62,19 @@ jobs:
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Install Playwright Browsers
|
||||
run: pnpm exec ./apps/e2e/node_modules/.bin/playwright install --with-deps
|
||||
|
||||
- name: Supabase CLI
|
||||
uses: supabase/setup-cli@v1
|
||||
|
||||
- name: Supabase Server
|
||||
run: pnpm run supabase:web:start -- -x studio,migra,deno-relay,pgadmin-schema-diff,imgproxy,logflare
|
||||
|
||||
- name: Run App
|
||||
run: pnpm run dev
|
||||
run: pnpm run dev &
|
||||
|
||||
- name: Run Playwright tests
|
||||
run: pnpm run test
|
||||
- uses: actions/upload-artifact@v4
|
||||
@@ -73,4 +82,4 @@ jobs:
|
||||
with:
|
||||
name: playwright-report
|
||||
path: playwright-report/
|
||||
retention-days: 30
|
||||
retention-days: 7
|
||||
|
||||
34
README.md
34
README.md
@@ -68,10 +68,42 @@ pnpm i
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
This command will run both the web application and the Supabase container. If the Supabase container is already running, it will only start the web application.
|
||||
This command will run the web application.
|
||||
|
||||
Please refer to `apps/web/README.md` for more information about the web application.
|
||||
|
||||
### 3. Start the Supabase server
|
||||
|
||||
To start the Supabase server, you can use the following command:
|
||||
|
||||
```bash
|
||||
# Start the Supabase server
|
||||
pnpm run supabase:web:start
|
||||
```
|
||||
|
||||
This command runs the Supabase server locally for the app `web`.
|
||||
|
||||
Should you add more apps, you can run the following command:
|
||||
|
||||
```bash
|
||||
# Start the Supabase server for the app `app-name`
|
||||
pnpm run supabase:app-name:start
|
||||
```
|
||||
|
||||
And to stop the Supabase server, you can use the following command:
|
||||
|
||||
```bash
|
||||
# Stop the Supabase server
|
||||
pnpm run supabase:web:stop
|
||||
```
|
||||
|
||||
To generate the Supabase schema, you can use the following command:
|
||||
|
||||
```bash
|
||||
# Generate the Supabase schema
|
||||
pnpm run supabase:web:typegen
|
||||
```
|
||||
|
||||
## Architecture
|
||||
|
||||
This project uses Turborepo to manage multiple packages in a single repository.
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"start": "pnpm with-env next start",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"with-env": "dotenv -e ./.env.local --",
|
||||
"supabase:dev": "supabase status || supabase start",
|
||||
"supabase:start": "supabase status || supabase start",
|
||||
"supabase:stop": "supabase stop",
|
||||
"supabase:reset": "supabase db reset || supabase start",
|
||||
"supabase:status": "supabase status",
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
"lint:fix": "turbo lint --continue -- --fix --cache --cache-location 'node_modules/.cache/.eslintcache' && manypkg fix",
|
||||
"typecheck": "turbo typecheck",
|
||||
"test": "turbo test",
|
||||
"supabase:web:start": "pnpm --filter web supabase:start",
|
||||
"supabase:web:stop": "pnpm --filter web supabase:stop",
|
||||
"supabase:web:typegen": "pnpm --filter web supabase:typegen",
|
||||
"stripe:listen": "pnpm --filter '@kit/stripe' start"
|
||||
},
|
||||
"prettier": "@kit/prettier-config",
|
||||
|
||||
Reference in New Issue
Block a user