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
3 changes: 0 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,5 @@ jobs:
with:
go-version: "1.25"

- name: build
run: go build -v -o procman .

- name: test
run: go test -v ./...
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
procman
Procfile.dev
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ for a PTY interface.
## Developing

```bash
go build ./... # build
go test ./... # run tests
go vet ./... # static checks
goimports -local "$(go list -m)" -w . # format imports
Expand Down
13 changes: 12 additions & 1 deletion procman_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@ import (
"time"
)

func TestMain(m *testing.M) {
cmd := exec.Command("go", "build", "-o", "procman", ".")
if err := cmd.Run(); err != nil {
fmt.Fprintf(os.Stderr, "failed to build: %v\n", err)
os.Exit(1)
}
code := m.Run()
os.Remove("procman")
os.Remove("Procfile.dev")
os.Exit(code)
}

func TestSetupProcesses(t *testing.T) {
tests := []struct {
name string
Expand Down Expand Up @@ -134,7 +146,6 @@ func TestWriteErr(t *testing.T) {
}

// TestProcmanIntegration tests the full procman workflow.
// Requires `go build -o procman .` to be run first.
func TestProcmanIntegration(t *testing.T) {
content := "echo: echo 'hello'\nsleep: sleep 10"
if err := os.WriteFile("Procfile.dev", []byte(content), 0644); err != nil {
Expand Down