Skip to content

Commit

Permalink
Merge pull request #6 from theopenlane/feat-search
Browse files Browse the repository at this point in the history
feat: generate search resolvers
  • Loading branch information
golanglemonade authored Sep 5, 2024
2 parents 3a3692f + fbe28b0 commit e7713c3
Show file tree
Hide file tree
Showing 8 changed files with 485 additions and 25 deletions.
23 changes: 14 additions & 9 deletions .buildkite/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,32 @@ env:
IMAGE_REPO: ghcr.io/theopenlane/${APP_NAME}
SONAR_HOST: "https://sonarcloud.io"
steps:
- group: ":test_tube: tests"
- group: ":test_tube: Tests"
key: "tests"
steps:
- label: ":golangci-lint: lint :lint-roller:"
cancel_on_build_failing: true
key: "lint"
cancel_on_build_failing: true
plugins:
- docker#v5.11.0:
image: "registry.hub.docker.com/golangci/golangci-lint:latest-alpine"
command: ["golangci-lint", "run", "-v"]
image: "ghcr.io/theopenlane/build-image:latest"
always-pull: true
command: ["task", "go:lint"]
environment:
- "GOTOOLCHAIN=auto"
- label: ":golang: go test"
key: "go_test"
cancel_on_build_failing: true
plugins:
- docker#v5.11.0:
image: golang:1.23.0
command: ["go", "test", "-coverprofile=coverage.out", "./..."]
image: "ghcr.io/theopenlane/build-image:latest"
always-pull: true
command: ["task", "go:test:cover"]
environment:
- "GOTOOLCHAIN=auto"
artifact_paths: ["coverage.out"]
- group: ":closed_lock_with_key: Security Checks"
depends_on: "tests"
depends_on: "go_test"
key: "security"
steps:
- label: ":closed_lock_with_key: gosec"
Expand All @@ -33,6 +37,7 @@ steps:
- docker#v5.11.0:
image: "registry.hub.docker.com/securego/gosec:2.20.0"
command: ["-no-fail", "-exclude-generated", "-fmt sonarqube", "-out", "results.txt", "./..."]
always-pull: true
environment:
- "GOTOOLCHAIN=auto"
artifact_paths: ["results.txt"]
Expand All @@ -47,7 +52,7 @@ steps:
download: "coverage.out"
step: "go_test"
- docker#v5.11.0:
image: "sonarsource/sonar-scanner-cli:5"
image: "sonarsource/sonar-scanner-cli:11"
environment:
- "SONAR_TOKEN"
- "SONAR_HOST_URL=$SONAR_HOST"
Expand All @@ -63,7 +68,7 @@ steps:
download: coverage.out
step: "go_test"
- docker#v5.11.0:
image: "sonarsource/sonar-scanner-cli:5"
image: "sonarsource/sonar-scanner-cli:11"
environment:
- "SONAR_TOKEN"
- "SONAR_HOST_URL=$SONAR_HOST"
13 changes: 13 additions & 0 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ tasks:
cmds:
- go test -v ./...

go:test:cover:
desc: runs and outputs results of created go tests with coverage
aliases: [cover]
cmds:
- go test -v ./... -coverprofile=coverage.out

go:test:coverout:
desc: runs and outputs results of created go tests with coverage
aliases: [cover]
cmds:
- task: go:test:cover
- go tool cover -html=coverage.out

go:tidy:
desc: runs go mod tidy on the backend
aliases: [tidy]
Expand Down
51 changes: 45 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,61 @@ module github.com/theopenlane/gqlgen-plugins
go 1.23.0

require (
entgo.io/contrib v0.6.0
entgo.io/ent v0.14.1
github.com/99designs/gqlgen v0.17.49
github.com/gertd/go-pluralize v0.2.1
github.com/stoewer/go-strcase v1.3.0
github.com/stretchr/testify v1.9.0
github.com/theopenlane/entx v0.1.5
github.com/vektah/gqlparser/v2 v2.5.16
)

require (
ariga.io/atlas v0.26.1 // indirect
github.com/XSAM/otelsql v0.33.0 // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/agnivade/levenshtein v1.1.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/antlr4-go/antlr/v4 v4.13.1 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/coder/websocket v1.8.12 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/inflect v0.21.0 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/hashicorp/hcl/v2 v2.22.0 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/ncruces/go-strftime v0.1.9 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/sosodev/duration v1.3.1 // indirect
golang.org/x/mod v0.18.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/tools v0.22.0 // indirect
github.com/theopenlane/utils v0.1.5 // indirect
github.com/tursodatabase/libsql-client-go v0.0.0-20240902231107-85af5b9d094d // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/zclconf/go-cty v1.15.0 // indirect
go.opentelemetry.io/otel v1.29.0 // indirect
go.opentelemetry.io/otel/metric v1.29.0 // indirect
go.opentelemetry.io/otel/trace v1.29.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/exp v0.0.0-20240823005443-9b4947da3948 // indirect
golang.org/x/mod v0.20.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.24.0 // indirect
golang.org/x/text v0.17.0 // indirect
golang.org/x/tools v0.24.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
modernc.org/gc/v3 v3.0.0-20240801135723-a856999a2e4a // indirect
modernc.org/libc v1.60.0 // indirect
modernc.org/mathutil v1.6.0 // indirect
modernc.org/memory v1.8.0 // indirect
modernc.org/sqlite v1.32.0 // indirect
modernc.org/strutil v1.2.0 // indirect
modernc.org/token v1.1.0 // indirect
)
Loading

0 comments on commit e7713c3

Please sign in to comment.