Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 95 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ permissions:
contents: read

jobs:
build:
dependencies:
name: Verify dependencies
runs-on: ubuntu-latest

steps:
Expand All @@ -20,14 +21,102 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v7
with:
go-version: "1.27.x"
go-version: '1.27.x'
check-latest: true
cache-dependency-path: |
go.sum
tools/go.sum

- name: Go version
run: go version
- name: Download modules
run: go mod download

- name: Verify
run: make verify
- name: Verify modules
run: go mod verify

lint:
name: Lint
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v7

- name: Setup Go
uses: actions/setup-go@v7
with:
go-version: '1.27.x'
check-latest: true
cache-dependency-path: |
go.sum
tools/go.sum

- name: Lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.15.0
args: --timeout=10m

vulncheck:
name: Check vulnerabilities
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v7

- name: Setup Go
uses: actions/setup-go@v7
with:
go-version: '1.27.x'
check-latest: true
cache-dependency-path: |
go.sum
tools/go.sum

- name: Check vulnerabilities
run: make vulncheck

test:
name: Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- name: Checkout
uses: actions/checkout@v7

- name: Setup Go
uses: actions/setup-go@v7
with:
go-version: '1.27.x'
check-latest: true
cache-dependency-path: |
go.sum
tools/go.sum

- name: Test
run: go test ./... -count=1 -timeout=600s

race:
name: Race detector
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v7

- name: Setup Go
uses: actions/setup-go@v7
with:
go-version: '1.27.x'
check-latest: true
cache-dependency-path: |
go.sum
tools/go.sum

