Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
20a1d61
fix: assign linked project ref to global variable (#1796)
sweatybridge Dec 30, 2023
ccd0ef3
fix: disable http agent keep alive for postinstall (#1797)
sweatybridge Dec 30, 2023
c9ad664
chore(deps): bump docker/login-action from 2 to 3 (#1799)
dependabot[bot] Jan 2, 2024
b9c1c79
chore: remove migra ci build target
sweatybridge Jan 2, 2024
8a6214b
chore: debug github output for publish job (#1802)
sweatybridge Jan 2, 2024
c4f5af1
feat: update gotrue version
J0 Jan 2, 2024
f29c3a2
feat: update auth version to v2.130.0 (#1804)
J0 Jan 2, 2024
ade6deb
chore: improve ci test reports with gotestsum
sweatybridge Jan 2, 2024
e6c060a
chore: remove unnecessary fmt check
sweatybridge Jan 2, 2024
00377ea
chore: clean up go modules
sweatybridge Jan 2, 2024
8a36423
chore: fix false positives reported by gotestsum
sweatybridge Jan 2, 2024
c33735d
chore: track linter and testsum versions in go.mod
sweatybridge Jan 2, 2024
d817d85
chore: upgrade ci runner os version
sweatybridge Jan 2, 2024
0f40665
chore: split test command for clarity
sweatybridge Jan 2, 2024
532ad91
chore(deps): bump golang.org/x/crypto from 0.16.0 to 0.17.0 (#1805)
dependabot[bot] Jan 2, 2024
228e45f
feat(test): support offline pg_prove and custom tests directory (#1788)
sweatybridge Jan 2, 2024
4bd1d81
fix(diff): pin migra image to version 3.0.1663481299 (#1806)
sweatybridge Jan 2, 2024
ed7e872
fix(studio): bump studio image to 20240101-8e4a094 (#1808)
saltcod Jan 3, 2024
f3f04be
chore(deps): bump github.com/oapi-codegen/runtime from 1.1.0 to 1.1.1…
dependabot[bot] Jan 5, 2024
4050ed5
chore(deps): bump golang.org/x/term from 0.15.0 to 0.16.0 (#1816)
dependabot[bot] Jan 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
test:
name: Test
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

Expand All @@ -19,17 +19,16 @@ jobs:
cache: true

- run: |
if [ ! -z $(gofmt -l .) ]; then echo 'Make sure to run "go fmt ./..." before commit!' && exit 1; fi
go test ./... -race -v -count=1 -coverpkg ./cmd/...,./internal/... -coverprofile=coverage.out
go tool cover -func coverage.out | grep total
go run gotest.tools/gotestsum -- ./... -race -v -count=1 \
-coverpkg ./cmd/...,./internal/... -coverprofile=coverage.out

- uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: coverage.out

lint:
name: Lint
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

Expand All @@ -41,7 +40,6 @@ jobs:

- uses: golangci/golangci-lint-action@v3
with:
version: v1.53
args: --timeout 3m --verbose

start:
Expand All @@ -61,7 +59,7 @@ jobs:

codegen:
name: Codegen
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/pg-prove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,20 @@ jobs:
outputs:
image_tag: supabase/pg_prove:${{ steps.version.outputs.pg_prove }}
steps:
- run: docker context create builders
- uses: docker/setup-buildx-action@v3
with:
endpoint: builders
- uses: docker/build-push-action@v5
with:
load: true
context: https://github.com/horrendo/pg_prove.git
target: builder
tags: builder
tags: supabase/pg_prove:builder
- id: version
# Replace space with equal to get the raw version string, ie. pg_prove=3.36
run: docker run --rm -it builder pg_prove --version | tr ' ' '=' >> $GITHUB_OUTPUT
run: |
docker run --rm -a STDOUT supabase/pg_prove:builder pg_prove --version \
| tr ' ' '=' \
>> $GITHUB_OUTPUT
shell: bash

build_image:
needs:
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/publish-migra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,20 @@ jobs:
outputs:
image_tag: supabase/migra:${{ steps.version.outputs.migra }}
steps:
- run: docker context create builders
- uses: docker/setup-buildx-action@v3
with:
endpoint: builders
- uses: docker/build-push-action@v5
with:
load: true
context: https://github.com/djrobstep/migra.git
target: builder
tags: builder
tags: supabase/migra:builder
- id: version
# Replace space with equal to get the raw version string, ie. migra=3.0.1663481299
run: |
docker run --rm -it builder pip show migra \
docker run --rm -a STDOUT supabase/migra:builder pip show migra \
| grep 'Version' \
| sed -E 's/Version: (.*)/migra=\1/g' \
>> $GITHUB_OUTPUT
shell: bash

build_image:
needs:
Expand All @@ -46,7 +43,7 @@ jobs:
- uses: docker/setup-buildx-action@v3
with:
endpoint: builders
- uses: docker/login-action@v2
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
Expand All @@ -67,7 +64,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v2
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
Expand Down
9 changes: 7 additions & 2 deletions cmd/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,10 @@ var (

dbTestCmd = &cobra.Command{
Hidden: true,
Use: "test",
Use: "test [path] ...",
Short: "Tests local database with pgTAP",
RunE: func(cmd *cobra.Command, args []string) error {
return test.Run(cmd.Context(), afero.NewOsFs())
return test.Run(cmd.Context(), args, flags.DbConfig, afero.NewOsFs())
},
}
)
Expand Down Expand Up @@ -299,5 +299,10 @@ func init() {
dbCmd.AddCommand(dbStartCmd)
// Build test command
dbCmd.AddCommand(dbTestCmd)
testFlags := dbTestCmd.Flags()
testFlags.String("db-url", "", "Tests the database specified by the connection string (must be percent-encoded).")
testFlags.Bool("linked", false, "Runs pgTAP tests on the linked project.")
testFlags.Bool("local", true, "Runs pgTAP tests on the local database.")
dbTestCmd.MarkFlagsMutuallyExclusive("db-url", "linked", "local")
rootCmd.AddCommand(dbCmd)
}
10 changes: 9 additions & 1 deletion cmd/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var (
}

testDbCmd = &cobra.Command{
Use: "db",
Use: "db [path] ...",
Short: dbTestCmd.Short,
RunE: dbTestCmd.RunE,
}
Expand All @@ -40,9 +40,17 @@ var (
)

func init() {
// Build db command
dbFlags := testDbCmd.Flags()
dbFlags.String("db-url", "", "Tests the database specified by the connection string (must be percent-encoded).")
dbFlags.Bool("linked", false, "Runs pgTAP tests on the linked project.")
dbFlags.Bool("local", true, "Runs pgTAP tests on the local database.")
testDbCmd.MarkFlagsMutuallyExclusive("db-url", "linked", "local")
testCmd.AddCommand(testDbCmd)
// Build new command
newFlags := testNewCmd.Flags()
newFlags.VarP(&template, "template", "t", "Template framework to generate.")
testCmd.AddCommand(testNewCmd)
// Build test command
rootCmd.AddCommand(testCmd)
}
Loading