Skip to content

Commit

Permalink
Merge pull request #1 from dispatchrun/add-ci
Browse files Browse the repository at this point in the history
Add Github workflows
  • Loading branch information
Pryz authored May 8, 2024
2 parents 06050b0 + d1bc6d7 commit b82ae28
Show file tree
Hide file tree
Showing 8 changed files with 114 additions and 3 deletions.
23 changes: 23 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
changelog:
categories:
- title: Breaking changes
labels:
- breaking change
- title: New features
labels:
- enhancement
- title: Bug fixes
labels:
- bug
- title: Documentation
labels:
- documentation
- title: Other changes
labels:
- "*"
exclude:
labels:
- internal
- title: Internal
labels:
- internal
17 changes: 17 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Releases

on:
push:
tags:
- "*"

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: ncipollo/release-action@v1
with:
generateReleaseNotes: "true"
35 changes: 35 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Test

on:
pull_request:
push:
branches:
- main

env:
GOVERSION: 1.22.3

jobs:
lint:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
- uses: golangci/golangci-lint-action@v3
with:
version: v1.54.2
args: --timeout 4m

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
- run: go test -cover ./...
2 changes: 1 addition & 1 deletion dispatchlambda/lambda.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
sdkv1 "buf.build/gen/go/stealthrocket/dispatch-proto/protocolbuffers/go/dispatch/sdk/v1"
"github.com/aws/aws-lambda-go/lambda"
"github.com/aws/aws-lambda-go/lambda/messages"
"github.com/stealthrocket/dataplane/sdk/dispatch-go"
"github.com/dispatchrun/dispatch-go"
"google.golang.org/protobuf/proto"
)

Expand Down
2 changes: 1 addition & 1 deletion dispatchlambda/lambda_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
sdkv1 "buf.build/gen/go/stealthrocket/dispatch-proto/protocolbuffers/go/dispatch/sdk/v1"
"github.com/aws/aws-lambda-go/lambda/messages"
"github.com/aws/aws-lambda-go/lambdacontext"
"github.com/stealthrocket/dataplane/sdk/dispatch-go/dispatchlambda"
"github.com/dispatchrun/dispatch-go/dispatchlambda"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/anypb"
"google.golang.org/protobuf/types/known/wrapperspb"
Expand Down
2 changes: 1 addition & 1 deletion function_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"time"

sdkv1 "buf.build/gen/go/stealthrocket/dispatch-proto/protocolbuffers/go/dispatch/sdk/v1"
"github.com/stealthrocket/dataplane/sdk/dispatch-go"
"github.com/dispatchrun/dispatch-go"
"google.golang.org/protobuf/types/known/anypb"
"google.golang.org/protobuf/types/known/wrapperspb"
)
Expand Down
12 changes: 12 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module github.com/dispatchrun/dispatch-go

go 1.22.3

require (
buf.build/gen/go/stealthrocket/dispatch-proto/protocolbuffers/go v1.34.1-20240501223323-969ec62f124d.1
github.com/aws/aws-lambda-go v1.47.0
github.com/stealthrocket/coroutine v0.7.0
google.golang.org/protobuf v1.34.1
)

require buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.1-20231115204500-e097f827e652.1 // indirect
24 changes: 24 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.1-20231115204500-e097f827e652.1 h1:gp028EFtxUwK5lEFG8aSrZJqxChoWkttWIb/lka3WWI=
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.1-20231115204500-e097f827e652.1/go.mod h1:XF+P8+RmfdufmIYpGUC+6bF7S+IlmHDEnCrO3OXaUAQ=
buf.build/gen/go/stealthrocket/dispatch-proto/protocolbuffers/go v1.34.1-20240501223323-969ec62f124d.1 h1:pdu6nMA+62s2gIblMxt/M9z0UjTAan4j1aGChlfhn1c=
buf.build/gen/go/stealthrocket/dispatch-proto/protocolbuffers/go v1.34.1-20240501223323-969ec62f124d.1/go.mod h1:WK50QrLIV+bx9kn+03oK8hIkenLhqi4eid8BrPv/iU4=
github.com/aws/aws-lambda-go v1.47.0 h1:0H8s0vumYx/YKs4sE7YM0ktwL2eWse+kfopsRI1sXVI=
github.com/aws/aws-lambda-go v1.47.0/go.mod h1:dpMpZgvWx5vuQJfBt0zqBha60q7Dd7RfgJv23DymV8A=
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/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
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/stealthrocket/coroutine v0.7.0 h1:7zdUw1JKy50gDcY8UYXYoyFBRmdfTBJhRLVxrEahMIg=
github.com/stealthrocket/coroutine v0.7.0/go.mod h1:Hjg/Wcmn8ybpji5FQnxuY5D+eU8lUV0eD0bV0GMvUwI=
github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s=
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

0 comments on commit b82ae28

Please sign in to comment.