Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hawken/supabase #2

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
24 changes: 24 additions & 0 deletions .github/workflows/database-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 'database-tests'
on:
pull_request:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: supabase/setup-cli@v1
with:
version: latest
- run: supabase db start
- run: supabase db lint

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: supabase/setup-cli@v1
with:
version: latest
- run: supabase db start
- run: supabase test db
15 changes: 15 additions & 0 deletions .github/workflows/edge-function-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: 'edge-function-tests'
# on:
# pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: supabase/setup-cli@v1
with:
version: 1.11.4
- run: supabase start
- run: supabase functions serve
- run: deno test --allow-all deno-test.ts --env-file .env.local
21 changes: 21 additions & 0 deletions .github/workflows/generate-types.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 'generate-types'
on:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: supabase/setup-cli@v1
with:
version: latest
- run: supabase db start
- name: Verify generated types match Postgres schema
run: |
supabase gen types typescript --local > schema.gen.ts
if ! git diff --ignore-space-at-eol --exit-code --quiet schema.gen.ts; then
echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
fi
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
# ccc-databased
approximate caution, approximate context

## Getting Started

```sh
$ npm install
$ npx supabase login
$ npx supabase start
```

To set up the local database (TODO: when?)

```sh
# to apply migrations from the local repo clone to the local database
$ npx supabase db reset
# or pull down the remote schema into the local database
$ npx supabase db pull
```
Loading
Loading