77 branches : ['**']
88
99jobs :
10- golangci-lint :
11- name : golangci-lint
12- runs-on : ubuntu-latest
13-
14- steps :
15- - name : Checkout code
16- uses : actions/checkout@v5
17-
18- - name : Set up Go
19- uses : actions/setup-go@v6
20- with :
21- go-version : ' 1.23'
22- cache : false # golangci-lint-action handles its own caching
23-
24- - name : Run golangci-lint
25- uses : golangci/golangci-lint-action@v9
26- with :
27- version : latest
28-
29- - name : Check for formatting issues
30- run : |
31- if [ -n "$(gofmt -l .)" ]; then
32- echo "Go code is not formatted:"
33- gofmt -d .
34- exit 1
35- fi
36-
37- go-vet :
38- name : go vet
39- runs-on : ubuntu-latest
40-
41- steps :
42- - name : Checkout code
43- uses : actions/checkout@v5
44-
45- - name : Set up Go
46- uses : actions/setup-go@v6
47- with :
48- go-version : ' 1.23'
49- cache : true
50-
51- - name : Run go vet
52- run : go vet ./...
53-
54- staticcheck :
55- name : staticcheck
56- runs-on : ubuntu-latest
57-
58- steps :
59- - name : Checkout code
60- uses : actions/checkout@v5
61-
62- - name : Set up Go
63- uses : actions/setup-go@v6
64- with :
65- go-version : ' 1.23'
66- cache : true
67-
68- - name : Install staticcheck
69- run : go install honnef.co/go/tools/cmd/staticcheck@latest
70-
71- - name : Run staticcheck
72- run : staticcheck ./...
73-
74- build :
75- name : Build (Alpine)
76- runs-on : ubuntu-latest
77- container :
78- image : golang:1.23-alpine
79-
80- steps :
81- - name : Install build dependencies
82- run : apk add --no-cache gcc musl-dev ncurses-dev ncurses-static git
83-
84- - name : Checkout code
85- uses : actions/checkout@v5
86-
87- - name : Build binary
88- run : |
89- cd cmd/yc
90- go build -buildvcs=false -ldflags="-s -w" -o yc
91- ./yc --version || true
92-
93- test :
94- name : Test (Ubuntu)
10+ # Temporarily commented out for integration test debugging
11+ # golangci-lint:
12+ # name: golangci-lint
13+ # runs-on: ubuntu-latest
14+
15+ # steps:
16+ # - name: Checkout code
17+ # uses: actions/checkout@v5
18+
19+ # - name: Set up Go
20+ # uses: actions/setup-go@v6
21+ # with:
22+ # go-version: '1.23'
23+ # cache: false # golangci-lint-action handles its own caching
24+
25+ # - name: Run golangci-lint
26+ # uses: golangci/golangci-lint-action@v9
27+ # with:
28+ # version: latest
29+
30+ # - name: Check for formatting issues
31+ # run: |
32+ # if [ -n "$(gofmt -l .)" ]; then
33+ # echo "Go code is not formatted:"
34+ # gofmt -d .
35+ # exit 1
36+ # fi
37+
38+ # go-vet:
39+ # name: go vet
40+ # runs-on: ubuntu-latest
41+
42+ # steps:
43+ # - name: Checkout code
44+ # uses: actions/checkout@v5
45+
46+ # - name: Set up Go
47+ # uses: actions/setup-go@v6
48+ # with:
49+ # go-version: '1.23'
50+ # cache: true
51+
52+ # - name: Run go vet
53+ # run: go vet ./...
54+
55+ # staticcheck:
56+ # name: staticcheck
57+ # runs-on: ubuntu-latest
58+
59+ # steps:
60+ # - name: Checkout code
61+ # uses: actions/checkout@v5
62+
63+ # - name: Set up Go
64+ # uses: actions/setup-go@v6
65+ # with:
66+ # go-version: '1.23'
67+ # cache: true
68+
69+ # - name: Install staticcheck
70+ # run: go install honnef.co/go/tools/cmd/staticcheck@latest
71+
72+ # - name: Run staticcheck
73+ # run: staticcheck ./...
74+
75+ # build:
76+ # name: Build (Alpine)
77+ # runs-on: ubuntu-latest
78+ # container:
79+ # image: golang:1.23-alpine
80+
81+ # steps:
82+ # - name: Install build dependencies
83+ # run: apk add --no-cache gcc musl-dev ncurses-dev ncurses-static git
84+
85+ # - name: Checkout code
86+ # uses: actions/checkout@v5
87+
88+ # - name: Build binary
89+ # run: |
90+ # cd cmd/yc
91+ # go build -buildvcs=false -ldflags="-s -w" -o yc
92+ # ./yc --version || true
93+
94+ # test:
95+ # name: Test (Ubuntu)
96+ # runs-on: ubuntu-latest
97+
98+ # steps:
99+ # - name: Checkout code
100+ # uses: actions/checkout@v5
101+
102+ # - name: Set up Go
103+ # uses: actions/setup-go@v6
104+ # with:
105+ # go-version: '1.23'
106+ # cache: true
107+
108+ # - name: Install Java (for JVM tests)
109+ # uses: actions/setup-java@v5
110+ # with:
111+ # distribution: 'temurin'
112+ # java-version: '11'
113+
114+ # - name: Download dependencies
115+ # run: go mod download
116+
117+ # - name: Verify dependencies
118+ # run: go mod verify
119+
120+ # - name: Run tests with coverage (excluding CGO-dependent packages)
121+ # run: |
122+ # go test -v -race -coverprofile=coverage.out -covermode=atomic $(go list ./... | grep -v 'internal/cli' | grep -v 'internal/capture/procps/linux')
123+
124+ # - name: Display coverage summary
125+ # run: |
126+ # go tool cover -func=coverage.out | tail -20
127+ # echo ""
128+ # echo "=== Total Coverage ==="
129+ # go tool cover -func=coverage.out | grep total
130+
131+ integration-test :
132+ name : Integration Tests
95133 runs-on : ubuntu-latest
96134
97135 steps :
@@ -104,27 +142,28 @@ jobs:
104142 go-version : ' 1.23'
105143 cache : true
106144
107- - name : Install Java (for JVM tests )
145+ - name : Set up Java (for test fixtures )
108146 uses : actions/setup-java@v5
109147 with :
110148 distribution : ' temurin'
111149 java-version : ' 11'
112150
113- - name : Download dependencies
114- run : go mod download
151+ - name : Set up Docker Buildx
152+ uses : docker/setup-buildx-action@v3
115153
116- - name : Verify dependencies
117- run : go mod verify
154+ - name : Setup test fixtures
155+ run : ./test/scripts/setup-fixtures.sh
118156
119- - name : Run tests with coverage (excluding CGO-dependent packages)
120- run : |
121- go test -v -race -coverprofile=coverage.out -covermode=atomic $(go list ./... | grep -v 'internal/cli' | grep -v 'internal/capture/procps/linux')
157+ - name : Run integration tests
158+ run : make test-integration
122159
123- - name : Display coverage summary
124- run : |
125- go tool cover -func=coverage.out | tail -20
126- echo ""
127- echo "=== Total Coverage ==="
128- go tool cover -func=coverage.out | grep total
160+ - name : Upload test artifacts on failure
161+ if : failure()
162+ uses : actions/upload-artifact@v4
163+ with :
164+ name : integration-test-artifacts
165+ path : |
166+ test/integration/*.log
167+ yc-*.zip
129168
130169
0 commit comments