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

chore(project): use go version 1.16 #639

Merged
merged 19 commits into from
Oct 25, 2021
Merged
2 changes: 1 addition & 1 deletion .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

- uses: actions/setup-go@v2
with:
go-version: '1.14'
go-version: '1.16'

- uses: actions/cache@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

- uses: actions/setup-go@v1
with:
go-version: '1.15'
go-version: '1.16'

- uses: actions/cache@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

- uses: actions/setup-go@v2
with:
go-version: '1.14'
go-version: '1.16'

- uses: actions/cache@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion docs/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Your dockerfile could look like this. It uses Go modules, layered caching for fa
lightweight images (usually a few megabytes).

```dockerfile
FROM golang:1.13 as build
FROM golang:1.16 as build

WORKDIR /app

Expand Down
1 change: 0 additions & 1 deletion test/integration/.gitignore

This file was deleted.

10 changes: 8 additions & 2 deletions test/integration/go.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
module integration

go 1.13
go 1.16

replace github.com/prisma/prisma-client-go => ../../

require github.com/prisma/prisma-client-go v0.0.0-00010101000000-000000000000
require (
github.com/iancoleman/strcase v0.0.0-20190422225806-e506e3ef7365
github.com/joho/godotenv v1.3.0
github.com/prisma/prisma-client-go v0.0.0-00010101000000-000000000000
github.com/shopspring/decimal v1.2.0
github.com/takuoki/gocase v1.0.0
)
Comment on lines -7 to +13
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this I got an error.

https://github.com/prisma/prisma-client-go/runs/3958761686#step:3:1046

Step 9/16 : RUN go build -o /app/main .
---> Running in d65bf1e64845
go: integration/db: package github.com/iancoleman/strcase imported from implicitly required module; to add missing requirements, run:
go get github.com/iancoleman/strcase@v0.0.0-20190422225806-e506e3ef7365
go: integration/db: package github.com/joho/godotenv imported from implicitly required module; to add missing requirements, run:
go get github.com/joho/godotenv@v1.3.0
go: integration/db: package github.com/shopspring/decimal imported from implicitly required module; to add missing requirements, run:
go get github.com/shopspring/decimal@v1.2.0
go: integration/db: package github.com/takuoki/gocase imported from implicitly required module; to add missing requirements, run:
go get github.com/takuoki/gocase@v1.0.0
The command '/bin/sh -c go build -o /app/main .' returned a non-zero code: 1

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah this is actually correct 👍

19 changes: 19 additions & 0 deletions test/integration/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/iancoleman/strcase v0.0.0-20190422225806-e506e3ef7365 h1:ECW73yc9MY7935nNYXUkK7Dz17YuSUI9yqRqYS8aBww=
github.com/iancoleman/strcase v0.0.0-20190422225806-e506e3ef7365/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE=
github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc=
github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ=
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/takuoki/gocase v1.0.0 h1:gPwLJTWVm2T1kUiCsKirg/faaIUGVTI0FA3SYr75a44=
github.com/takuoki/gocase v1.0.0/go.mod h1:QgOKJrbuJoDrtoKswBX1/Dw8mJrkOV9tbQZJaxaJ6zc=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
17 changes: 6 additions & 11 deletions test/integration/integration.dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
FROM golang:1.13 as build
FROM golang:1.16 as build

WORKDIR /app

ENV PHOTON_GO_LOG=info
ENV DEBUG=*

# add go modules lockfiles
COPY go.mod go.sum ./
RUN go mod download

COPY . ./

RUN cd test/integration/; go run github.com/prisma/prisma-client-go prefetch
WORKDIR /app/test/integration
s-takehana marked this conversation as resolved.
Show resolved Hide resolved

RUN cd test/integration/; go run github.com/prisma/prisma-client-go db push --preview-feature --schema schemax.prisma
RUN go mod download -x

# generate the client in the integration folder
RUN cd test/integration/; go run github.com/prisma/prisma-client-go generate --schema schemax.prisma
RUN go run github.com/prisma/prisma-client-go db push --schema schemax.prisma

# build the integration binary with all dependencies
RUN cd test/integration/; go build -o /app/main .
RUN go build -o /app/main .

# start a new stage to test if the runtime fetching works
FROM golang:1.13
FROM golang:1.16

WORKDIR /app

Expand Down