- name: Race tests
run: go test -race ./... -count=1 -timeout=600s
10 changes: 4 additions & 6 deletions api/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,7 @@ func getSettings(opts ...Option) (*settings, error) {
if s.logger == nil {
s.logger, err = log.NewSilentLogger()
if err != nil {
return nil, errorc.With(
coreerrors.ErrCannotInitializeLogger, errorc.Error(keys.Cause, err),
)
return nil, errorc.WithCause(coreerrors.ErrCannotInitializeLogger, err)
}
}

Expand Down Expand Up @@ -285,11 +283,11 @@ func (s *Service) Run(ctx context.Context) (runErr error) {
}

if completed {
if err := s.environment.Release(
if errRelease := s.environment.Release(
ctx,
result.GetEnvironmentInstanceID(),
); err != nil {
return err
); errRelease != nil {
return errRelease
}
}
}
Expand Down
11 changes: 6 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/e2engine/runner-local
go 1.27

require (
github.com/e2engine/core v0.3.2
github.com/ygrebnov/errorc v0.6.1
github.com/e2engine/core v0.3.3
github.com/ygrebnov/errorc v0.7.0
github.com/ygrebnov/workers v0.7.1
)

Expand All @@ -13,15 +13,16 @@ require (
github.com/e2engine/instrumentation-go v0.2.3 // indirect
github.com/e2engine/instrumentation-go/grpc v0.2.1 // indirect
github.com/e2engine/instrumentation-go/http v0.2.2 // indirect
github.com/ygrebnov/fs v0.1.0 // indirect
github.com/ygrebnov/keys v0.2.0 // indirect
github.com/ygrebnov/log v0.5.1 // indirect
github.com/ygrebnov/log v0.6.0 // indirect
github.com/ygrebnov/metrics v0.1.1 // indirect
github.com/ygrebnov/model v0.8.1 // indirect
github.com/ygrebnov/model v0.9.0 // indirect
golang.org/x/net v0.63.0 // indirect
golang.org/x/sync v0.25.0 // indirect
golang.org/x/sys v0.50.0 // indirect
golang.org/x/text v0.44.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20261118221215-c8830f628b3f // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20261123191846-1e707ab9fbc2 // indirect
google.golang.org/grpc v1.85.0 // indirect
google.golang.org/protobuf v1.36.12 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
22 changes: 12 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ github.com/bufbuild/protocompile v0.14.1 h1:iA73zAf/fyljNjQKwYzUHD6AD4R8KMasmwa/
github.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c=
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/e2engine/core v0.3.2 h1:6CUOMzVfwLlSS+O1uzBYXjVyb45THfSXy8nqyO3edfY=
github.com/e2engine/core v0.3.2/go.mod h1:pQTg3FaajaO4OKt3exuEpSasr1BoS5JcBNgW+2FK+o8=
github.com/e2engine/core v0.3.3 h1:uoh7xn6786eurWwtJajq7meoClhOyV/49k/OEZy79do=
github.com/e2engine/core v0.3.3/go.mod h1:WzxdDsUl8qH/xk7WcPymatQqdZCwR6LaXgxIEIC6tV4=
github.com/e2engine/instrumentation-go v0.2.3 h1:Al7SoAIiMHiJ4zxj71JYiFCE9MKgpXFGHxlZCHmbe+0=
github.com/e2engine/instrumentation-go v0.2.3/go.mod h1:DyUxzrRZBCzOk+toAmxex+Xn09fYhutsCRUfNUgS8kQ=
github.com/e2engine/instrumentation-go/grpc v0.2.1 h1:GB+ZDt/36/gtI1MjVD9agT/RdL9tDBVocAaZUD/rBGU=
Expand All @@ -18,16 +18,18 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/ygrebnov/errorc v0.6.1 h1:ICww1JOesR0HyE3cVWMr0SBmB8RV1XSmGwB5yVP1SqE=
github.com/ygrebnov/errorc v0.6.1/go.mod h1:akitMzADmnm0i1X5fSJfBqiTqCzckka9sgukTRQN5ns=
github.com/ygrebnov/errorc v0.7.0 h1:UBk753h/SNWfX9W6Byp+zckIdybXJ/ixc+VWukpQfdQ=
github.com/ygrebnov/errorc v0.7.0/go.mod h1:akitMzADmnm0i1X5fSJfBqiTqCzckka9sgukTRQN5ns=
github.com/ygrebnov/fs v0.1.0 h1:cswbccHB+YuluFYwes02NigqSjP3ZgM5stOvW+MxjMo=
github.com/ygrebnov/fs v0.1.0/go.mod h1:c3BP57rdNpeWJBW9a45dvsfbV6Yydxer3cEbSzSW2I8=
github.com/ygrebnov/keys v0.2.0 h1:KQSQG1la9WkTW59WbB3CK1yhxZ92el2ZJfV1XtlHTp0=
github.com/ygrebnov/keys v0.2.0/go.mod h1:4IfRPgv7tFSlToKzHtA9MPMwXP0+HRJ0Kk8XSrvhDvQ=
github.com/ygrebnov/log v0.5.1 h1:+Kkr6sjOHcYRvzLEDvEsRdDcQPRy0YUtmgBCNdio7Fk=
github.com/ygrebnov/log v0.5.1/go.mod h1:Y21zKtQ3rEy1FDhSli2NvgaqVyig3hhUfxegjLPuknw=
github.com/ygrebnov/log v0.6.0 h1:BwIDPh3uE/kCTRV0rsSp7i8NDv0ayfYOJRrypXhLdOI=
github.com/ygrebnov/log v0.6.0/go.mod h1:ks5SJPRtemWcKFpXwi9pMxJ92cMWjqnmNQa2QXiXd+4=
github.com/ygrebnov/metrics v0.1.1 h1:ErJQZiqvoJSx919m93WtgQk/6e6zD5YF88frqgf58nY=
github.com/ygrebnov/metrics v0.1.1/go.mod h1:XWy8LtXx+Lx56KqTFG8lzSCrgLDfDrItCuGDztfHKE8=
github.com/ygrebnov/model v0.8.1 h1:KvnS97b/q3Z1GKSHSDYlfHoL3bNDR+ZT9Kf4yc1WnIE=
github.com/ygrebnov/model v0.8.1/go.mod h1:WEMMqdGYF45Kfce0pAe0poiF9hu+PONRSHd2L9li3tw=
github.com/ygrebnov/model v0.9.0 h1:G6QaYVcm9Nqyed/lPzkWfQ543ol9D0C8Yjz9gVUDy9Q=
github.com/ygrebnov/model v0.9.0/go.mod h1:KA8zospuMg3/LbNc+Lgh+8nEz1uR9nv8SN4Vxxt2ruM=
github.com/ygrebnov/workers v0.7.1 h1:bin+tMCzb+eGhvGAoAcG5L6H4y3cf/GBrKAljLUqHFY=
github.com/ygrebnov/workers v0.7.1/go.mod h1:auJWjK5mn8udS9VUL5wREviqsnXW1G+ndOXfpR+wopo=
go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y=
Expand All @@ -42,8 +44,8 @@ golang.org/x/text v0.44.0 h1:YItdp/mQNGnsmrgpcdA5yQ3bnRxCfo/Tj/iByGW9GGo=
golang.org/x/text v0.44.0/go.mod h1:S4FR1waQ9LbjQTls97SyRjDaUUVkaM+cXwwuG/G+MwY=
gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4=
gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E=
google.golang.org/genproto/googleapis/rpc v0.0.0-20261118221215-c8830f628b3f h1:aDW6Vb2T1K0xbAgW+ED8iz39WlgjjX/OKiNh6tXv/+g=
google.golang.org/genproto/googleapis/rpc v0.0.0-20261118221215-c8830f628b3f/go.mod h1:OaIUM3+LpYcK2GXM4FTmhWoIq371Owdr+Cc7/BsYHHc=
google.golang.org/genproto/googleapis/rpc v0.0.0-20261123191846-1e707ab9fbc2 h1:FCWn4wv5of/ooWpbWDIeOXqI3+h2MGnV7SvvcJ8f+bQ=
google.golang.org/genproto/googleapis/rpc v0.0.0-20261123191846-1e707ab9fbc2/go.mod h1:OaIUM3+LpYcK2GXM4FTmhWoIq371Owdr+Cc7/BsYHHc=
google.golang.org/grpc v1.85.0 h1:BPBCfuVRQ1qvBhKDOq9uvQllMvO59rKsYhXpp7Dd8vw=
google.golang.org/grpc v1.85.0/go.mod h1:0rQrOD58yjal/0EaVbGBANindixsCZNQPDV3VKtaKuQ=
google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc=
Expand Down
8 changes: 5 additions & 3 deletions tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ module tools

go 1.27

require (
github.com/golangci/golangci-lint/v2 v2.15.0
golang.org/x/vuln v1.10.0
tool (
github.com/golangci/golangci-lint/v2/cmd/golangci-lint
golang.org/x/vuln/cmd/govulncheck
)

require (
Expand Down Expand Up @@ -91,6 +91,7 @@ require (
github.com/golangci/dupl v0.0.0-20260401084720-c99c5cf5c202 // indirect
github.com/golangci/go-printf-func-name v0.1.1 // indirect
github.com/golangci/gofmt v0.0.0-20260820135601-e84e05053792 // indirect
github.com/golangci/golangci-lint/v2 v2.15.0 // indirect
github.com/golangci/golines v0.16.0 // indirect
github.com/golangci/misspell v0.8.0 // indirect
github.com/golangci/plugin-module-register v0.1.2 // indirect
Expand Down Expand Up @@ -212,6 +213,7 @@ require (
golang.org/x/telemetry v0.0.0-20261116191925-e77a43154acb // indirect
golang.org/x/text v0.41.0 // indirect
golang.org/x/tools v0.53.0 // indirect
golang.org/x/vuln v1.10.0 // indirect
google.golang.org/protobuf v1.36.12 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down
11 changes: 0 additions & 11 deletions tools/tools.go

This file was deleted.

Loading