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
14 changes: 4 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,24 @@ jobs:
go: [stable]
os: ["ubuntu-latest"]
steps:
- name: Check out code
uses: actions/checkout@v7

- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v7 # action page: <https://github.com/actions/setup-go>
with:
go-version: ${{ matrix.go }}
cache-dependency-path: go.sum

- name: Set up PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2 # action page: <https://github.com/shivammathur/setup-php>
with:
php-version: ${{ matrix.php }}
extensions: sockets

- name: Check out code
uses: actions/checkout@v7

- name: Install Composer dependencies
run: cd tests && composer update --prefer-dist --no-progress --ansi

- name: Init Go modules Cache # Docs: <https://git.io/JfAKn#go---modules>
uses: actions/cache@v6
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-

- name: Install Go dependencies
run: go mod download

Expand Down
18 changes: 2 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,8 @@ SHELL = /bin/sh
test_coverage:
rm -rf coverage-ci
mkdir ./coverage-ci
go test -v -race -cover -tags=debug -timeout 30m -coverpkg=./... -coverprofile=./coverage-ci/pipe.out -covermode=atomic ./ipc/pipe
go test -v -race -cover -tags=debug -timeout 30m -coverpkg=./... -coverprofile=./coverage-ci/socket.out -covermode=atomic ./ipc/socket
go test -v -race -cover -tags=debug -timeout 30m -coverpkg=./... -coverprofile=./coverage-ci/pool_static.out -covermode=atomic ./pool/static_pool
go test -v -race -cover -tags=debug -timeout 30m -coverpkg=./... -coverprofile=./coverage-ci/worker.out -covermode=atomic ./worker
go test -v -race -cover -tags=debug -timeout 30m -coverpkg=./... -coverprofile=./coverage-ci/worker_stack.out -covermode=atomic ./worker_watcher
go test -v -race -cover -tags=debug -timeout 30m -coverpkg=./... -coverprofile=./coverage-ci/channel.out -covermode=atomic ./worker_watcher/container/channel
go test -v -race -cover -tags=debug -timeout 30m -coverpkg=./... -coverprofile=./coverage-ci/ratelimiter.out -covermode=atomic ./pool/ratelimiter
echo 'mode: atomic' > ./coverage-ci/summary.txt
tail -q -n +2 ./coverage-ci/*.out >> ./coverage-ci/summary.txt
go test -p=1 -v -race -cover -tags=debug -timeout 30m -coverpkg=./... -coverprofile=./coverage-ci/summary.txt -covermode=atomic ./...

test: ## Run application tests
go test -v -race ./ipc/pipe
go test -v -race ./ipc/socket
go test -v -race ./pool/static_pool
go test -v -race ./worker
go test -v -race ./worker_watcher
go test -v -race ./worker_watcher/container/channel
go test -v -race ./pool/ratelimiter
go test -p=1 -v -race ./...
go test -v -race -fuzz=FuzzStaticPoolEcho -fuzztime=30s -tags=debug ./pool/static_pool
10 changes: 3 additions & 7 deletions ipc/pipe/pipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,11 @@ import (

// Factory connects to stack using standard
// streams (STDIN, STDOUT pipes).
type Factory struct {
log *slog.Logger
}
type Factory struct{}

// NewPipeFactory returns a new factory instance.
func NewPipeFactory(log *slog.Logger) *Factory {
return &Factory{
log: log,
}
func NewPipeFactory(_ *slog.Logger) *Factory {
return &Factory{}
}

type sr struct {
Expand Down
Loading
Loading