Skip to content

Commit

Permalink
chore: updated gqlgen
Browse files Browse the repository at this point in the history
Signed-off-by: Allan Sifuna <[email protected]>
  • Loading branch information
allansifuna committed Nov 8, 2023
1 parent 3a9307a commit de9ec0b
Show file tree
Hide file tree
Showing 31 changed files with 3,715 additions and 3,481 deletions.
50 changes: 18 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ env:
COMPOSE_DOCKER_CLI_BUILD: 1
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOOGLE_CLOUD_PROJECT: ${{ secrets.GOOGLE_CLOUD_PROJECT }}
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
FIREBASE_WEB_API_KEY: ${{ secrets.FIREBASE_WEB_API_KEY }}
ENVIRONMENT: ${{ secrets.ENVIRONMENT }}
ROOT_COLLECTION_SUFFIX: ${{ secrets.ROOT_COLLECTION_SUFFIX }}
Expand All @@ -28,53 +29,38 @@ jobs:
lint_and_test:
strategy:
matrix:
go-version: [1.17.x]
go-version: [1.21.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 80
steps:
- uses: actions/checkout@v2
- uses: google-github-actions/setup-gcloud@main
with:
project_id: ${{ secrets.GOOGLE_CLOUD_PROJECT }}
service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
export_default_credentials: true
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --timeout=10m

- name: Install Go dependencies
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.37.1
go get -d github.com/kisielk/errcheck
go get -d golang.org/x/lint/golint
go install honnef.co/go/tools/cmd/staticcheck@latest
go get -d github.com/axw/gocov/gocov
go get -d github.com/securego/gosec/cmd/gosec
go get -d github.com/ory/go-acc
go get -d github.com/client9/misspell/cmd/misspell
go get -d github.com/gordonklaus/ineffassign
go get github.com/fzipp/gocyclo
go get github.com/stretchr/testify/[email protected]
go get github.com/ory/go-acc
go get golang.org/x/oauth2/internal
go install github.com/savannahghi/bewellcli@$CLI_VERSION
go install github.com/axw/gocov/gocov@latest
go install github.com/securego/gosec/v2/cmd/gosec@latest
go install github.com/ory/go-acc@latest
go get go.opentelemetry.io/otel/metric/[email protected]
- uses: 'google-github-actions/auth@v1'
with:
credentials_json: "${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}"
project_id: ${{ secrets.GOOGLE_CLOUD_PROJECT }}

- name: Run lint and test
run: |
staticcheck ./...
bewellcli service validate-schema --name onboarding --version $GITHUB_SHA --url ${{ secrets.SERVICE_GRAPHQL_URL }}
go fmt $(go list ./... | grep -v /vendor/)
go vet $(go list ./... | grep -v /vendor/)
golint -set_exit_status $(go list ./... | grep -v /vendor/)
errcheck -ignore 'os:.*,' $(go list ./... | grep -v /vendor/)
misspell -error .
gosec -exclude=G304,G101 ./...
go-acc -o coverage.txt --ignore generated,cmd ./... -- -timeout 60m
grep -v "generated.go" coverage.txt | grep -v "_gen.go" | grep -v "mocks.go" | grep -v "*resolver*go" | grep -v "server.go" > coverage.out
go-acc -o coverage.txt --ignore generated,cmd,graph,tests, engagement ./... -- -timeout 60m
grep -v "generated.go" coverage.txt | grep -v "_gen.go" | grep -v "mocks.go" | grep -v "*mocks.go" | grep -v "mock.go" | grep -v "*mock.go" | grep -v "*resolvers*go" | grep -v "*.resolvers.go" | grep -v "server.go" > coverage.out
go tool cover -html=coverage.out -o coverage.html
gocov convert coverage.out > coverage.json
gocov report coverage.json > coverage_report.txt
Expand Down
48 changes: 35 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ require (
cloud.google.com/go/firestore v1.6.1
cloud.google.com/go/pubsub v1.23.0
firebase.google.com/go v3.13.0+incompatible
github.com/99designs/gqlgen v0.17.21
github.com/99designs/gqlgen v0.17.40
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d
github.com/brianvoe/gofakeit v3.18.0+incompatible
github.com/brianvoe/gofakeit/v5 v5.11.2
github.com/cenkalti/backoff v2.2.1+incompatible
github.com/google/uuid v1.3.0
github.com/google/uuid v1.4.0
github.com/gorilla/handlers v1.5.1
github.com/gorilla/mux v1.8.0
github.com/imroc/req v0.3.2
Expand All @@ -26,13 +26,13 @@ require (
github.com/savannahghi/scalarutils v0.0.4
github.com/savannahghi/serverutils v0.0.6
github.com/sirupsen/logrus v1.8.1
github.com/stretchr/testify v1.8.0
github.com/vektah/gqlparser/v2 v2.5.1
github.com/stretchr/testify v1.8.2
github.com/vektah/gqlparser/v2 v2.5.10
go.opencensus.io v0.23.0
go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux v0.21.0
go.opentelemetry.io/otel v1.7.0
go.opentelemetry.io/otel/trace v1.7.0
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d
golang.org/x/crypto v0.14.0
golang.org/x/time v0.0.0-20220609170525-579cf78fd858
)

Expand All @@ -50,8 +50,12 @@ require (
github.com/agnivade/levenshtein v1.1.1 // indirect
github.com/aws/aws-sdk-go v1.44.45 // indirect
github.com/census-instrumentation/opencensus-proto v0.3.0 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dgraph-io/ristretto v0.0.2 // indirect
github.com/felixge/httpsnoop v1.0.3 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/getsentry/sentry-go v0.13.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
Expand All @@ -65,40 +69,58 @@ require (
github.com/googleapis/gax-go/v2 v2.4.0 // indirect
github.com/googleapis/go-type-adapters v1.0.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.3 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/kr/pretty v0.2.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/lithammer/shortuuid v3.0.0+incompatible // indirect
github.com/magiconair/properties v1.8.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/ory/go-acc v0.2.8 // indirect
github.com/ory/viper v1.7.5 // indirect
github.com/pborman/uuid v1.2.0 // indirect
github.com/pelletier/go-toml v1.8.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/prometheus v0.36.2 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/segmentio/ksuid v1.0.4 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/sosodev/duration v1.2.0 // indirect
github.com/spf13/afero v1.2.2 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/cobra v1.0.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/ttacon/builder v0.0.0-20170518171403-c099f663e1c2 // indirect
github.com/ttacon/libphonenumber v1.2.1 // indirect
github.com/urfave/cli/v2 v2.25.5 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
go.opentelemetry.io/contrib v1.7.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 // indirect
go.opentelemetry.io/otel/exporters/jaeger v1.7.0 // indirect
go.opentelemetry.io/otel/metric v0.30.0 // indirect
go.opentelemetry.io/otel/sdk v1.7.0 // indirect
golang.org/x/mod v0.7.0 // indirect
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
golang.org/x/mod v0.13.0 // indirect
golang.org/x/net v0.16.0 // indirect
golang.org/x/oauth2 v0.0.0-20220628200809-02e64fa58f26 // indirect
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
golang.org/x/sys v0.2.0 // indirect
golang.org/x/text v0.3.8 // indirect
golang.org/x/tools v0.1.12 // indirect
golang.org/x/sync v0.4.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/tools v0.14.0 // indirect
golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect
google.golang.org/api v0.86.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03 // indirect
google.golang.org/grpc v1.47.0 // indirect
google.golang.org/protobuf v1.28.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/ini.v1 v1.57.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit de9ec0b

Please sign in to comment.