44 pull_request :
55 branches : [main, dev]
66 push :
7- branches : [main, dev ]
7+ branches : [main]
88
99concurrency :
1010 group : ci-${{ github.ref }}
@@ -15,33 +15,70 @@ jobs:
1515 name : Test & Build
1616 runs-on : ubuntu-latest
1717 steps :
18- - uses : actions/checkout@v4
18+ - uses : actions/checkout@v6
1919 with :
2020 submodules : true
2121
22- - uses : actions/setup-go@v5
22+ - uses : actions/setup-go@v6
2323 with :
24- go-version : ' 1.24'
25- cache-dependency-path : src/mcp/go.sum
24+ go-version : ' 1.25'
25+ cache-dependency-path : go.sum
26+
27+ - name : Prepare desktop embed placeholder
28+ run : |
29+ mkdir -p desktop/frontend/dist
30+ printf 'ci placeholder\n' > desktop/frontend/dist/.ci-placeholder
2631
2732 - name : Check go mod tidy
28- working-directory : src/mcp
2933 run : |
3034 go mod tidy
3135 git diff --exit-code go.mod go.sum || (echo "go.mod/go.sum not tidy — run 'go mod tidy'" && exit 1)
3236
33- - name : Run tests
34- working-directory : src/mcp
35- run : go test -v -race -coverprofile=coverage.out ./...
37+ - name : Run race tests
38+ run : |
39+ packages=$(go list ./... | grep -v /desktop)
40+
41+ while IFS= read -r pkg; do
42+ echo "::group::go test -race $pkg"
43+ go test -v -race "$pkg"
44+ echo "::endgroup::"
45+ done <<EOF
46+ $packages
47+ EOF
48+
49+ - name : Collect coverage
50+ run : |
51+ packages=$(go list ./... | grep -v /desktop)
52+ profile=coverage.out
53+ tmp_profile=$(mktemp)
54+ found_test_package=false
55+
56+ echo 'mode: set' > "$profile"
57+
58+ while IFS= read -r pkg; do
59+ dir=$(go list -f '{{.Dir}}' "$pkg")
60+ if ! find "$dir" -maxdepth 1 -name '*_test.go' | grep -q .; then
61+ continue
62+ fi
63+
64+ go test -v -coverprofile="$tmp_profile" "$pkg"
65+ tail -n +2 "$tmp_profile" >> "$profile"
66+ found_test_package=true
67+ done <<EOF
68+ $packages
69+ EOF
70+
71+ if [ "$found_test_package" = false ]; then
72+ echo "no test packages found for coverage collection" >&2
73+ exit 1
74+ fi
3675
3776 - name : Build binary
38- working-directory : src/mcp
39- run : go build -o quint-code -trimpath .
77+ run : go build -o haft -trimpath ./cmd/haft/
4078
4179 - name : Smoke test — binary starts and responds to MCP initialize
42- working-directory : src/mcp
4380 run : |
44- RESPONSE=$(echo '{"jsonrpc":"2.0","method":"initialize","id":1,"params":{}}' | timeout 5 ./quint-code serve 2>/dev/null || true)
81+ RESPONSE=$(echo '{"jsonrpc":"2.0","method":"initialize","id":1,"params":{}}' | timeout 5 ./haft serve 2>/dev/null || true)
4582 if echo "$RESPONSE" | grep -q '"protocolVersion"'; then
4683 echo "Smoke test passed: MCP server responds correctly"
4784 else
@@ -51,27 +88,31 @@ jobs:
5188 fi
5289
5390 - name : Upload coverage
54- uses : codecov/codecov-action@v4
91+ uses : codecov/codecov-action@v5
5592 with :
56- file : src/mcp/ coverage.out
93+ file : coverage.out
5794 fail_ci_if_error : false
5895 continue-on-error : true
5996
6097 lint :
6198 name : Lint
6299 runs-on : ubuntu-latest
63100 steps :
64- - uses : actions/checkout@v4
101+ - uses : actions/checkout@v6
65102 with :
66103 submodules : true
67104
68- - uses : actions/setup-go@v5
105+ - uses : actions/setup-go@v6
69106 with :
70- go-version : ' 1.24'
71- cache-dependency-path : src/mcp/go.sum
107+ go-version : ' 1.25'
108+ cache-dependency-path : go.sum
109+
110+ - name : Prepare desktop embed placeholder
111+ run : |
112+ mkdir -p desktop/frontend/dist
113+ printf 'ci placeholder\n' > desktop/frontend/dist/.ci-placeholder
72114
73115 - uses : golangci/golangci-lint-action@v7
74116 with :
75- version : v2.1.6
76- working-directory : src/mcp
117+ version : v2.11.4
77118 args : --timeout=5m
0 commit comments