diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 93fe623..fdcac87 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,4 +32,13 @@ jobs: - uses: actions/setup-go@v5 with: go-version: ${{ env.GOVERSION }} - - run: go test -cover ./... + - run: make test + + integration_test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + - run: make integration-test diff --git a/Makefile b/Makefile index 178431b..0721460 100644 --- a/Makefile +++ b/Makefile @@ -15,9 +15,7 @@ integration-test: clean coroc go run -tags durable ./dispatchtest/integration # durable mode clean: - find . -name '*_durable.go' -delete + @find . -name '*_durable.go' -delete coroc: - @which coroc &>/dev/null \ - || echo "Installing coroc..." \ - && go install github.com/dispatchrun/coroutine/compiler/cmd/coroc@latest + @which coroc >/dev/null || go install github.com/dispatchrun/coroutine/compiler/cmd/coroc@latest diff --git a/dispatchclient/client.go b/dispatchclient/client.go index 22ec311..c5cd499 100644 --- a/dispatchclient/client.go +++ b/dispatchclient/client.go @@ -1,3 +1,5 @@ +//go:build !durable + package dispatchclient import ( diff --git a/dispatchclient/serde.go b/dispatchclient/serde.go index bb47225..b06d2af 100644 --- a/dispatchclient/serde.go +++ b/dispatchclient/serde.go @@ -1,3 +1,5 @@ +//go:build !durable + package dispatchclient import "github.com/dispatchrun/coroutine/types" diff --git a/dispatchcoro/volatile.go b/dispatchcoro/volatile.go index ccab6d7..096f9a5 100644 --- a/dispatchcoro/volatile.go +++ b/dispatchcoro/volatile.go @@ -1,3 +1,5 @@ +//go:build !durable + package dispatchcoro import ( diff --git a/dispatchproto/any.go b/dispatchproto/any.go index 5b1672b..6da878c 100644 --- a/dispatchproto/any.go +++ b/dispatchproto/any.go @@ -1,3 +1,5 @@ +//go:build !durable + package dispatchproto import ( diff --git a/dispatchproto/error.go b/dispatchproto/error.go index d1f76e3..4aac910 100644 --- a/dispatchproto/error.go +++ b/dispatchproto/error.go @@ -1,3 +1,5 @@ +//go:build !durable + package dispatchproto import ( diff --git a/dispatchproto/function.go b/dispatchproto/function.go index 936762f..cdc0863 100644 --- a/dispatchproto/function.go +++ b/dispatchproto/function.go @@ -1,3 +1,5 @@ +//go:build !durable + package dispatchproto import "context" diff --git a/dispatchproto/id.go b/dispatchproto/id.go index d548c94..278b58d 100644 --- a/dispatchproto/id.go +++ b/dispatchproto/id.go @@ -1,3 +1,5 @@ +//go:build !durable + package dispatchproto // ID is an identifier for a dispatched function call. diff --git a/dispatchproto/proto.go b/dispatchproto/proto.go index 3adcb79..ba9c35c 100644 --- a/dispatchproto/proto.go +++ b/dispatchproto/proto.go @@ -1,3 +1,5 @@ +//go:build !durable + package dispatchproto import ( diff --git a/dispatchproto/serde.go b/dispatchproto/serde.go index 4228b39..91d96b1 100644 --- a/dispatchproto/serde.go +++ b/dispatchproto/serde.go @@ -1,3 +1,5 @@ +//go:build !durable + package dispatchproto import ( diff --git a/dispatchproto/status.go b/dispatchproto/status.go index 4b62435..82d5ed2 100644 --- a/dispatchproto/status.go +++ b/dispatchproto/status.go @@ -1,3 +1,5 @@ +//go:build !durable + package dispatchproto import ( diff --git a/dispatchproto/unsafe.go b/dispatchproto/unsafe.go index 6160238..bcfa766 100644 --- a/dispatchproto/unsafe.go +++ b/dispatchproto/unsafe.go @@ -1,3 +1,5 @@ +//go:build !durable + package dispatchproto import ( diff --git a/dispatchserver/endpoint.go b/dispatchserver/endpoint.go index 4021d11..d4d9155 100644 --- a/dispatchserver/endpoint.go +++ b/dispatchserver/endpoint.go @@ -1,3 +1,5 @@ +//go:build !durable + package dispatchserver import ( diff --git a/dispatchserver/server.go b/dispatchserver/server.go index 65e51f9..96458e4 100644 --- a/dispatchserver/server.go +++ b/dispatchserver/server.go @@ -1,3 +1,5 @@ +//go:build !durable + package dispatchserver import ( diff --git a/dispatchtest/endpoint.go b/dispatchtest/endpoint.go index 99b2b6c..fc7b46d 100644 --- a/dispatchtest/endpoint.go +++ b/dispatchtest/endpoint.go @@ -1,3 +1,5 @@ +//go:build !durable + package dispatchtest import ( diff --git a/dispatchtest/integration/main.go b/dispatchtest/integration/main.go index 550a3ca..ccfa2d5 100644 --- a/dispatchtest/integration/main.go +++ b/dispatchtest/integration/main.go @@ -52,5 +52,6 @@ func run() error { if output != "88888888" { return fmt.Errorf("unexpected output: %q", output) } + fmt.Println("OK") return nil } diff --git a/dispatchtest/key.go b/dispatchtest/key.go index 9bd56ac..4693e25 100644 --- a/dispatchtest/key.go +++ b/dispatchtest/key.go @@ -1,3 +1,5 @@ +//go:build !durable + package dispatchtest import ( diff --git a/dispatchtest/run.go b/dispatchtest/run.go index 476701a..f03e44b 100644 --- a/dispatchtest/run.go +++ b/dispatchtest/run.go @@ -1,3 +1,5 @@ +//go:build !durable + package dispatchtest import ( diff --git a/dispatchtest/server.go b/dispatchtest/server.go index dcf01d3..ac77568 100644 --- a/dispatchtest/server.go +++ b/dispatchtest/server.go @@ -1,3 +1,5 @@ +//go:build !durable + package dispatchtest import ( diff --git a/go.mod b/go.mod index d2d3096..0b52a2c 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( connectrpc.com/connect v1.16.2 connectrpc.com/validate v0.1.0 github.com/aws/aws-lambda-go v1.47.0 - github.com/dispatchrun/coroutine v0.9.0 + github.com/dispatchrun/coroutine v0.9.1 github.com/offblocks/httpsig v0.8.1 golang.org/x/sys v0.21.0 google.golang.org/protobuf v1.34.2 diff --git a/go.sum b/go.sum index 3aa4470..0ce5cb1 100644 --- a/go.sum +++ b/go.sum @@ -17,8 +17,8 @@ github.com/bufbuild/protovalidate-go v0.6.2/go.mod h1:4BR3rKEJiUiTy+sqsusFn2ladO github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dispatchrun/coroutine v0.9.0 h1:OKDggtjKVbEYP6DRKzRSvwcFHlXnLuhncqpH/bUf7Bg= -github.com/dispatchrun/coroutine v0.9.0/go.mod h1:4/Lb6fpuR+IQa3CPWBBbVG5gbZEIBqC48Q/PgWmRxKM= +github.com/dispatchrun/coroutine v0.9.1 h1:EYJEXrB2ogbXnN4pJGTxzv260vxgAmZnstouTzqwA/E= +github.com/dispatchrun/coroutine v0.9.1/go.mod h1:4/Lb6fpuR+IQa3CPWBBbVG5gbZEIBqC48Q/PgWmRxKM= github.com/dunglas/httpsfv v1.0.2 h1:iERDp/YAfnojSDJ7PW3dj1AReJz4MrwbECSSE59JWL0= github.com/dunglas/httpsfv v1.0.2/go.mod h1:zID2mqw9mFsnt7YC3vYQ9/cjq30q41W+1AnDwH8TiMg= github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= diff --git a/internal/auth/key.go b/internal/auth/key.go index 3d92283..1a406b1 100644 --- a/internal/auth/key.go +++ b/internal/auth/key.go @@ -1,3 +1,5 @@ +//go:build !durable + package auth import ( diff --git a/internal/auth/signature.go b/internal/auth/signature.go index 9af50b6..f9a6a38 100644 --- a/internal/auth/signature.go +++ b/internal/auth/signature.go @@ -1,3 +1,5 @@ +//go:build !durable + package auth import ( diff --git a/internal/env/env.go b/internal/env/env.go index b240568..c8816a2 100644 --- a/internal/env/env.go +++ b/internal/env/env.go @@ -1,3 +1,5 @@ +//go:build !durable + package env import "strings"