diff --git a/.github/aw/actions-lock.json b/.github/aw/actions-lock.json index 80130e4a1a..11344e2bc6 100644 --- a/.github/aw/actions-lock.json +++ b/.github/aw/actions-lock.json @@ -65,7 +65,7 @@ "version": "v8.0.0", "sha": "ed597411d8f924073f98dfc5c65a23a2325f34cd" }, - "actions/setup-dotnet@v4.3.1": { + "actions/setup-dotnet@v4": { "repo": "actions/setup-dotnet", "version": "v4.3.1", "sha": "67a3573c9a986a3f9c594539f4ab511d57bb3ce9" @@ -80,7 +80,7 @@ "version": "v6.1.0", "sha": "4dc6199c7b1a012772edbd06daecab0f50c9053c" }, - "actions/setup-java@v4.8.0": { + "actions/setup-java@v4": { "repo": "actions/setup-java", "version": "v4.8.0", "sha": "c1e323688fd81a25caa38c78aa6df2d33d3e20d9" @@ -118,7 +118,7 @@ "anchore/sbom-action@v0": { "repo": "anchore/sbom-action", "version": "v0", - "sha": "62ad5284b8ced813296287a0b63906cb364b73ee" + "sha": "deef08a0db64bfad603422135db61477b16cef56" }, "anchore/sbom-action@v0.20.10": { "repo": "anchore/sbom-action", @@ -153,7 +153,7 @@ "docker/login-action@v3": { "repo": "docker/login-action", "version": "v3", - "sha": "5e57cd118135c172c3672efd75eb46360885c0ef" + "sha": "c94ce9fb468520275223c153574b00df6fe4bcc9" }, "docker/metadata-action@v5": { "repo": "docker/metadata-action", diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd0ff4963a..de64b6c50b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: - name: Run unit tests with coverage run: | set -o pipefail - go test -v -parallel=8 -timeout=3m -run='^Test' -coverprofile=coverage.out -json ./... | tee test-result-unit.json + go test -v -parallel=8 -timeout=3m -run='^Test' -tags '!integration' -coverprofile=coverage.out -json ./... | tee test-result-unit.json go tool cover -html=coverage.out -o coverage.html # Coverage reports for recent builds only - 7 days is sufficient for debugging recent changes @@ -198,19 +198,19 @@ jobs: - name: Run integration tests - ${{ matrix.test-group.name }} run: | - #set -o pipefail + set -o pipefail # Sanitize the test group name for use in filename SAFE_NAME=$(echo "${{ matrix.test-group.name }}" | sed 's/[^a-zA-Z0-9]/-/g' | sed 's/--*/-/g') if [ -z "${{ matrix.test-group.pattern }}" ]; then # Catch-all group: run with -skip to exclude tests matched by other groups if [ -n "${{ matrix.test-group.skip_pattern || '' }}" ]; then - go test -v -parallel=8 -timeout=5m -tags 'integration' -skip '${{ matrix.test-group.skip_pattern }}' -json ${{ matrix.test-group.packages }} | tee "test-result-integration-${SAFE_NAME}.json" + go test -v -parallel=8 -timeout=10m -tags 'integration' -skip '${{ matrix.test-group.skip_pattern }}' -json ${{ matrix.test-group.packages }} | tee "test-result-integration-${SAFE_NAME}.json" else - go test -v -parallel=8 -timeout=5m -tags 'integration' -json ${{ matrix.test-group.packages }} | tee "test-result-integration-${SAFE_NAME}.json" + go test -v -parallel=8 -timeout=10m -tags 'integration' -json ${{ matrix.test-group.packages }} | tee "test-result-integration-${SAFE_NAME}.json" fi else - go test -v -parallel=8 -timeout=5m -tags 'integration' -run '${{ matrix.test-group.pattern }}' -json ${{ matrix.test-group.packages }} | tee "test-result-integration-${SAFE_NAME}.json" + go test -v -parallel=8 -timeout=10m -tags 'integration' -run '${{ matrix.test-group.pattern }}' -json ${{ matrix.test-group.packages }} | tee "test-result-integration-${SAFE_NAME}.json" fi - name: Upload integration test results diff --git a/AGENTS.md b/AGENTS.md index ba91340981..fb535e4124 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -73,6 +73,26 @@ make build # Rebuild gh-aw after modifying JSON schemas in pkg/parser/sche ``` Schema files are embedded in the binary using `//go:embed` directives, so changes require rebuilding the binary. +**ALWAYS ADD BUILD TAGS TO TEST FILES:** + +Every test file (`*_test.go`) **must** have a build tag at the very top of the file: + +```go +//go:build !integration // For unit tests (default) + +//go:build integration // For integration tests (files with "integration" in name) +``` + +**Rules:** +- Files with "integration" in the filename get `//go:build integration` +- All other test files get `//go:build !integration` +- The build tag must be the **first line** of the file, followed by an empty line + +**To add build tags to all test files:** +```bash +./scripts/add-build-tags.sh +``` + **ALWAYS RUN LINTERS AFTER ADDING TEST FILES:** When adding new test files (`*_test.go`), the **unused** linter may catch helper functions that are defined but never called. Always run linters after creating test files to catch these issues early. diff --git a/Makefile b/Makefile index 72d6b27b59..6908df7e95 100644 --- a/Makefile +++ b/Makefile @@ -42,14 +42,17 @@ build-windows: # Test the code (runs both unlabelled unit tests and integration tests and long tests) .PHONY: test -test: - go test -v -parallel=4 -timeout=10m -tags 'integration' -run='^Test' ./... +test: test-unit test-integration # Test unit tests only (excludes labelled integration tests and long tests) .PHONY: test-unit test-unit: go test -v -parallel=4 -timeout=10m -run='^Test' ./... -short +.PHONY: test-integration +test-integration: + go test -v -parallel=4 -timeout=10m -run='^Test' ./... -short + # Update golden test files .PHONY: update-golden update-golden: diff --git a/cmd/gh-aw/capitalization_test.go b/cmd/gh-aw/capitalization_test.go index 86268a1397..bcc1fffd7e 100644 --- a/cmd/gh-aw/capitalization_test.go +++ b/cmd/gh-aw/capitalization_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package main import ( diff --git a/cmd/gh-aw/main_entry_test.go b/cmd/gh-aw/main_entry_test.go index 7d03fc933b..010cb58d1c 100644 --- a/cmd/gh-aw/main_entry_test.go +++ b/cmd/gh-aw/main_entry_test.go @@ -164,6 +164,14 @@ func TestMainFunction(t *testing.T) { // This is necessary because rootCmd captured the original os.Stderr in init() rootCmd.SetOut(os.Stderr) + // Read from pipe in goroutine to prevent deadlock when buffer fills + var buf bytes.Buffer + done := make(chan struct{}) + go func() { + _, _ = buf.ReadFrom(r) + close(done) + }() + // Execute help rootCmd.SetArgs([]string{"--help"}) err := rootCmd.Execute() @@ -173,9 +181,8 @@ func TestMainFunction(t *testing.T) { os.Stderr = oldStderr rootCmd.SetOut(os.Stderr) // Restore the command's output to the original stderr - // Read captured output - var buf bytes.Buffer - _, _ = buf.ReadFrom(r) + // Wait for reader goroutine to finish + <-done output := buf.String() if err != nil { @@ -199,6 +206,14 @@ func TestMainFunction(t *testing.T) { // Update the command's output to use the new os.Stderr pipe rootCmd.SetOut(os.Stderr) + // Read from pipe in goroutine to prevent deadlock when buffer fills + var buf bytes.Buffer + done := make(chan struct{}) + go func() { + _, _ = buf.ReadFrom(r) + close(done) + }() + // Execute help all rootCmd.SetArgs([]string{"help", "all"}) err := rootCmd.Execute() @@ -208,9 +223,8 @@ func TestMainFunction(t *testing.T) { os.Stderr = oldStderr rootCmd.SetOut(os.Stderr) - // Read captured output - var buf bytes.Buffer - _, _ = buf.ReadFrom(r) + // Wait for reader goroutine to finish + <-done output := buf.String() if err != nil { diff --git a/cmd/gh-aw/short_description_test.go b/cmd/gh-aw/short_description_test.go index 34c255e3d3..76eea8568f 100644 --- a/cmd/gh-aw/short_description_test.go +++ b/cmd/gh-aw/short_description_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package main import ( diff --git a/pkg/campaign/bootstrap_test.go b/pkg/campaign/bootstrap_test.go index e7daa9ca32..4eecbc6eee 100644 --- a/pkg/campaign/bootstrap_test.go +++ b/pkg/campaign/bootstrap_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package campaign import ( diff --git a/pkg/campaign/campaign_test.go b/pkg/campaign/campaign_test.go index 4c3570f6a1..9a392fe4e0 100644 --- a/pkg/campaign/campaign_test.go +++ b/pkg/campaign/campaign_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package campaign import ( diff --git a/pkg/campaign/create_test.go b/pkg/campaign/create_test.go index 0ef9ab417c..d4610f8585 100644 --- a/pkg/campaign/create_test.go +++ b/pkg/campaign/create_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package campaign import ( diff --git a/pkg/campaign/filter_test.go b/pkg/campaign/filter_test.go index 072c9a806a..c06be81044 100644 --- a/pkg/campaign/filter_test.go +++ b/pkg/campaign/filter_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package campaign import ( diff --git a/pkg/campaign/injection_test.go b/pkg/campaign/injection_test.go index eaa6325eba..1fd4d2256a 100644 --- a/pkg/campaign/injection_test.go +++ b/pkg/campaign/injection_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package campaign import ( diff --git a/pkg/campaign/interactive_test.go b/pkg/campaign/interactive_test.go index bf8361de93..738c65ef5f 100644 --- a/pkg/campaign/interactive_test.go +++ b/pkg/campaign/interactive_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package campaign import ( diff --git a/pkg/campaign/loader_test.go b/pkg/campaign/loader_test.go index 5798b54af0..8974ae673f 100644 --- a/pkg/campaign/loader_test.go +++ b/pkg/campaign/loader_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package campaign import ( diff --git a/pkg/campaign/metrics_snapshot_test.go b/pkg/campaign/metrics_snapshot_test.go index f830f8c1c0..c0ffcbec94 100644 --- a/pkg/campaign/metrics_snapshot_test.go +++ b/pkg/campaign/metrics_snapshot_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package campaign import ( diff --git a/pkg/campaign/orchestrator_test.go b/pkg/campaign/orchestrator_test.go index bfd8b7c4ce..1ba75cc99c 100644 --- a/pkg/campaign/orchestrator_test.go +++ b/pkg/campaign/orchestrator_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package campaign import ( diff --git a/pkg/campaign/project_owner_normalization_test.go b/pkg/campaign/project_owner_normalization_test.go index 47637cd5c7..dae0f2f686 100644 --- a/pkg/campaign/project_owner_normalization_test.go +++ b/pkg/campaign/project_owner_normalization_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package campaign import "testing" diff --git a/pkg/campaign/project_repo_parsing_test.go b/pkg/campaign/project_repo_parsing_test.go index d49d903852..7fffbd9225 100644 --- a/pkg/campaign/project_repo_parsing_test.go +++ b/pkg/campaign/project_repo_parsing_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package campaign import "testing" diff --git a/pkg/campaign/project_status_options_test.go b/pkg/campaign/project_status_options_test.go index 08d3142d79..90870e5bc8 100644 --- a/pkg/campaign/project_status_options_test.go +++ b/pkg/campaign/project_status_options_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package campaign import "testing" diff --git a/pkg/campaign/project_test.go b/pkg/campaign/project_test.go index 055e91ed12..ce2e2634cd 100644 --- a/pkg/campaign/project_test.go +++ b/pkg/campaign/project_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package campaign import ( diff --git a/pkg/campaign/project_views_test.go b/pkg/campaign/project_views_test.go index 0ac3b2b534..8b601483a3 100644 --- a/pkg/campaign/project_views_test.go +++ b/pkg/campaign/project_views_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package campaign import "testing" diff --git a/pkg/campaign/template_test.go b/pkg/campaign/template_test.go index 898e491793..9ece54978d 100644 --- a/pkg/campaign/template_test.go +++ b/pkg/campaign/template_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package campaign import ( diff --git a/pkg/campaign/test_helpers_test.go b/pkg/campaign/test_helpers_test.go index de1dcd267b..a8b0b800cf 100644 --- a/pkg/campaign/test_helpers_test.go +++ b/pkg/campaign/test_helpers_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package campaign import ( diff --git a/pkg/campaign/validation_test.go b/pkg/campaign/validation_test.go index 2a5538a6f8..04021fd79f 100644 --- a/pkg/campaign/validation_test.go +++ b/pkg/campaign/validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package campaign import ( diff --git a/pkg/campaign/workflow_discovery_test.go b/pkg/campaign/workflow_discovery_test.go index b751afe541..0d36c221cf 100644 --- a/pkg/campaign/workflow_discovery_test.go +++ b/pkg/campaign/workflow_discovery_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package campaign import ( diff --git a/pkg/cli/access_log_test.go b/pkg/cli/access_log_test.go index ddc52acc56..760b0016ff 100644 --- a/pkg/cli/access_log_test.go +++ b/pkg/cli/access_log_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/actionlint_test.go b/pkg/cli/actionlint_test.go index b2834e60a4..ed777b2e00 100644 --- a/pkg/cli/actionlint_test.go +++ b/pkg/cli/actionlint_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/actions_build_command_test.go b/pkg/cli/actions_build_command_test.go index 32a4a1d8f8..04469612d1 100644 --- a/pkg/cli/actions_build_command_test.go +++ b/pkg/cli/actions_build_command_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/actions_test.go b/pkg/cli/actions_test.go index 0e4fc3ee7b..1274d30414 100644 --- a/pkg/cli/actions_test.go +++ b/pkg/cli/actions_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/add_command_table_test.go b/pkg/cli/add_command_table_test.go index c73935f34f..69df2aa3cd 100644 --- a/pkg/cli/add_command_table_test.go +++ b/pkg/cli/add_command_table_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/add_command_test.go b/pkg/cli/add_command_test.go index 07c7d6313b..ed405afc21 100644 --- a/pkg/cli/add_command_test.go +++ b/pkg/cli/add_command_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/add_description_test.go b/pkg/cli/add_description_test.go index 94aa1eec68..b2218b222d 100644 --- a/pkg/cli/add_description_test.go +++ b/pkg/cli/add_description_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/add_gitattributes_test.go b/pkg/cli/add_gitattributes_test.go index ab89ac8014..b06e8ce589 100644 --- a/pkg/cli/add_gitattributes_test.go +++ b/pkg/cli/add_gitattributes_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/add_no_args_test.go b/pkg/cli/add_no_args_test.go index 2c045b1f11..b8949872fd 100644 --- a/pkg/cli/add_no_args_test.go +++ b/pkg/cli/add_no_args_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/add_repo_only_test.go b/pkg/cli/add_repo_only_test.go index 4971810cb1..2c9419a2f1 100644 --- a/pkg/cli/add_repo_only_test.go +++ b/pkg/cli/add_repo_only_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/add_source_test.go b/pkg/cli/add_source_test.go index 739fb5614d..d090e2fd3d 100644 --- a/pkg/cli/add_source_test.go +++ b/pkg/cli/add_source_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/add_wildcard_test.go b/pkg/cli/add_wildcard_test.go index b4e9f0d1c2..cda8babe38 100644 --- a/pkg/cli/add_wildcard_test.go +++ b/pkg/cli/add_wildcard_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/add_workflow_not_found_test.go b/pkg/cli/add_workflow_not_found_test.go index a340684b96..f64ed27fd8 100644 --- a/pkg/cli/add_workflow_not_found_test.go +++ b/pkg/cli/add_workflow_not_found_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/agentic_workflow_agent_test.go b/pkg/cli/agentic_workflow_agent_test.go index f770452868..c9095b4fc0 100644 --- a/pkg/cli/agentic_workflow_agent_test.go +++ b/pkg/cli/agentic_workflow_agent_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/audit_agent_example_test.go b/pkg/cli/audit_agent_example_test.go index db8615bcfd..0e9426edcd 100644 --- a/pkg/cli/audit_agent_example_test.go +++ b/pkg/cli/audit_agent_example_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/audit_agent_output_test.go b/pkg/cli/audit_agent_output_test.go index 586b197d0f..a687d6572c 100644 --- a/pkg/cli/audit_agent_output_test.go +++ b/pkg/cli/audit_agent_output_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/audit_input_size_test.go b/pkg/cli/audit_input_size_test.go index a0412c5b80..db5cd7eb46 100644 --- a/pkg/cli/audit_input_size_test.go +++ b/pkg/cli/audit_input_size_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/audit_report_helpers_test.go b/pkg/cli/audit_report_helpers_test.go index cc4e8c3c9a..cf995fefcd 100644 --- a/pkg/cli/audit_report_helpers_test.go +++ b/pkg/cli/audit_report_helpers_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/audit_report_test.go b/pkg/cli/audit_report_test.go index 88fcacb131..48f8f2d40c 100644 --- a/pkg/cli/audit_report_test.go +++ b/pkg/cli/audit_report_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/audit_test.go b/pkg/cli/audit_test.go index ea05ff38a3..465f4bb071 100644 --- a/pkg/cli/audit_test.go +++ b/pkg/cli/audit_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/awinfo_steps_test.go b/pkg/cli/awinfo_steps_test.go index f2c448310f..4c9cc3071d 100644 --- a/pkg/cli/awinfo_steps_test.go +++ b/pkg/cli/awinfo_steps_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/ci_test.go b/pkg/cli/ci_test.go index de5a9dc25d..81560e059f 100644 --- a/pkg/cli/ci_test.go +++ b/pkg/cli/ci_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/codemod_agent_session_test.go b/pkg/cli/codemod_agent_session_test.go index fee792c037..7307ca3d28 100644 --- a/pkg/cli/codemod_agent_session_test.go +++ b/pkg/cli/codemod_agent_session_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/codemod_discussion_flag_test.go b/pkg/cli/codemod_discussion_flag_test.go index cc481e8e09..5d52b289a4 100644 --- a/pkg/cli/codemod_discussion_flag_test.go +++ b/pkg/cli/codemod_discussion_flag_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/codemod_grep_tool_test.go b/pkg/cli/codemod_grep_tool_test.go index 8bd2cdaaa7..3f0a1adc1d 100644 --- a/pkg/cli/codemod_grep_tool_test.go +++ b/pkg/cli/codemod_grep_tool_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/codemod_mcp_mode_to_type_test.go b/pkg/cli/codemod_mcp_mode_to_type_test.go index 51afdfefcf..9d2f130193 100644 --- a/pkg/cli/codemod_mcp_mode_to_type_test.go +++ b/pkg/cli/codemod_mcp_mode_to_type_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/codemod_mcp_network_test.go b/pkg/cli/codemod_mcp_network_test.go index 52a72a3bd8..83ff068ee3 100644 --- a/pkg/cli/codemod_mcp_network_test.go +++ b/pkg/cli/codemod_mcp_network_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/codemod_network_firewall_test.go b/pkg/cli/codemod_network_firewall_test.go index 1c8ac0b63e..4ff84e9b17 100644 --- a/pkg/cli/codemod_network_firewall_test.go +++ b/pkg/cli/codemod_network_firewall_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/codemod_permissions_test.go b/pkg/cli/codemod_permissions_test.go index d1ca10969a..1c5fc461e3 100644 --- a/pkg/cli/codemod_permissions_test.go +++ b/pkg/cli/codemod_permissions_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/codemod_safe_inputs_test.go b/pkg/cli/codemod_safe_inputs_test.go index 9f12896b6b..28d9376648 100644 --- a/pkg/cli/codemod_safe_inputs_test.go +++ b/pkg/cli/codemod_safe_inputs_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/codemod_sandbox_agent_test.go b/pkg/cli/codemod_sandbox_agent_test.go index f85f5fb9db..554ef27cb2 100644 --- a/pkg/cli/codemod_sandbox_agent_test.go +++ b/pkg/cli/codemod_sandbox_agent_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/codemod_schedule_test.go b/pkg/cli/codemod_schedule_test.go index 392442229f..d047cd8809 100644 --- a/pkg/cli/codemod_schedule_test.go +++ b/pkg/cli/codemod_schedule_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/codemod_schema_file_test.go b/pkg/cli/codemod_schema_file_test.go index 6815168d50..6992c0607b 100644 --- a/pkg/cli/codemod_schema_file_test.go +++ b/pkg/cli/codemod_schema_file_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/codemod_slash_command_test.go b/pkg/cli/codemod_slash_command_test.go index 51d5b19654..31546b0bd1 100644 --- a/pkg/cli/codemod_slash_command_test.go +++ b/pkg/cli/codemod_slash_command_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/codemod_timeout_minutes_test.go b/pkg/cli/codemod_timeout_minutes_test.go index 28d51aa935..75071101c4 100644 --- a/pkg/cli/codemod_timeout_minutes_test.go +++ b/pkg/cli/codemod_timeout_minutes_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/codemod_upload_assets_test.go b/pkg/cli/codemod_upload_assets_test.go index ba16a503e8..1757ae2504 100644 --- a/pkg/cli/codemod_upload_assets_test.go +++ b/pkg/cli/codemod_upload_assets_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/codemod_yaml_utils_test.go b/pkg/cli/codemod_yaml_utils_test.go index 915a5af073..5c502d1fc8 100644 --- a/pkg/cli/codemod_yaml_utils_test.go +++ b/pkg/cli/codemod_yaml_utils_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/codespace_test.go b/pkg/cli/codespace_test.go index 6ec2e4464c..fbe2044d9e 100644 --- a/pkg/cli/codespace_test.go +++ b/pkg/cli/codespace_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/commands_file_watching_test.go b/pkg/cli/commands_file_watching_test.go index 30d0e5a664..8834e8bb96 100644 --- a/pkg/cli/commands_file_watching_test.go +++ b/pkg/cli/commands_file_watching_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/commands_utils_test.go b/pkg/cli/commands_utils_test.go index 764beeeb3e..1d03a9b568 100644 --- a/pkg/cli/commands_utils_test.go +++ b/pkg/cli/commands_utils_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( @@ -972,49 +974,3 @@ func TestIsRunnable_FileErrors(t *testing.T) { }) } } - -// Helper function to initialize a git repository in test directory -func initTestGitRepo(dir string) error { - // Create .git directory structure to simulate being in a git repo - gitDir := filepath.Join(dir, ".git") - if err := os.MkdirAll(gitDir, 0755); err != nil { - return err - } - - // Create subdirectories - subdirs := []string{"objects", "refs", "refs/heads", "refs/tags"} - for _, subdir := range subdirs { - if err := os.MkdirAll(filepath.Join(gitDir, subdir), 0755); err != nil { - return err - } - } - - // Create HEAD file pointing to main branch - headFile := filepath.Join(gitDir, "HEAD") - if err := os.WriteFile(headFile, []byte("ref: refs/heads/main\n"), 0644); err != nil { - return err - } - - // Create a minimal git config - configFile := filepath.Join(gitDir, "config") - configContent := `[core] - repositoryformatversion = 0 - filemode = true - bare = false - logallrefupdates = true -[user] - name = Test User - email = test@example.com` - - if err := os.WriteFile(configFile, []byte(configContent), 0644); err != nil { - return err - } - - // Create description file - descFile := filepath.Join(gitDir, "description") - if err := os.WriteFile(descFile, []byte("Test repository"), 0644); err != nil { - return err - } - - return nil -} diff --git a/pkg/cli/compile_campaign_orchestrator_test.go b/pkg/cli/compile_campaign_orchestrator_test.go index 6fe20ad33a..61a298b526 100644 --- a/pkg/cli/compile_campaign_orchestrator_test.go +++ b/pkg/cli/compile_campaign_orchestrator_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/compile_campaign_validation_test.go b/pkg/cli/compile_campaign_validation_test.go index 58c33a4ba9..742d109d82 100644 --- a/pkg/cli/compile_campaign_validation_test.go +++ b/pkg/cli/compile_campaign_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/compile_command_test.go b/pkg/cli/compile_command_test.go index f88a06e0fa..eb186e5c59 100644 --- a/pkg/cli/compile_command_test.go +++ b/pkg/cli/compile_command_test.go @@ -917,152 +917,3 @@ Test workflow content` t.Log("Test lock file was not created (this is ok if validation failed)") } } - -// TestCompileWorkflows_PurgeCampaignOrchestrators tests that --purge removes orphaned campaign orchestrator files -func TestCompileWorkflows_PurgeCampaignOrchestrators(t *testing.T) { - // Create temporary directory structure for testing - tempDir := testutil.TempDir(t, "test-purge-campaign-*") - workflowsDir := filepath.Join(tempDir, ".github/workflows") - if err := os.MkdirAll(workflowsDir, 0755); err != nil { - t.Fatalf("Failed to create workflows directory: %v", err) - } - - // Change to temp directory to simulate being in a git repo - originalDir, err := os.Getwd() - if err != nil { - t.Fatalf("Failed to get current directory: %v", err) - } - defer os.Chdir(originalDir) - if err := os.Chdir(tempDir); err != nil { - t.Fatalf("Failed to change to temp directory: %v", err) - } - - // Create .git directory and initialize it properly - gitCmd := exec.Command("git", "init") - gitCmd.Dir = tempDir - if err := gitCmd.Run(); err != nil { - t.Fatalf("Failed to initialize git repo: %v", err) - } - - // Configure git for the test - exec.Command("git", "-C", tempDir, "config", "user.email", "test@example.com").Run() - exec.Command("git", "-C", tempDir, "config", "user.name", "Test User").Run() - - // Create a valid campaign definition file - validCampaignMd := filepath.Join(workflowsDir, "valid-campaign.campaign.md") - validCampaignContent := `--- -id: valid-campaign -name: Valid Campaign -project-url: "https://github.com/orgs/example/projects/1" -version: v1 ---- - -# Valid Campaign - -This is a valid campaign definition.` - - if err := os.WriteFile(validCampaignMd, []byte(validCampaignContent), 0644); err != nil { - t.Fatalf("Failed to create valid campaign: %v", err) - } - - // Create orphaned campaign orchestrator files (without source .campaign.md) - orphanedOrchestratorMd := filepath.Join(workflowsDir, "orphaned-campaign.campaign.g.md") - orphanedOrchestratorContent := `--- -name: Orphaned Campaign Orchestrator -on: - schedule: - - cron: "0 0 * * *" ---- - -# Orphaned Campaign Orchestrator - -This orchestrator has no source .campaign.md file.` - - if err := os.WriteFile(orphanedOrchestratorMd, []byte(orphanedOrchestratorContent), 0644); err != nil { - t.Fatalf("Failed to create orphaned orchestrator: %v", err) - } - - // Create orphaned campaign orchestrator lock file - orphanedOrchestratorLockYml := filepath.Join(workflowsDir, "orphaned-campaign.campaign.lock.yml") - orphanedOrchestratorLockContent := `name: Orphaned Campaign Orchestrator -on: - schedule: - - cron: "0 0 * * *" -jobs: - test: - runs-on: ubuntu-latest - steps: - - run: echo "orphaned"` - - if err := os.WriteFile(orphanedOrchestratorLockYml, []byte(orphanedOrchestratorLockContent), 0644); err != nil { - t.Fatalf("Failed to create orphaned orchestrator lock file: %v", err) - } - - // Create a valid orchestrator that SHOULD exist (has a source .campaign.md) - validOrchestratorMd := filepath.Join(workflowsDir, "valid-campaign.campaign.g.md") - validOrchestratorContent := `--- -name: Valid Campaign Orchestrator -on: - schedule: - - cron: "0 0 * * *" ---- - -# Valid Campaign Orchestrator - -This orchestrator has a source .campaign.md file.` - - if err := os.WriteFile(validOrchestratorMd, []byte(validOrchestratorContent), 0644); err != nil { - t.Fatalf("Failed to create valid orchestrator: %v", err) - } - - // Verify files exist before purge - if _, err := os.Stat(orphanedOrchestratorMd); os.IsNotExist(err) { - t.Fatal("Orphaned orchestrator should exist before purge") - } - if _, err := os.Stat(orphanedOrchestratorLockYml); os.IsNotExist(err) { - t.Fatal("Orphaned orchestrator lock file should exist before purge") - } - if _, err := os.Stat(validOrchestratorMd); os.IsNotExist(err) { - t.Fatal("Valid orchestrator should exist before purge") - } - - // Run compilation with purge flag - config := CompileConfig{ - MarkdownFiles: []string{}, // Empty to compile all files - Verbose: true, // Enable verbose to see what's happening - NoEmit: true, // Skip emit to avoid validation issues - Purge: true, - WorkflowDir: "", - Validate: false, // Skip validation to avoid test failures - } - - // Compile workflows with purge enabled - result, err := CompileWorkflows(context.Background(), config) - if err != nil { - t.Logf("Compilation error (expected): %v", err) - } - if result != nil { - t.Logf("Compilation completed with %d results", len(result)) - } - - // Verify orphaned orchestrator lock file was deleted - if _, err := os.Stat(orphanedOrchestratorLockYml); !os.IsNotExist(err) { - t.Error("Orphaned campaign orchestrator lock file should have been purged") - } - - // Verify orphaned orchestrator .md file was deleted - // With the new behavior, .campaign.g.md files should be purged when orphaned - if _, err := os.Stat(orphanedOrchestratorMd); !os.IsNotExist(err) { - t.Error("Orphaned campaign orchestrator .md file should have been purged") - } - - // Verify the valid orchestrator was NOT deleted (it has a source campaign definition) - if _, err := os.Stat(validOrchestratorMd); os.IsNotExist(err) { - t.Error("Valid campaign orchestrator should still exist (has source .campaign.md)") - } - - // Verify the valid campaign definition still exists - if _, err := os.Stat(validCampaignMd); os.IsNotExist(err) { - t.Error("Valid campaign definition should still exist") - } -} diff --git a/pkg/cli/compile_dependabot_validation_test.go b/pkg/cli/compile_dependabot_validation_test.go index 19e0a15436..c2024ea2fa 100644 --- a/pkg/cli/compile_dependabot_validation_test.go +++ b/pkg/cli/compile_dependabot_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/compile_force_refresh_action_pins_test.go b/pkg/cli/compile_force_refresh_action_pins_test.go index 27994333d7..c1556333a5 100644 --- a/pkg/cli/compile_force_refresh_action_pins_test.go +++ b/pkg/cli/compile_force_refresh_action_pins_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/compile_instructions_test.go b/pkg/cli/compile_instructions_test.go index 2f4327dc82..c1921c9c3c 100644 --- a/pkg/cli/compile_instructions_test.go +++ b/pkg/cli/compile_instructions_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/compile_json_output_test.go b/pkg/cli/compile_json_output_test.go index 9eb28497cb..493a699f5a 100644 --- a/pkg/cli/compile_json_output_test.go +++ b/pkg/cli/compile_json_output_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/compile_maintenance_test.go b/pkg/cli/compile_maintenance_test.go index 15fa1dcd96..6a69e1dff9 100644 --- a/pkg/cli/compile_maintenance_test.go +++ b/pkg/cli/compile_maintenance_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/compile_orchestrator_stability_test.go b/pkg/cli/compile_orchestrator_stability_test.go index 0f4afb3e97..7d0522493a 100644 --- a/pkg/cli/compile_orchestrator_stability_test.go +++ b/pkg/cli/compile_orchestrator_stability_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/compile_security_benchmark_test.go b/pkg/cli/compile_security_benchmark_test.go index 14b167a613..ea36ad22aa 100644 --- a/pkg/cli/compile_security_benchmark_test.go +++ b/pkg/cli/compile_security_benchmark_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/compile_stats_test.go b/pkg/cli/compile_stats_test.go index fe083faa3f..d7f8bc5fc1 100644 --- a/pkg/cli/compile_stats_test.go +++ b/pkg/cli/compile_stats_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/completion_command_test.go b/pkg/cli/completion_command_test.go index 97cd631663..c2be55d90e 100644 --- a/pkg/cli/completion_command_test.go +++ b/pkg/cli/completion_command_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/completions_test.go b/pkg/cli/completions_test.go index ddb4e0b4ee..e4781be8a7 100644 --- a/pkg/cli/completions_test.go +++ b/pkg/cli/completions_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/context_cancellation_test.go b/pkg/cli/context_cancellation_test.go index 01099f66b6..991b22f6f0 100644 --- a/pkg/cli/context_cancellation_test.go +++ b/pkg/cli/context_cancellation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/copilot_agent_test.go b/pkg/cli/copilot_agent_test.go index 27285d0ce9..6ad9cd9dd9 100644 --- a/pkg/cli/copilot_agent_test.go +++ b/pkg/cli/copilot_agent_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/copilot_agents_test.go b/pkg/cli/copilot_agents_test.go index 3360e21660..bb246447b8 100644 --- a/pkg/cli/copilot_agents_test.go +++ b/pkg/cli/copilot_agents_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/copilot_instructions_test.go b/pkg/cli/copilot_instructions_test.go index cfd84196d1..0bd039a27d 100644 --- a/pkg/cli/copilot_instructions_test.go +++ b/pkg/cli/copilot_instructions_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/copilot_setup_test.go b/pkg/cli/copilot_setup_test.go index 0e08f1bd55..fe0ddbb62a 100644 --- a/pkg/cli/copilot_setup_test.go +++ b/pkg/cli/copilot_setup_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/copilot_token_extraction_test.go b/pkg/cli/copilot_token_extraction_test.go index ded5baac3d..6d5e192c35 100644 --- a/pkg/cli/copilot_token_extraction_test.go +++ b/pkg/cli/copilot_token_extraction_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/dependency_graph_test.go b/pkg/cli/dependency_graph_test.go index 112e852780..f942b93d58 100644 --- a/pkg/cli/dependency_graph_test.go +++ b/pkg/cli/dependency_graph_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/deps_test.go b/pkg/cli/deps_test.go index 946910057a..6305941953 100644 --- a/pkg/cli/deps_test.go +++ b/pkg/cli/deps_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/devcontainer_test.go b/pkg/cli/devcontainer_test.go index a3f7903165..e01195a72d 100644 --- a/pkg/cli/devcontainer_test.go +++ b/pkg/cli/devcontainer_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/docker_build_integration_test.go b/pkg/cli/docker_build_integration_test.go index 980fe1f667..2f981b8f24 100644 --- a/pkg/cli/docker_build_integration_test.go +++ b/pkg/cli/docker_build_integration_test.go @@ -182,7 +182,7 @@ func TestDockerImage_RunsSuccessfully(t *testing.T) { // Test running the Docker image with --help t.Log("Testing Docker image with --help...") - dockerRunCmd := exec.Command("docker", "run", "--rm", "ghcr.io/githubnext/gh-aw:test", "--help") + dockerRunCmd := exec.Command("docker", "run", "--rm", "ghcr.io/githubnext/gh-aw:latest", "--help") output, err := dockerRunCmd.CombinedOutput() if err != nil { t.Logf("Docker run output: %s", output) @@ -196,7 +196,7 @@ func TestDockerImage_RunsSuccessfully(t *testing.T) { // Test running with --version t.Log("Testing Docker image with --version...") - dockerVersionCmd := exec.Command("docker", "run", "--rm", "ghcr.io/githubnext/gh-aw:test", "--version") + dockerVersionCmd := exec.Command("docker", "run", "--rm", "ghcr.io/githubnext/gh-aw:latest", "--version") versionOutput, err := dockerVersionCmd.CombinedOutput() if err != nil { t.Logf("Docker version output: %s", versionOutput) @@ -204,7 +204,8 @@ func TestDockerImage_RunsSuccessfully(t *testing.T) { } versionStr := string(versionOutput) - if !strings.Contains(versionStr, "gh-aw version") && !strings.Contains(versionStr, "test") { + // Check for either 'gh-aw version' or 'gh aw version' (the actual version format) + if !strings.Contains(versionStr, "version") { t.Errorf("Docker image version output unexpected. Output: %s", versionStr) } @@ -251,8 +252,9 @@ func TestDockerImage_HasRequiredTools(t *testing.T) { for _, tool := range requiredTools { t.Run(tool, func(t *testing.T) { - cmd := exec.Command("docker", "run", "--rm", "ghcr.io/githubnext/gh-aw:test", - "sh", "-c", "which "+tool) + // Use --entrypoint to override the default entrypoint and run shell command + cmd := exec.Command("docker", "run", "--rm", "--entrypoint", "sh", + "ghcr.io/githubnext/gh-aw:latest", "-c", "which "+tool) output, err := cmd.CombinedOutput() if err != nil { t.Errorf("Tool %s not found in Docker image. Output: %s", tool, output) diff --git a/pkg/cli/docker_images_test.go b/pkg/cli/docker_images_test.go index 38e6cb3f7c..9a4ae3e77b 100644 --- a/pkg/cli/docker_images_test.go +++ b/pkg/cli/docker_images_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/domain_buckets_test.go b/pkg/cli/domain_buckets_test.go index 8035e23cfc..6d4dcfad4b 100644 --- a/pkg/cli/domain_buckets_test.go +++ b/pkg/cli/domain_buckets_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/error_formatting_test.go b/pkg/cli/error_formatting_test.go index f07ae6a01f..95564d807a 100644 --- a/pkg/cli/error_formatting_test.go +++ b/pkg/cli/error_formatting_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/exec_test.go b/pkg/cli/exec_test.go index 0fbdbdbb4d..8e9137d146 100644 --- a/pkg/cli/exec_test.go +++ b/pkg/cli/exec_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/file_tracker_test.go b/pkg/cli/file_tracker_test.go index 79e171e7b9..0509a4c636 100644 --- a/pkg/cli/file_tracker_test.go +++ b/pkg/cli/file_tracker_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/fileutil/fileutil_test.go b/pkg/cli/fileutil/fileutil_test.go index c05a23d39e..6c0d5dc265 100644 --- a/pkg/cli/fileutil/fileutil_test.go +++ b/pkg/cli/fileutil/fileutil_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package fileutil import ( diff --git a/pkg/cli/firewall_log_integration_test.go b/pkg/cli/firewall_log_integration_test.go index b769cffe97..5dc903e935 100644 --- a/pkg/cli/firewall_log_integration_test.go +++ b/pkg/cli/firewall_log_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package cli import ( diff --git a/pkg/cli/firewall_log_test.go b/pkg/cli/firewall_log_test.go index dfc50bbdd5..7d48caef35 100644 --- a/pkg/cli/firewall_log_test.go +++ b/pkg/cli/firewall_log_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/fix_codemods_test.go b/pkg/cli/fix_codemods_test.go index ca9e7f5dbe..e6520b466b 100644 --- a/pkg/cli/fix_codemods_test.go +++ b/pkg/cli/fix_codemods_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/fix_command_test.go b/pkg/cli/fix_command_test.go index 9dcea444ab..503bbdce8a 100644 --- a/pkg/cli/fix_command_test.go +++ b/pkg/cli/fix_command_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/fix_dir_flag_test.go b/pkg/cli/fix_dir_flag_test.go index bcb0492ebb..27f5e7afd2 100644 --- a/pkg/cli/fix_dir_flag_test.go +++ b/pkg/cli/fix_dir_flag_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/flags_test.go b/pkg/cli/flags_test.go index 7c81e44552..366e4b5a76 100644 --- a/pkg/cli/flags_test.go +++ b/pkg/cli/flags_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/format_preservation_test.go b/pkg/cli/format_preservation_test.go index bdf888fb8a..d5dfcc5df6 100644 --- a/pkg/cli/format_preservation_test.go +++ b/pkg/cli/format_preservation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/frontmatter_editor_test.go b/pkg/cli/frontmatter_editor_test.go index bc4d929472..99385e7b7c 100644 --- a/pkg/cli/frontmatter_editor_test.go +++ b/pkg/cli/frontmatter_editor_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/frontmatter_formatting_test.go b/pkg/cli/frontmatter_formatting_test.go index 0e2ad99979..f801571c7c 100644 --- a/pkg/cli/frontmatter_formatting_test.go +++ b/pkg/cli/frontmatter_formatting_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/fuzzy_matching_integration_test.go b/pkg/cli/fuzzy_matching_integration_test.go index 254a3c7233..a6513f0386 100644 --- a/pkg/cli/fuzzy_matching_integration_test.go +++ b/pkg/cli/fuzzy_matching_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package cli import ( diff --git a/pkg/cli/gateway_logs_test.go b/pkg/cli/gateway_logs_test.go index 2ab07de291..0639713088 100644 --- a/pkg/cli/gateway_logs_test.go +++ b/pkg/cli/gateway_logs_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/generate_action_metadata_command_test.go b/pkg/cli/generate_action_metadata_command_test.go index 83fdc70ef5..fabc524939 100644 --- a/pkg/cli/generate_action_metadata_command_test.go +++ b/pkg/cli/generate_action_metadata_command_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/gh_pr_list_test.go b/pkg/cli/gh_pr_list_test.go index c7ac895e3a..6f2eebe51f 100644 --- a/pkg/cli/gh_pr_list_test.go +++ b/pkg/cli/gh_pr_list_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/git_helpers_test.go b/pkg/cli/git_helpers_test.go index a97172de11..5881e9971f 100644 --- a/pkg/cli/git_helpers_test.go +++ b/pkg/cli/git_helpers_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/git_push_test.go b/pkg/cli/git_push_test.go index 6182396f37..a1c018dbdb 100644 --- a/pkg/cli/git_push_test.go +++ b/pkg/cli/git_push_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/git_test.go b/pkg/cli/git_test.go index 2325a65199..a28c3513a8 100644 --- a/pkg/cli/git_test.go +++ b/pkg/cli/git_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/gitattributes_test.go b/pkg/cli/gitattributes_test.go index b907c69116..fd70814529 100644 --- a/pkg/cli/gitattributes_test.go +++ b/pkg/cli/gitattributes_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/github_test.go b/pkg/cli/github_test.go index 98c3a8ded8..f3857ff564 100644 --- a/pkg/cli/github_test.go +++ b/pkg/cli/github_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/gitroot_test.go b/pkg/cli/gitroot_test.go index 0608e3d867..beb87b809d 100644 --- a/pkg/cli/gitroot_test.go +++ b/pkg/cli/gitroot_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/help_text_test.go b/pkg/cli/help_text_test.go index 32e0dea893..8678459ebe 100644 --- a/pkg/cli/help_text_test.go +++ b/pkg/cli/help_text_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/imports_test.go b/pkg/cli/imports_test.go index 79e1185242..c240da07af 100644 --- a/pkg/cli/imports_test.go +++ b/pkg/cli/imports_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/init_command_test.go b/pkg/cli/init_command_test.go index e468975ba5..1653a2184c 100644 --- a/pkg/cli/init_command_test.go +++ b/pkg/cli/init_command_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/init_mcp_test.go b/pkg/cli/init_mcp_test.go index 07f70f538c..cc0608a30f 100644 --- a/pkg/cli/init_mcp_test.go +++ b/pkg/cli/init_mcp_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/init_test.go b/pkg/cli/init_test.go index 6117a1e08c..ad64c934aa 100644 --- a/pkg/cli/init_test.go +++ b/pkg/cli/init_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/interactive_test.go b/pkg/cli/interactive_test.go index c4a0c53974..6f30673cae 100644 --- a/pkg/cli/interactive_test.go +++ b/pkg/cli/interactive_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/interfaces_test.go b/pkg/cli/interfaces_test.go index 5f3788deb1..54dbb11ec8 100644 --- a/pkg/cli/interfaces_test.go +++ b/pkg/cli/interfaces_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/jq_integration_test.go b/pkg/cli/jq_integration_test.go index f6e674cca9..394449dae3 100644 --- a/pkg/cli/jq_integration_test.go +++ b/pkg/cli/jq_integration_test.go @@ -29,6 +29,12 @@ func TestMCPServer_StatusToolWithJq(t *testing.T) { t.Skip("Skipping test: gh-aw binary not found. Run 'make build' first.") } + // Get absolute path to binary before changing directories + absBinaryPath, err := filepath.Abs(binaryPath) + if err != nil { + t.Fatalf("Failed to get absolute path to binary: %v", err) + } + // Create a temporary directory with a workflow file tmpDir := testutil.TempDir(t, "test-*") workflowsDir := filepath.Join(tmpDir, ".github", "workflows") @@ -52,10 +58,8 @@ engine: copilot originalDir, _ := os.Getwd() defer os.Chdir(originalDir) - // Initialize git repository in the temp directory - initCmd := exec.Command("git", "init") - initCmd.Dir = tmpDir - if err := initCmd.Run(); err != nil { + // Initialize git repository in the temp directory using shared helper + if err := initTestGitRepo(tmpDir); err != nil { t.Fatalf("Failed to initialize git repository: %v", err) } @@ -65,8 +69,8 @@ engine: copilot Version: "1.0.0", }, nil) - // Start the MCP server as a subprocess - serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server") + // Start the MCP server as a subprocess with --cmd flag to use binary directly + serverCmd := exec.Command(absBinaryPath, "mcp-server", "--cmd", absBinaryPath) serverCmd.Dir = tmpDir transport := &mcp.CommandTransport{Command: serverCmd} diff --git a/pkg/cli/jq_test.go b/pkg/cli/jq_test.go index 2c5e173587..f549de1c87 100644 --- a/pkg/cli/jq_test.go +++ b/pkg/cli/jq_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/list_command_test.go b/pkg/cli/list_command_test.go index 718279cb41..8ce24780d4 100644 --- a/pkg/cli/list_command_test.go +++ b/pkg/cli/list_command_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/list_workflows_command_test.go b/pkg/cli/list_workflows_command_test.go index 110407b26b..8b01c93ffb 100644 --- a/pkg/cli/list_workflows_command_test.go +++ b/pkg/cli/list_workflows_command_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/local_workflow_integration_test.go b/pkg/cli/local_workflow_integration_test.go index 5a5b36236d..4b70a3ce30 100644 --- a/pkg/cli/local_workflow_integration_test.go +++ b/pkg/cli/local_workflow_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package cli import ( diff --git a/pkg/cli/local_workflow_trial_test.go b/pkg/cli/local_workflow_trial_test.go index 5ec79d1785..d58f5ae4d0 100644 --- a/pkg/cli/local_workflow_trial_test.go +++ b/pkg/cli/local_workflow_trial_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/log_aggregation_test.go b/pkg/cli/log_aggregation_test.go index 2d326d2a21..8fb36f1aab 100644 --- a/pkg/cli/log_aggregation_test.go +++ b/pkg/cli/log_aggregation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_artifact_compat_test.go b/pkg/cli/logs_artifact_compat_test.go index f50082d90c..62b891c6ad 100644 --- a/pkg/cli/logs_artifact_compat_test.go +++ b/pkg/cli/logs_artifact_compat_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_awinfo_backward_compat_test.go b/pkg/cli/logs_awinfo_backward_compat_test.go index 1474503cec..56f24fe2de 100644 --- a/pkg/cli/logs_awinfo_backward_compat_test.go +++ b/pkg/cli/logs_awinfo_backward_compat_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_awinfo_resolution_test.go b/pkg/cli/logs_awinfo_resolution_test.go index 1828117a4e..176f531c04 100644 --- a/pkg/cli/logs_awinfo_resolution_test.go +++ b/pkg/cli/logs_awinfo_resolution_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_benchmark_test.go b/pkg/cli/logs_benchmark_test.go index 47f81df1ef..7200be7713 100644 --- a/pkg/cli/logs_benchmark_test.go +++ b/pkg/cli/logs_benchmark_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_ci_scenario_test.go b/pkg/cli/logs_ci_scenario_test.go index d5c1661c2f..8cc753f8e9 100644 --- a/pkg/cli/logs_ci_scenario_test.go +++ b/pkg/cli/logs_ci_scenario_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_command_test.go b/pkg/cli/logs_command_test.go index 88c06230fd..25ca2ccae5 100644 --- a/pkg/cli/logs_command_test.go +++ b/pkg/cli/logs_command_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_copilot_flattening_integration_test.go b/pkg/cli/logs_copilot_flattening_integration_test.go index 0dabcfe5dd..081866b74f 100644 --- a/pkg/cli/logs_copilot_flattening_integration_test.go +++ b/pkg/cli/logs_copilot_flattening_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package cli import ( diff --git a/pkg/cli/logs_display_fields_test.go b/pkg/cli/logs_display_fields_test.go index 45836028fc..b7e2a75757 100644 --- a/pkg/cli/logs_display_fields_test.go +++ b/pkg/cli/logs_display_fields_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_download_agent_outputs_test.go b/pkg/cli/logs_download_agent_outputs_test.go index ffbdd801a4..1612c527e6 100644 --- a/pkg/cli/logs_download_agent_outputs_test.go +++ b/pkg/cli/logs_download_agent_outputs_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_download_test.go b/pkg/cli/logs_download_test.go index 5df10f43a6..974c5e30ff 100644 --- a/pkg/cli/logs_download_test.go +++ b/pkg/cli/logs_download_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_empty_runs_test.go b/pkg/cli/logs_empty_runs_test.go index 7c1ceb48ad..df31862777 100644 --- a/pkg/cli/logs_empty_runs_test.go +++ b/pkg/cli/logs_empty_runs_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_extract_zip_test.go b/pkg/cli/logs_extract_zip_test.go index e6693daf0a..d289864247 100644 --- a/pkg/cli/logs_extract_zip_test.go +++ b/pkg/cli/logs_extract_zip_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_fallback_integration_test.go b/pkg/cli/logs_fallback_integration_test.go index 99cb26959e..e3fb2c19cc 100644 --- a/pkg/cli/logs_fallback_integration_test.go +++ b/pkg/cli/logs_fallback_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package cli import ( diff --git a/pkg/cli/logs_filtering_test.go b/pkg/cli/logs_filtering_test.go index 1e1f9e06c0..054339126b 100644 --- a/pkg/cli/logs_filtering_test.go +++ b/pkg/cli/logs_filtering_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_firewall_filter_test.go b/pkg/cli/logs_firewall_filter_test.go index c00d949f49..bf5e4d1e8b 100644 --- a/pkg/cli/logs_firewall_filter_test.go +++ b/pkg/cli/logs_firewall_filter_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_firewall_parse_test.go b/pkg/cli/logs_firewall_parse_test.go index 4cc01a6022..d2d8ebad26 100644 --- a/pkg/cli/logs_firewall_parse_test.go +++ b/pkg/cli/logs_firewall_parse_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_flatten_test.go b/pkg/cli/logs_flatten_test.go index d84c5a7c56..e3fa01ad53 100644 --- a/pkg/cli/logs_flatten_test.go +++ b/pkg/cli/logs_flatten_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_formatting_test.go b/pkg/cli/logs_formatting_test.go index 64e0438935..bef4298452 100644 --- a/pkg/cli/logs_formatting_test.go +++ b/pkg/cli/logs_formatting_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_json_clean_test.go b/pkg/cli/logs_json_clean_test.go index d6935fa144..1b40046b66 100644 --- a/pkg/cli/logs_json_clean_test.go +++ b/pkg/cli/logs_json_clean_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_json_stderr_order_test.go b/pkg/cli/logs_json_stderr_order_test.go index 14c3f14d0c..a2cc698cc4 100644 --- a/pkg/cli/logs_json_stderr_order_test.go +++ b/pkg/cli/logs_json_stderr_order_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_json_test.go b/pkg/cli/logs_json_test.go index 02c863be5d..1a04e883ab 100644 --- a/pkg/cli/logs_json_test.go +++ b/pkg/cli/logs_json_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_mcp_failure_test.go b/pkg/cli/logs_mcp_failure_test.go index f6f047139f..6c4aebcf3e 100644 --- a/pkg/cli/logs_mcp_failure_test.go +++ b/pkg/cli/logs_mcp_failure_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_missing_tool_integration_test.go b/pkg/cli/logs_missing_tool_integration_test.go index beded231eb..74e5e964cd 100644 --- a/pkg/cli/logs_missing_tool_integration_test.go +++ b/pkg/cli/logs_missing_tool_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package cli import ( diff --git a/pkg/cli/logs_missing_tool_test.go b/pkg/cli/logs_missing_tool_test.go index f4bcc0ac4b..f2f3505813 100644 --- a/pkg/cli/logs_missing_tool_test.go +++ b/pkg/cli/logs_missing_tool_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_noop_test.go b/pkg/cli/logs_noop_test.go index ea903a20e1..d24cfcb3a2 100644 --- a/pkg/cli/logs_noop_test.go +++ b/pkg/cli/logs_noop_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_overview_test.go b/pkg/cli/logs_overview_test.go index 2cf8d330d9..7324be2a4e 100644 --- a/pkg/cli/logs_overview_test.go +++ b/pkg/cli/logs_overview_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_parallel_test.go b/pkg/cli/logs_parallel_test.go index 2e98cac7a9..53e3341bb1 100644 --- a/pkg/cli/logs_parallel_test.go +++ b/pkg/cli/logs_parallel_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_parse_test.go b/pkg/cli/logs_parse_test.go index df01333f42..b2f4bd9eac 100644 --- a/pkg/cli/logs_parse_test.go +++ b/pkg/cli/logs_parse_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_parsing_fallback_test.go b/pkg/cli/logs_parsing_fallback_test.go index f350a96d86..f5e89eea79 100644 --- a/pkg/cli/logs_parsing_fallback_test.go +++ b/pkg/cli/logs_parsing_fallback_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_parsing_test.go b/pkg/cli/logs_parsing_test.go index 2bee4c3378..61dfc6635d 100644 --- a/pkg/cli/logs_parsing_test.go +++ b/pkg/cli/logs_parsing_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_patch_test.go b/pkg/cli/logs_patch_test.go index cd7e4e37a2..4df2acd8ac 100644 --- a/pkg/cli/logs_patch_test.go +++ b/pkg/cli/logs_patch_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_report_test.go b/pkg/cli/logs_report_test.go index 045add829a..fdc49e65b6 100644 --- a/pkg/cli/logs_report_test.go +++ b/pkg/cli/logs_report_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_summary_file_test.go b/pkg/cli/logs_summary_file_test.go index c50944afa7..34ab9653d8 100644 --- a/pkg/cli/logs_summary_file_test.go +++ b/pkg/cli/logs_summary_file_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_summary_integration_test.go b/pkg/cli/logs_summary_integration_test.go index c635bcbcdf..8c6ef1d0de 100644 --- a/pkg/cli/logs_summary_integration_test.go +++ b/pkg/cli/logs_summary_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package cli import ( diff --git a/pkg/cli/logs_summary_test.go b/pkg/cli/logs_summary_test.go index 3d5bac14f7..f8a48959cc 100644 --- a/pkg/cli/logs_summary_test.go +++ b/pkg/cli/logs_summary_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_timeout_detection_test.go b/pkg/cli/logs_timeout_detection_test.go index b3ae00685c..4404aafd52 100644 --- a/pkg/cli/logs_timeout_detection_test.go +++ b/pkg/cli/logs_timeout_detection_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/logs_timeout_integration_test.go b/pkg/cli/logs_timeout_integration_test.go index 1c5d0cf077..3f6dc0102f 100644 --- a/pkg/cli/logs_timeout_integration_test.go +++ b/pkg/cli/logs_timeout_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package cli import ( diff --git a/pkg/cli/logs_timeout_test.go b/pkg/cli/logs_timeout_test.go index 7a50bd168d..3c0aa03a69 100644 --- a/pkg/cli/logs_timeout_test.go +++ b/pkg/cli/logs_timeout_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/mcp_add_test.go b/pkg/cli/mcp_add_test.go index f79c8958a0..53561c198f 100644 --- a/pkg/cli/mcp_add_test.go +++ b/pkg/cli/mcp_add_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/mcp_config_file_test.go b/pkg/cli/mcp_config_file_test.go index c7a078c1e4..d256579bdc 100644 --- a/pkg/cli/mcp_config_file_test.go +++ b/pkg/cli/mcp_config_file_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/mcp_inspect_safe_inputs_test.go b/pkg/cli/mcp_inspect_safe_inputs_test.go index ce43e058e9..241312744f 100644 --- a/pkg/cli/mcp_inspect_safe_inputs_test.go +++ b/pkg/cli/mcp_inspect_safe_inputs_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/mcp_inspect_test.go b/pkg/cli/mcp_inspect_test.go index d19321345e..aede0df18c 100644 --- a/pkg/cli/mcp_inspect_test.go +++ b/pkg/cli/mcp_inspect_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/mcp_list_test.go b/pkg/cli/mcp_list_test.go index 796c8af500..e5565676d4 100644 --- a/pkg/cli/mcp_list_test.go +++ b/pkg/cli/mcp_list_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/mcp_list_tools_test.go b/pkg/cli/mcp_list_tools_test.go index b84fb4ef41..0a9f9d4c06 100644 --- a/pkg/cli/mcp_list_tools_test.go +++ b/pkg/cli/mcp_list_tools_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/mcp_logs_guardrail_test.go b/pkg/cli/mcp_logs_guardrail_test.go index 5dc7b05ba4..4c27369729 100644 --- a/pkg/cli/mcp_logs_guardrail_test.go +++ b/pkg/cli/mcp_logs_guardrail_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/mcp_registry_improvements_test.go b/pkg/cli/mcp_registry_improvements_test.go index 40ea62f49b..c2f450b640 100644 --- a/pkg/cli/mcp_registry_improvements_test.go +++ b/pkg/cli/mcp_registry_improvements_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/mcp_registry_test.go b/pkg/cli/mcp_registry_test.go index 3e6647600e..3d48b821a7 100644 --- a/pkg/cli/mcp_registry_test.go +++ b/pkg/cli/mcp_registry_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/mcp_schema_test.go b/pkg/cli/mcp_schema_test.go index 887b88599d..1e3dc17ef6 100644 --- a/pkg/cli/mcp_schema_test.go +++ b/pkg/cli/mcp_schema_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/mcp_secrets_test.go b/pkg/cli/mcp_secrets_test.go index 27bc0b31dc..a39ad1235a 100644 --- a/pkg/cli/mcp_secrets_test.go +++ b/pkg/cli/mcp_secrets_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/mcp_server_add_test.go b/pkg/cli/mcp_server_add_test.go index 4895169530..75fd9c8c14 100644 --- a/pkg/cli/mcp_server_add_test.go +++ b/pkg/cli/mcp_server_add_test.go @@ -100,26 +100,11 @@ func TestMCPServer_AddToolInvocation(t *testing.T) { t.Fatalf("Failed to create workflows directory: %v", err) } - // Initialize git repository in the temp directory - gitCmd := exec.Command("git", "init") - gitCmd.Dir = tmpDir - if err := gitCmd.Run(); err != nil { + // Initialize git repository using shared helper + if err := initTestGitRepo(tmpDir); err != nil { t.Fatalf("Failed to initialize git repository: %v", err) } - // Configure git user (required for commits) - configCmds := [][]string{ - {"git", "config", "user.email", "test@example.com"}, - {"git", "config", "user.name", "Test User"}, - } - for _, cmdArgs := range configCmds { - cmd := exec.Command(cmdArgs[0], cmdArgs[1:]...) - cmd.Dir = tmpDir - if err := cmd.Run(); err != nil { - t.Fatalf("Failed to configure git: %v", err) - } - } - // Change to the temporary directory originalDir, _ := os.Getwd() defer os.Chdir(originalDir) diff --git a/pkg/cli/mcp_server_compile_test.go b/pkg/cli/mcp_server_compile_test.go index dc690da37f..1792dc0990 100644 --- a/pkg/cli/mcp_server_compile_test.go +++ b/pkg/cli/mcp_server_compile_test.go @@ -49,10 +49,8 @@ This is a test workflow for compilation. defer os.Chdir(originalDir) os.Chdir(tmpDir) - // Initialize git repository in the temp directory - initCmd := exec.Command("git", "init") - initCmd.Dir = tmpDir - if err := initCmd.Run(); err != nil { + // Initialize git repository using shared helper + if err := initTestGitRepo(tmpDir); err != nil { t.Fatalf("Failed to initialize git repository: %v", err) } @@ -63,7 +61,7 @@ This is a test workflow for compilation. }, nil) // Start the MCP server as a subprocess - serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server") + serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server", "--cmd", filepath.Join(originalDir, binaryPath)) serverCmd.Dir = tmpDir transport := &mcp.CommandTransport{Command: serverCmd} @@ -122,7 +120,7 @@ This is a test workflow for compilation. // }, nil) // // Start the MCP server as a subprocess -// serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server") +// serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server", "--cmd", filepath.Join(originalDir, binaryPath)) // transport := &mcp.CommandTransport{Command: serverCmd} // ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) @@ -212,10 +210,8 @@ This is the second test workflow. defer os.Chdir(originalDir) os.Chdir(tmpDir) - // Initialize git repository in the temp directory - initCmd := exec.Command("git", "init") - initCmd.Dir = tmpDir - if err := initCmd.Run(); err != nil { + // Initialize git repository using shared helper + if err := initTestGitRepo(tmpDir); err != nil { t.Fatalf("Failed to initialize git repository: %v", err) } @@ -226,7 +222,7 @@ This is the second test workflow. }, nil) // Start the MCP server as a subprocess - serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server") + serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server", "--cmd", filepath.Join(originalDir, binaryPath)) serverCmd.Dir = tmpDir transport := &mcp.CommandTransport{Command: serverCmd} @@ -306,10 +302,8 @@ This workflow has a syntax error in the frontmatter. defer os.Chdir(originalDir) os.Chdir(tmpDir) - // Initialize git repository in the temp directory - initCmd := exec.Command("git", "init") - initCmd.Dir = tmpDir - if err := initCmd.Run(); err != nil { + // Initialize git repository using shared helper + if err := initTestGitRepo(tmpDir); err != nil { t.Fatalf("Failed to initialize git repository: %v", err) } @@ -320,7 +314,7 @@ This workflow has a syntax error in the frontmatter. }, nil) // Start the MCP server as a subprocess - serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server") + serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server", "--cmd", filepath.Join(originalDir, binaryPath)) serverCmd.Dir = tmpDir transport := &mcp.CommandTransport{Command: serverCmd} @@ -424,10 +418,8 @@ This workflow has an unknown field. defer os.Chdir(originalDir) os.Chdir(tmpDir) - // Initialize git repository - initCmd := exec.Command("git", "init") - initCmd.Dir = tmpDir - if err := initCmd.Run(); err != nil { + // Initialize git repository using shared helper + if err := initTestGitRepo(tmpDir); err != nil { t.Fatalf("Failed to initialize git repository: %v", err) } @@ -438,7 +430,7 @@ This workflow has an unknown field. }, nil) // Start the MCP server - serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server") + serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server", "--cmd", filepath.Join(originalDir, binaryPath)) serverCmd.Dir = tmpDir transport := &mcp.CommandTransport{Command: serverCmd} @@ -522,10 +514,8 @@ This workflow has strict mode disabled in frontmatter. defer os.Chdir(originalDir) os.Chdir(tmpDir) - // Initialize git repository - initCmd := exec.Command("git", "init") - initCmd.Dir = tmpDir - if err := initCmd.Run(); err != nil { + // Initialize git repository using shared helper + if err := initTestGitRepo(tmpDir); err != nil { t.Fatalf("Failed to initialize git repository: %v", err) } @@ -536,7 +526,7 @@ This workflow has strict mode disabled in frontmatter. }, nil) // Start the MCP server - serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server") + serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server", "--cmd", filepath.Join(originalDir, binaryPath)) serverCmd.Dir = tmpDir transport := &mcp.CommandTransport{Command: serverCmd} @@ -612,10 +602,8 @@ Test workflow for jq filtering. defer os.Chdir(originalDir) os.Chdir(tmpDir) - // Initialize git repository - initCmd := exec.Command("git", "init") - initCmd.Dir = tmpDir - if err := initCmd.Run(); err != nil { + // Initialize git repository using shared helper + if err := initTestGitRepo(tmpDir); err != nil { t.Fatalf("Failed to initialize git repository: %v", err) } @@ -626,7 +614,7 @@ Test workflow for jq filtering. }, nil) // Start the MCP server - serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server") + serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server", "--cmd", filepath.Join(originalDir, binaryPath)) serverCmd.Dir = tmpDir transport := &mcp.CommandTransport{Command: serverCmd} @@ -707,10 +695,8 @@ Test workflow. defer os.Chdir(originalDir) os.Chdir(tmpDir) - // Initialize git repository - initCmd := exec.Command("git", "init") - initCmd.Dir = tmpDir - if err := initCmd.Run(); err != nil { + // Initialize git repository using shared helper + if err := initTestGitRepo(tmpDir); err != nil { t.Fatalf("Failed to initialize git repository: %v", err) } @@ -721,7 +707,7 @@ Test workflow. }, nil) // Start the MCP server - serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server") + serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server", "--cmd", filepath.Join(originalDir, binaryPath)) serverCmd.Dir = tmpDir transport := &mcp.CommandTransport{Command: serverCmd} @@ -809,10 +795,8 @@ Second test workflow. defer os.Chdir(originalDir) os.Chdir(tmpDir) - // Initialize git repository - initCmd := exec.Command("git", "init") - initCmd.Dir = tmpDir - if err := initCmd.Run(); err != nil { + // Initialize git repository using shared helper + if err := initTestGitRepo(tmpDir); err != nil { t.Fatalf("Failed to initialize git repository: %v", err) } @@ -823,7 +807,7 @@ Second test workflow. }, nil) // Start the MCP server - serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server") + serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server", "--cmd", filepath.Join(originalDir, binaryPath)) serverCmd.Dir = tmpDir transport := &mcp.CommandTransport{Command: serverCmd} @@ -899,7 +883,7 @@ func TestMCPServer_CompileToolDescriptionMentionsRecompileRequirement(t *testing }, nil) // Start the MCP server as a subprocess - serverCmd := exec.Command(binaryPath, "mcp-server") + serverCmd := exec.Command(binaryPath, "mcp-server", "--cmd", binaryPath) transport := &mcp.CommandTransport{Command: serverCmd} ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) diff --git a/pkg/cli/mcp_server_defaults_test.go b/pkg/cli/mcp_server_defaults_test.go index c2d41b696b..06a5615a03 100644 --- a/pkg/cli/mcp_server_defaults_test.go +++ b/pkg/cli/mcp_server_defaults_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/mcp_server_error_codes_test.go b/pkg/cli/mcp_server_error_codes_test.go index 76bb35937e..7814e6518f 100644 --- a/pkg/cli/mcp_server_error_codes_test.go +++ b/pkg/cli/mcp_server_error_codes_test.go @@ -33,7 +33,7 @@ func TestMCPServer_ErrorCodes_InvalidParams(t *testing.T) { }, nil) // Start the MCP server as a subprocess - serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server") + serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server", "--cmd", filepath.Join(originalDir, binaryPath)) transport := &mcp.CommandTransport{Command: serverCmd} ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) @@ -115,15 +115,13 @@ This is a test workflow. t.Fatalf("Failed to write workflow file: %v", err) } - // Initialize git repository in the temp directory - initCmd := exec.Command("git", "init") - initCmd.Dir = tmpDir - if err := initCmd.Run(); err != nil { + // Initialize git repository using shared helper + if err := initTestGitRepo(tmpDir); err != nil { t.Fatalf("Failed to initialize git repository: %v", err) } // Start new MCP server in the temp directory - serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server") + serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server", "--cmd", filepath.Join(originalDir, binaryPath)) serverCmd.Dir = tmpDir transport := &mcp.CommandTransport{Command: serverCmd} @@ -177,7 +175,7 @@ func TestMCPServer_ErrorCodes_InternalError(t *testing.T) { }, nil) // Start the MCP server as a subprocess - serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server") + serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server", "--cmd", filepath.Join(originalDir, binaryPath)) transport := &mcp.CommandTransport{Command: serverCmd} ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) @@ -189,25 +187,25 @@ func TestMCPServer_ErrorCodes_InternalError(t *testing.T) { } defer session.Close() - // Test: audit tool with invalid run_id (should cause internal error) + // Test: audit tool with invalid run_id_or_url (should cause internal error) t.Run("audit_invalid_run_id", func(t *testing.T) { params := &mcp.CallToolParams{ Name: "audit", Arguments: map[string]any{ - "run_id": int64(1), // Invalid run ID + "run_id_or_url": "1", // Invalid run ID }, } _, err := session.CallTool(ctx, params) if err == nil { - t.Error("Expected error for invalid run_id, got nil") + t.Error("Expected error for invalid run_id_or_url, got nil") return } - // The error message should contain the failed audit error + // The error message should contain the failed audit error or validation error errMsg := err.Error() - if !strings.Contains(errMsg, "failed to audit workflow run") { - t.Errorf("Expected error message about failed audit, got: %s", errMsg) + if !strings.Contains(errMsg, "failed to audit") && !strings.Contains(errMsg, "could not determine repository") { + t.Errorf("Expected error message about failed audit or invalid parameters, got: %s", errMsg) } else { t.Logf("✓ Correct error for failed audit: %s", errMsg) } diff --git a/pkg/cli/mcp_server_fix_test.go b/pkg/cli/mcp_server_fix_test.go index 5a1143fc4e..3c6ac9108e 100644 --- a/pkg/cli/mcp_server_fix_test.go +++ b/pkg/cli/mcp_server_fix_test.go @@ -121,6 +121,11 @@ This is a test workflow with deprecated timeout_minutes field. defer os.Chdir(originalDir) os.Chdir(tmpDir) + // Initialize git repository using shared helper + if err := initTestGitRepo(tmpDir); err != nil { + t.Fatalf("Failed to initialize git repository: %v", err) + } + // Create MCP client client := mcp.NewClient(&mcp.Implementation{ Name: "test-client", @@ -215,12 +220,25 @@ This is a test workflow with deprecated timeout_minutes field. t.Fatalf("Failed to read updated workflow file: %v", err) } - // Verify the deprecated field was replaced - if strings.Contains(string(updatedContent), "timeout_minutes") { - t.Error("Expected timeout_minutes to be replaced, but it still exists") + t.Logf("Updated content:\n%s", string(updatedContent)) + + // Verify the deprecated field was replaced in frontmatter + // We need to check only the frontmatter, not the markdown body + // The frontmatter is between the first and second "---" lines + contentStr := string(updatedContent) + + // Extract frontmatter section (between first two ---) + parts := strings.SplitN(contentStr, "---", 3) + if len(parts) < 3 { + t.Fatal("Could not parse frontmatter from updated file") + } + frontmatter := parts[1] + + if strings.Contains(frontmatter, "timeout_minutes") { + t.Error("Expected timeout_minutes to be replaced in frontmatter, but it still exists") } - if !strings.Contains(string(updatedContent), "timeout-minutes") { - t.Error("Expected timeout-minutes to be present after fix") + if !strings.Contains(frontmatter, "timeout-minutes") { + t.Error("Expected timeout-minutes to be present in frontmatter after fix") } }) diff --git a/pkg/cli/mcp_server_inspect_test.go b/pkg/cli/mcp_server_inspect_test.go index 722a94cb70..37c9d3797b 100644 --- a/pkg/cli/mcp_server_inspect_test.go +++ b/pkg/cli/mcp_server_inspect_test.go @@ -111,10 +111,8 @@ This is a test workflow with MCP configuration. t.Fatalf("Failed to write workflow file: %v", err) } - // Initialize git repository in the temp directory - gitCmd := exec.Command("git", "init") - gitCmd.Dir = tmpDir - if err := gitCmd.Run(); err != nil { + // Initialize git repository using shared helper + if err := initTestGitRepo(tmpDir); err != nil { t.Fatalf("Failed to initialize git repository: %v", err) } diff --git a/pkg/cli/mcp_server_json_integration_test.go b/pkg/cli/mcp_server_json_integration_test.go index 9879720494..4a1231e98d 100644 --- a/pkg/cli/mcp_server_json_integration_test.go +++ b/pkg/cli/mcp_server_json_integration_test.go @@ -61,10 +61,8 @@ This is a test workflow. t.Cleanup(func() { os.Chdir(originalDir) }) os.Chdir(tmpDir) - // Initialize git repository in the temp directory - initCmd := exec.Command("git", "init") - initCmd.Dir = tmpDir - if err := initCmd.Run(); err != nil { + // Initialize git repository using shared helper + if err := initTestGitRepo(tmpDir); err != nil { t.Fatalf("Failed to initialize git repository: %v", err) } diff --git a/pkg/cli/mcp_server_operations_test.go b/pkg/cli/mcp_server_operations_test.go index ad69d2574e..276e184817 100644 --- a/pkg/cli/mcp_server_operations_test.go +++ b/pkg/cli/mcp_server_operations_test.go @@ -48,10 +48,8 @@ This is a test workflow. defer os.Chdir(originalDir) os.Chdir(tmpDir) - // Initialize git repository in the temp directory - initCmd := exec.Command("git", "init") - initCmd.Dir = tmpDir - if err := initCmd.Run(); err != nil { + // Initialize git repository using shared helper + if err := initTestGitRepo(tmpDir); err != nil { t.Fatalf("Failed to initialize git repository: %v", err) } @@ -140,10 +138,8 @@ This is a test workflow. defer os.Chdir(originalDir) os.Chdir(tmpDir) - // Initialize git repository in the temp directory - initCmd := exec.Command("git", "init") - initCmd.Dir = tmpDir - if err := initCmd.Run(); err != nil { + // Initialize git repository using shared helper + if err := initTestGitRepo(tmpDir); err != nil { t.Fatalf("Failed to initialize git repository: %v", err) } @@ -154,7 +150,7 @@ This is a test workflow. }, nil) // Start the MCP server as a subprocess - serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server") + serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server", "--cmd", filepath.Join(originalDir, binaryPath)) serverCmd.Dir = tmpDir transport := &mcp.CommandTransport{Command: serverCmd} @@ -209,7 +205,7 @@ func TestMCPServer_AuditTool(t *testing.T) { }, nil) // Start the MCP server as a subprocess - serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server") + serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server", "--cmd", filepath.Join(originalDir, binaryPath)) transport := &mcp.CommandTransport{Command: serverCmd} ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) @@ -274,7 +270,7 @@ func TestMCPServer_ContextCancellation(t *testing.T) { }, nil) // Start the MCP server as a subprocess - serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server") + serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server", "--cmd", filepath.Join(originalDir, binaryPath)) transport := &mcp.CommandTransport{Command: serverCmd} ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) diff --git a/pkg/cli/mcp_server_tools_test.go b/pkg/cli/mcp_server_tools_test.go index d75cbc22ec..c7e5f54a2b 100644 --- a/pkg/cli/mcp_server_tools_test.go +++ b/pkg/cli/mcp_server_tools_test.go @@ -28,7 +28,7 @@ func TestMCPServer_ListTools(t *testing.T) { }, nil) // Start the MCP server as a subprocess - serverCmd := exec.Command(binaryPath, "mcp-server") + serverCmd := exec.Command(binaryPath, "mcp-server", "--cmd", binaryPath) transport := &mcp.CommandTransport{Command: serverCmd} ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) @@ -82,7 +82,7 @@ func TestMCPServer_ServerInfo(t *testing.T) { }, nil) // Start the MCP server as a subprocess - serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server") + serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server", "--cmd", filepath.Join(originalDir, binaryPath)) transport := &mcp.CommandTransport{Command: serverCmd} ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) @@ -122,7 +122,7 @@ func TestMCPServer_UpdateToolSchema(t *testing.T) { }, nil) // Start the MCP server as a subprocess - serverCmd := exec.Command(binaryPath, "mcp-server") + serverCmd := exec.Command(binaryPath, "mcp-server", "--cmd", binaryPath) transport := &mcp.CommandTransport{Command: serverCmd} ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) @@ -191,7 +191,7 @@ func TestMCPServer_CapabilitiesConfiguration(t *testing.T) { }, nil) // Start the MCP server as a subprocess - serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server") + serverCmd := exec.Command(filepath.Join(originalDir, binaryPath), "mcp-server", "--cmd", filepath.Join(originalDir, binaryPath)) transport := &mcp.CommandTransport{Command: serverCmd} ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) @@ -240,7 +240,7 @@ func TestMCPServer_ToolIcons(t *testing.T) { }, nil) // Start the MCP server as a subprocess - serverCmd := exec.Command(binaryPath, "mcp-server") + serverCmd := exec.Command(binaryPath, "mcp-server", "--cmd", binaryPath) transport := &mcp.CommandTransport{Command: serverCmd} ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) @@ -267,6 +267,7 @@ func TestMCPServer_ToolIcons(t *testing.T) { "mcp-inspect": "🔎", "add": "➕", "update": "🔄", + "fix": "🔧", } // Verify each tool has an icon diff --git a/pkg/cli/mcp_tool_schemas_test.go b/pkg/cli/mcp_tool_schemas_test.go index 312b130c4d..a6ed5203ad 100644 --- a/pkg/cli/mcp_tool_schemas_test.go +++ b/pkg/cli/mcp_tool_schemas_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/mcp_tool_table_test.go b/pkg/cli/mcp_tool_table_test.go index b5c49dfde2..363864a59e 100644 --- a/pkg/cli/mcp_tool_table_test.go +++ b/pkg/cli/mcp_tool_table_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/mcp_workflow_loader_test.go b/pkg/cli/mcp_workflow_loader_test.go index cc17c7898e..14afbce31c 100644 --- a/pkg/cli/mcp_workflow_loader_test.go +++ b/pkg/cli/mcp_workflow_loader_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/no_stop_time_integration_test.go b/pkg/cli/no_stop_time_integration_test.go index efe1362a1e..cb4613191c 100644 --- a/pkg/cli/no_stop_time_integration_test.go +++ b/pkg/cli/no_stop_time_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package cli import ( diff --git a/pkg/cli/packages_fallback_test.go b/pkg/cli/packages_fallback_test.go index 1409d66e90..72f7227028 100644 --- a/pkg/cli/packages_fallback_test.go +++ b/pkg/cli/packages_fallback_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/packages_test.go b/pkg/cli/packages_test.go index b3e97d4a84..6f10b1337c 100644 --- a/pkg/cli/packages_test.go +++ b/pkg/cli/packages_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/packages_validation_test.go b/pkg/cli/packages_validation_test.go index cb671465f1..e1f354a104 100644 --- a/pkg/cli/packages_validation_test.go +++ b/pkg/cli/packages_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/poutine_test.go b/pkg/cli/poutine_test.go index 90d3fa7865..498e330135 100644 --- a/pkg/cli/poutine_test.go +++ b/pkg/cli/poutine_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/pr_automerge_test.go b/pkg/cli/pr_automerge_test.go index d8eb52c7cb..388c09b2d0 100644 --- a/pkg/cli/pr_automerge_test.go +++ b/pkg/cli/pr_automerge_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/pr_command_test.go b/pkg/cli/pr_command_test.go index 985f1a872a..b221ec9b75 100644 --- a/pkg/cli/pr_command_test.go +++ b/pkg/cli/pr_command_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/redacted_domains_test.go b/pkg/cli/redacted_domains_test.go index f43b408812..03b33abaf0 100644 --- a/pkg/cli/redacted_domains_test.go +++ b/pkg/cli/redacted_domains_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/repo_error_messages_test.go b/pkg/cli/repo_error_messages_test.go index b8cffa7185..af772d852a 100644 --- a/pkg/cli/repo_error_messages_test.go +++ b/pkg/cli/repo_error_messages_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/repo_test.go b/pkg/cli/repo_test.go index dc19d99530..789506865f 100644 --- a/pkg/cli/repo_test.go +++ b/pkg/cli/repo_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/resolver_test.go b/pkg/cli/resolver_test.go index 509ba8a1c2..62468849e2 100644 --- a/pkg/cli/resolver_test.go +++ b/pkg/cli/resolver_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/run_command_codespace_test.go b/pkg/cli/run_command_codespace_test.go index c393b9a5de..a5c0f90c3c 100644 --- a/pkg/cli/run_command_codespace_test.go +++ b/pkg/cli/run_command_codespace_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/run_input_validation_test.go b/pkg/cli/run_input_validation_test.go index 1a9252dc1f..a7b774ca03 100644 --- a/pkg/cli/run_input_validation_test.go +++ b/pkg/cli/run_input_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/run_interactive_test.go b/pkg/cli/run_interactive_test.go index 8f8e04dc02..4deb9db5ea 100644 --- a/pkg/cli/run_interactive_test.go +++ b/pkg/cli/run_interactive_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/run_push_test.go b/pkg/cli/run_push_test.go index 1febae93a6..82f429037e 100644 --- a/pkg/cli/run_push_test.go +++ b/pkg/cli/run_push_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/run_workflow_execution_test.go b/pkg/cli/run_workflow_execution_test.go index a1ef9ce86e..b6c7aaa4ad 100644 --- a/pkg/cli/run_workflow_execution_test.go +++ b/pkg/cli/run_workflow_execution_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/run_workflow_tracking_test.go b/pkg/cli/run_workflow_tracking_test.go index c91c84f393..d4656ef013 100644 --- a/pkg/cli/run_workflow_tracking_test.go +++ b/pkg/cli/run_workflow_tracking_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/run_workflow_validation_test.go b/pkg/cli/run_workflow_validation_test.go index 6f6e961fd2..1231f47e1a 100644 --- a/pkg/cli/run_workflow_validation_test.go +++ b/pkg/cli/run_workflow_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/secret_set_command_test.go b/pkg/cli/secret_set_command_test.go index 9d15e9fe3d..62611d949b 100644 --- a/pkg/cli/secret_set_command_test.go +++ b/pkg/cli/secret_set_command_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/secrets_command_test.go b/pkg/cli/secrets_command_test.go index 731bce8263..2f53680f96 100644 --- a/pkg/cli/secrets_command_test.go +++ b/pkg/cli/secrets_command_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/secrets_test.go b/pkg/cli/secrets_test.go index f717125fd1..f346eaf791 100644 --- a/pkg/cli/secrets_test.go +++ b/pkg/cli/secrets_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/security_regression_test.go b/pkg/cli/security_regression_test.go index 0b32b7d69c..d7ea9c8a1a 100644 --- a/pkg/cli/security_regression_test.go +++ b/pkg/cli/security_regression_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/semver_precise_test.go b/pkg/cli/semver_precise_test.go index 89afd3ec8c..16d4e40de9 100644 --- a/pkg/cli/semver_precise_test.go +++ b/pkg/cli/semver_precise_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/semver_test.go b/pkg/cli/semver_test.go index 8153217da0..43f4c7f049 100644 --- a/pkg/cli/semver_test.go +++ b/pkg/cli/semver_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/shell_completion_test.go b/pkg/cli/shell_completion_test.go index 3b6fb8291b..d5e17dffd3 100644 --- a/pkg/cli/shell_completion_test.go +++ b/pkg/cli/shell_completion_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/signal_aware_poll_test.go b/pkg/cli/signal_aware_poll_test.go index 8a1e044a05..3a4a08bdbc 100644 --- a/pkg/cli/signal_aware_poll_test.go +++ b/pkg/cli/signal_aware_poll_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/spec_github_url_test.go b/pkg/cli/spec_github_url_test.go index 6673ad12bf..e43ed31c6d 100644 --- a/pkg/cli/spec_github_url_test.go +++ b/pkg/cli/spec_github_url_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/spec_test.go b/pkg/cli/spec_test.go index a4c5cb2b74..1b2f8a3b09 100644 --- a/pkg/cli/spec_test.go +++ b/pkg/cli/spec_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/staged_filtering_test.go b/pkg/cli/staged_filtering_test.go index 6e774f5b62..4bdc912345 100644 --- a/pkg/cli/staged_filtering_test.go +++ b/pkg/cli/staged_filtering_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/test_helpers_git_test.go b/pkg/cli/test_helpers_git_test.go new file mode 100644 index 0000000000..6fa910d5d5 --- /dev/null +++ b/pkg/cli/test_helpers_git_test.go @@ -0,0 +1,53 @@ +package cli + +import ( + "os" + "path/filepath" +) + +// initTestGitRepo initializes a git repository in the test directory. +// This is a shared helper used by both unit and integration tests. +func initTestGitRepo(dir string) error { + // Create .git directory structure to simulate being in a git repo + gitDir := filepath.Join(dir, ".git") + if err := os.MkdirAll(gitDir, 0755); err != nil { + return err + } + + // Create subdirectories + subdirs := []string{"objects", "refs", "refs/heads", "refs/tags"} + for _, subdir := range subdirs { + if err := os.MkdirAll(filepath.Join(gitDir, subdir), 0755); err != nil { + return err + } + } + + // Create HEAD file pointing to main branch + headFile := filepath.Join(gitDir, "HEAD") + if err := os.WriteFile(headFile, []byte("ref: refs/heads/main\n"), 0644); err != nil { + return err + } + + // Create a minimal git config + configFile := filepath.Join(gitDir, "config") + configContent := `[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true +[user] + name = Test User + email = test@example.com` + + if err := os.WriteFile(configFile, []byte(configContent), 0644); err != nil { + return err + } + + // Create description file + descFile := filepath.Join(gitDir, "description") + if err := os.WriteFile(descFile, []byte("Test repository"), 0644); err != nil { + return err + } + + return nil +} diff --git a/pkg/cli/test_main_test.go b/pkg/cli/test_main_test.go index e80a478603..c93b0fbb85 100644 --- a/pkg/cli/test_main_test.go +++ b/pkg/cli/test_main_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/tool_graph_test.go b/pkg/cli/tool_graph_test.go index 6c539fd6ac..24a16655b5 100644 --- a/pkg/cli/tool_graph_test.go +++ b/pkg/cli/tool_graph_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/trial_command_lipgloss_test.go b/pkg/cli/trial_command_lipgloss_test.go index ac46eb2e68..a046422eb7 100644 --- a/pkg/cli/trial_command_lipgloss_test.go +++ b/pkg/cli/trial_command_lipgloss_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/trial_command_test.go b/pkg/cli/trial_command_test.go index 28c529fba1..c250bb6083 100644 --- a/pkg/cli/trial_command_test.go +++ b/pkg/cli/trial_command_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/trial_issue_mode_test.go b/pkg/cli/trial_issue_mode_test.go index cc3be36647..2acfd961ff 100644 --- a/pkg/cli/trial_issue_mode_test.go +++ b/pkg/cli/trial_issue_mode_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/update_actions_integration_test.go b/pkg/cli/update_actions_integration_test.go index ddd088352e..4c7567d697 100644 --- a/pkg/cli/update_actions_integration_test.go +++ b/pkg/cli/update_actions_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package cli import ( diff --git a/pkg/cli/update_actions_test.go b/pkg/cli/update_actions_test.go index c360f98356..0acd5ff56b 100644 --- a/pkg/cli/update_actions_test.go +++ b/pkg/cli/update_actions_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/update_check_test.go b/pkg/cli/update_check_test.go index c876613991..f3dafe0132 100644 --- a/pkg/cli/update_check_test.go +++ b/pkg/cli/update_check_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/update_command_test.go b/pkg/cli/update_command_test.go index 0442cb6238..d6a5fecf40 100644 --- a/pkg/cli/update_command_test.go +++ b/pkg/cli/update_command_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/update_extension_check_test.go b/pkg/cli/update_extension_check_test.go index 1825565513..c709cad6e0 100644 --- a/pkg/cli/update_extension_check_test.go +++ b/pkg/cli/update_extension_check_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/upgrade_agentic_workflow_agent_test.go b/pkg/cli/upgrade_agentic_workflow_agent_test.go index 5f32dcad31..5ff5aea431 100644 --- a/pkg/cli/upgrade_agentic_workflow_agent_test.go +++ b/pkg/cli/upgrade_agentic_workflow_agent_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/validators_test.go b/pkg/cli/validators_test.go index ddceddd233..4f54747e11 100644 --- a/pkg/cli/validators_test.go +++ b/pkg/cli/validators_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/workflow_suggestions_test.go b/pkg/cli/workflow_suggestions_test.go index 7fdae257d9..99cebbc88e 100644 --- a/pkg/cli/workflow_suggestions_test.go +++ b/pkg/cli/workflow_suggestions_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/workflows_count_test.go b/pkg/cli/workflows_count_test.go index 3e243ad667..5d24ec81e1 100644 --- a/pkg/cli/workflows_count_test.go +++ b/pkg/cli/workflows_count_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/workflows_path_test.go b/pkg/cli/workflows_path_test.go index 6b0ca7aa10..4918fbf332 100644 --- a/pkg/cli/workflows_path_test.go +++ b/pkg/cli/workflows_path_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/workflows_test.go b/pkg/cli/workflows_test.go index 0fd1e4aaae..f7a2f33b79 100644 --- a/pkg/cli/workflows_test.go +++ b/pkg/cli/workflows_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/cli/zizmor_test.go b/pkg/cli/zizmor_test.go index e89e4828cb..bf373fdca5 100644 --- a/pkg/cli/zizmor_test.go +++ b/pkg/cli/zizmor_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package cli import ( diff --git a/pkg/console/accessibility_test.go b/pkg/console/accessibility_test.go index 914e7154bb..63e21e6152 100644 --- a/pkg/console/accessibility_test.go +++ b/pkg/console/accessibility_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package console import ( diff --git a/pkg/console/banner_test.go b/pkg/console/banner_test.go index a5bfb64e5f..ac3648604c 100644 --- a/pkg/console/banner_test.go +++ b/pkg/console/banner_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package console import ( diff --git a/pkg/console/confirm_test.go b/pkg/console/confirm_test.go index 86d8086ccd..e7571cb030 100644 --- a/pkg/console/confirm_test.go +++ b/pkg/console/confirm_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package console import ( diff --git a/pkg/console/console_formatting_test.go b/pkg/console/console_formatting_test.go index bcc4fbc551..ed57c367e0 100644 --- a/pkg/console/console_formatting_test.go +++ b/pkg/console/console_formatting_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package console import ( diff --git a/pkg/console/console_test.go b/pkg/console/console_test.go index 800c78476d..b756884044 100644 --- a/pkg/console/console_test.go +++ b/pkg/console/console_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package console import ( diff --git a/pkg/console/format_test.go b/pkg/console/format_test.go index 4ffe551e60..560921c576 100644 --- a/pkg/console/format_test.go +++ b/pkg/console/format_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package console import "testing" diff --git a/pkg/console/golden_test.go b/pkg/console/golden_test.go index 159d3b7c5e..544e23919b 100644 --- a/pkg/console/golden_test.go +++ b/pkg/console/golden_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package console import ( diff --git a/pkg/console/layout_test.go b/pkg/console/layout_test.go index 088a10fec7..b4976cf4d2 100644 --- a/pkg/console/layout_test.go +++ b/pkg/console/layout_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package console import ( diff --git a/pkg/console/list_test.go b/pkg/console/list_test.go index 4908cc47cf..f42e6e65e8 100644 --- a/pkg/console/list_test.go +++ b/pkg/console/list_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package console import ( diff --git a/pkg/console/progress_test.go b/pkg/console/progress_test.go index 5d722ea51c..00b5854fdb 100644 --- a/pkg/console/progress_test.go +++ b/pkg/console/progress_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package console import ( diff --git a/pkg/console/render_formatting_test.go b/pkg/console/render_formatting_test.go index db49da1e44..1ee1556f9f 100644 --- a/pkg/console/render_formatting_test.go +++ b/pkg/console/render_formatting_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package console import ( diff --git a/pkg/console/render_slice_test.go b/pkg/console/render_slice_test.go index eb821bede0..ec2f3149d9 100644 --- a/pkg/console/render_slice_test.go +++ b/pkg/console/render_slice_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package console import ( diff --git a/pkg/console/render_test.go b/pkg/console/render_test.go index bbe775159e..9e659269a0 100644 --- a/pkg/console/render_test.go +++ b/pkg/console/render_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package console import ( diff --git a/pkg/console/spinner_test.go b/pkg/console/spinner_test.go index 874340a612..7318d398e1 100644 --- a/pkg/console/spinner_test.go +++ b/pkg/console/spinner_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package console import ( diff --git a/pkg/console/verbose_test.go b/pkg/console/verbose_test.go index be7def5e84..52939bdc57 100644 --- a/pkg/console/verbose_test.go +++ b/pkg/console/verbose_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package console import ( diff --git a/pkg/constants/constants_test.go b/pkg/constants/constants_test.go index 6e77e44967..764d19289a 100644 --- a/pkg/constants/constants_test.go +++ b/pkg/constants/constants_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package constants import ( diff --git a/pkg/envutil/envutil_test.go b/pkg/envutil/envutil_test.go index 5442f314e3..4114f409ce 100644 --- a/pkg/envutil/envutil_test.go +++ b/pkg/envutil/envutil_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package envutil import ( diff --git a/pkg/gitutil/gitutil_test.go b/pkg/gitutil/gitutil_test.go index 0e2a88e809..c581b9f26c 100644 --- a/pkg/gitutil/gitutil_test.go +++ b/pkg/gitutil/gitutil_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package gitutil import "testing" diff --git a/pkg/logger/error_formatting_test.go b/pkg/logger/error_formatting_test.go index 8f48ccee27..9d764e60fc 100644 --- a/pkg/logger/error_formatting_test.go +++ b/pkg/logger/error_formatting_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package logger import ( diff --git a/pkg/logger/example_test.go b/pkg/logger/example_test.go index af4fb0ceb1..0626599176 100644 --- a/pkg/logger/example_test.go +++ b/pkg/logger/example_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package logger_test import ( diff --git a/pkg/logger/logger_test.go b/pkg/logger/logger_test.go index 348ed58c02..f963537679 100644 --- a/pkg/logger/logger_test.go +++ b/pkg/logger/logger_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package logger import ( diff --git a/pkg/logger/slog_adapter_test.go b/pkg/logger/slog_adapter_test.go index e9f49ddd1d..f4cf61e5a4 100644 --- a/pkg/logger/slog_adapter_test.go +++ b/pkg/logger/slog_adapter_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package logger import ( diff --git a/pkg/mathutil/mathutil_test.go b/pkg/mathutil/mathutil_test.go index 47e0efc5b1..f31f51f402 100644 --- a/pkg/mathutil/mathutil_test.go +++ b/pkg/mathutil/mathutil_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package mathutil import "testing" diff --git a/pkg/parser/agent_import_integration_test.go b/pkg/parser/agent_import_integration_test.go index 9260653e81..a5d6f367ed 100644 --- a/pkg/parser/agent_import_integration_test.go +++ b/pkg/parser/agent_import_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package parser import ( diff --git a/pkg/parser/engine_includes_test.go b/pkg/parser/engine_includes_test.go index 2d205ab831..ff45f5eb62 100644 --- a/pkg/parser/engine_includes_test.go +++ b/pkg/parser/engine_includes_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/frontmatter_benchmark_test.go b/pkg/parser/frontmatter_benchmark_test.go index 223de1742b..52415f96a3 100644 --- a/pkg/parser/frontmatter_benchmark_test.go +++ b/pkg/parser/frontmatter_benchmark_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/frontmatter_extraction_test.go b/pkg/parser/frontmatter_extraction_test.go index aeaf286465..10a9b69e3a 100644 --- a/pkg/parser/frontmatter_extraction_test.go +++ b/pkg/parser/frontmatter_extraction_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/frontmatter_fuzz_test.go b/pkg/parser/frontmatter_fuzz_test.go index d8f14d0e53..5a9edc690e 100644 --- a/pkg/parser/frontmatter_fuzz_test.go +++ b/pkg/parser/frontmatter_fuzz_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/frontmatter_helpers_test.go b/pkg/parser/frontmatter_helpers_test.go index e71d84bd99..78f45321ae 100644 --- a/pkg/parser/frontmatter_helpers_test.go +++ b/pkg/parser/frontmatter_helpers_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/frontmatter_includes_test.go b/pkg/parser/frontmatter_includes_test.go index 5bc987b25e..46ba142166 100644 --- a/pkg/parser/frontmatter_includes_test.go +++ b/pkg/parser/frontmatter_includes_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/frontmatter_mcp_test.go b/pkg/parser/frontmatter_mcp_test.go index 001e05e6a6..e3c18fd98e 100644 --- a/pkg/parser/frontmatter_mcp_test.go +++ b/pkg/parser/frontmatter_mcp_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/frontmatter_merge_test.go b/pkg/parser/frontmatter_merge_test.go index 3d7e65fca8..e0c23c3ef5 100644 --- a/pkg/parser/frontmatter_merge_test.go +++ b/pkg/parser/frontmatter_merge_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/frontmatter_syntax_errors_test.go b/pkg/parser/frontmatter_syntax_errors_test.go index 052cea17eb..78cc6c2b64 100644 --- a/pkg/parser/frontmatter_syntax_errors_test.go +++ b/pkg/parser/frontmatter_syntax_errors_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/frontmatter_utils_test.go b/pkg/parser/frontmatter_utils_test.go index a5c5d9db88..3274543168 100644 --- a/pkg/parser/frontmatter_utils_test.go +++ b/pkg/parser/frontmatter_utils_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/github_urls_test.go b/pkg/parser/github_urls_test.go index 5b8ae95209..6104bb2df6 100644 --- a/pkg/parser/github_urls_test.go +++ b/pkg/parser/github_urls_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/import_cache_integration_test.go b/pkg/parser/import_cache_integration_test.go index d163cd7784..5f6e813b92 100644 --- a/pkg/parser/import_cache_integration_test.go +++ b/pkg/parser/import_cache_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package parser import ( diff --git a/pkg/parser/import_cache_test.go b/pkg/parser/import_cache_test.go index 7f62557886..c30d4224d0 100644 --- a/pkg/parser/import_cache_test.go +++ b/pkg/parser/import_cache_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/import_error_integration_test.go b/pkg/parser/import_error_integration_test.go index 81928f66cb..32f80d15af 100644 --- a/pkg/parser/import_error_integration_test.go +++ b/pkg/parser/import_error_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package parser_test import ( diff --git a/pkg/parser/import_error_test.go b/pkg/parser/import_error_test.go index 25116f0ae7..815e21ec15 100644 --- a/pkg/parser/import_error_test.go +++ b/pkg/parser/import_error_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser_test import ( diff --git a/pkg/parser/import_syntax_test.go b/pkg/parser/import_syntax_test.go index ed87187651..297ec46cbb 100644 --- a/pkg/parser/import_syntax_test.go +++ b/pkg/parser/import_syntax_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/import_topological_test.go b/pkg/parser/import_topological_test.go index 38bf6fe345..a0c56352f0 100644 --- a/pkg/parser/import_topological_test.go +++ b/pkg/parser/import_topological_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser_test import ( diff --git a/pkg/parser/json_path_locator_improvements_test.go b/pkg/parser/json_path_locator_improvements_test.go index 8b5a916c47..f906dab383 100644 --- a/pkg/parser/json_path_locator_improvements_test.go +++ b/pkg/parser/json_path_locator_improvements_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/json_path_locator_test.go b/pkg/parser/json_path_locator_test.go index 8a14e20ce1..2771366b2a 100644 --- a/pkg/parser/json_path_locator_test.go +++ b/pkg/parser/json_path_locator_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/mcp_test.go b/pkg/parser/mcp_test.go index 27976c1e3b..00f3166257 100644 --- a/pkg/parser/mcp_test.go +++ b/pkg/parser/mcp_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/quote_cron_expressions_test.go b/pkg/parser/quote_cron_expressions_test.go index 0c832fad4f..844f9e41fe 100644 --- a/pkg/parser/quote_cron_expressions_test.go +++ b/pkg/parser/quote_cron_expressions_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/runtime_import_fuzz_test.go b/pkg/parser/runtime_import_fuzz_test.go index 4cc3e0ac60..f90e6a50b8 100644 --- a/pkg/parser/runtime_import_fuzz_test.go +++ b/pkg/parser/runtime_import_fuzz_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/runtime_import_test.go b/pkg/parser/runtime_import_test.go index 94aec2bc79..13e718dbd0 100644 --- a/pkg/parser/runtime_import_test.go +++ b/pkg/parser/runtime_import_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/schedule_cron_detection_test.go b/pkg/parser/schedule_cron_detection_test.go index e0fdefacc3..8ea3e57867 100644 --- a/pkg/parser/schedule_cron_detection_test.go +++ b/pkg/parser/schedule_cron_detection_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import "testing" diff --git a/pkg/parser/schedule_fuzzy_scatter_test.go b/pkg/parser/schedule_fuzzy_scatter_test.go index 835877847d..9a0b7e655b 100644 --- a/pkg/parser/schedule_fuzzy_scatter_test.go +++ b/pkg/parser/schedule_fuzzy_scatter_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/schedule_parser_fuzz_test.go b/pkg/parser/schedule_parser_fuzz_test.go index 76b4325bfb..9e3ebe83d4 100644 --- a/pkg/parser/schedule_parser_fuzz_test.go +++ b/pkg/parser/schedule_parser_fuzz_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/schedule_parser_stability_test.go b/pkg/parser/schedule_parser_stability_test.go index d010bfc0ef..ea2eb12aae 100644 --- a/pkg/parser/schedule_parser_stability_test.go +++ b/pkg/parser/schedule_parser_stability_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/schedule_parser_test.go b/pkg/parser/schedule_parser_test.go index 6e01857cf2..cc1a717a37 100644 --- a/pkg/parser/schedule_parser_test.go +++ b/pkg/parser/schedule_parser_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/schedule_time_utils_test.go b/pkg/parser/schedule_time_utils_test.go index 484f8455ca..2efb15fbb4 100644 --- a/pkg/parser/schedule_time_utils_test.go +++ b/pkg/parser/schedule_time_utils_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import "testing" diff --git a/pkg/parser/schema_additional_properties_test.go b/pkg/parser/schema_additional_properties_test.go index 8636c78161..d928202e36 100644 --- a/pkg/parser/schema_additional_properties_test.go +++ b/pkg/parser/schema_additional_properties_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/schema_deprecated_test.go b/pkg/parser/schema_deprecated_test.go index c92a879ddb..59c06c0012 100644 --- a/pkg/parser/schema_deprecated_test.go +++ b/pkg/parser/schema_deprecated_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/schema_location_test.go b/pkg/parser/schema_location_test.go index 309ce98944..72deb3f58b 100644 --- a/pkg/parser/schema_location_test.go +++ b/pkg/parser/schema_location_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/schema_oneof_test.go b/pkg/parser/schema_oneof_test.go index 8fcf36c45b..0a6ffb1b15 100644 --- a/pkg/parser/schema_oneof_test.go +++ b/pkg/parser/schema_oneof_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/schema_strict_documentation_test.go b/pkg/parser/schema_strict_documentation_test.go index b8194daa2d..d1d5624894 100644 --- a/pkg/parser/schema_strict_documentation_test.go +++ b/pkg/parser/schema_strict_documentation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/schema_suggestions_test.go b/pkg/parser/schema_suggestions_test.go index 915dd2d136..ef43717b52 100644 --- a/pkg/parser/schema_suggestions_test.go +++ b/pkg/parser/schema_suggestions_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/schema_test.go b/pkg/parser/schema_test.go index fa2bb09502..e41e6c213e 100644 --- a/pkg/parser/schema_test.go +++ b/pkg/parser/schema_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/schema_utilities_test.go b/pkg/parser/schema_utilities_test.go index b3d1dabea8..67e43cac46 100644 --- a/pkg/parser/schema_utilities_test.go +++ b/pkg/parser/schema_utilities_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/schema_validation_test.go b/pkg/parser/schema_validation_test.go index 7629778eb2..f189646148 100644 --- a/pkg/parser/schema_validation_test.go +++ b/pkg/parser/schema_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/parser/yaml_error_test.go b/pkg/parser/yaml_error_test.go index 41f145067b..78c3847e8b 100644 --- a/pkg/parser/yaml_error_test.go +++ b/pkg/parser/yaml_error_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package parser import ( diff --git a/pkg/repoutil/repoutil_test.go b/pkg/repoutil/repoutil_test.go index 40a1c29e0c..b524f6bd60 100644 --- a/pkg/repoutil/repoutil_test.go +++ b/pkg/repoutil/repoutil_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package repoutil import "testing" diff --git a/pkg/sliceutil/sliceutil_test.go b/pkg/sliceutil/sliceutil_test.go index 37706b4c58..a725235603 100644 --- a/pkg/sliceutil/sliceutil_test.go +++ b/pkg/sliceutil/sliceutil_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package sliceutil import ( diff --git a/pkg/stringutil/identifiers_test.go b/pkg/stringutil/identifiers_test.go index 1dddf4b8cf..d8ab5ce7c1 100644 --- a/pkg/stringutil/identifiers_test.go +++ b/pkg/stringutil/identifiers_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package stringutil import ( diff --git a/pkg/stringutil/paths_test.go b/pkg/stringutil/paths_test.go index f0141ffa8b..daae07c970 100644 --- a/pkg/stringutil/paths_test.go +++ b/pkg/stringutil/paths_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package stringutil import "testing" diff --git a/pkg/stringutil/sanitize_test.go b/pkg/stringutil/sanitize_test.go index e850c4920e..d06ac628c6 100644 --- a/pkg/stringutil/sanitize_test.go +++ b/pkg/stringutil/sanitize_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package stringutil import ( diff --git a/pkg/stringutil/stringutil_test.go b/pkg/stringutil/stringutil_test.go index 4057542aa7..f2efd9c694 100644 --- a/pkg/stringutil/stringutil_test.go +++ b/pkg/stringutil/stringutil_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package stringutil import ( diff --git a/pkg/stringutil/urls_test.go b/pkg/stringutil/urls_test.go index 4d165d0c08..00d881ab88 100644 --- a/pkg/stringutil/urls_test.go +++ b/pkg/stringutil/urls_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package stringutil import ( diff --git a/pkg/styles/theme_test.go b/pkg/styles/theme_test.go index 5359a65536..241d544754 100644 --- a/pkg/styles/theme_test.go +++ b/pkg/styles/theme_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package styles import ( diff --git a/pkg/testutil/tempdir_test.go b/pkg/testutil/tempdir_test.go index ad9787b42f..843ec336ad 100644 --- a/pkg/testutil/tempdir_test.go +++ b/pkg/testutil/tempdir_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package testutil_test import ( diff --git a/pkg/timeutil/format_test.go b/pkg/timeutil/format_test.go index be470198a7..bfdba47593 100644 --- a/pkg/timeutil/format_test.go +++ b/pkg/timeutil/format_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package timeutil import ( diff --git a/pkg/workflow/action_cache_test.go b/pkg/workflow/action_cache_test.go index 701aede1f8..c6cf1f3202 100644 --- a/pkg/workflow/action_cache_test.go +++ b/pkg/workflow/action_cache_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/action_pins_logging_test.go b/pkg/workflow/action_pins_logging_test.go index f0d07266ec..1475b95c7b 100644 --- a/pkg/workflow/action_pins_logging_test.go +++ b/pkg/workflow/action_pins_logging_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/action_pins_test.go b/pkg/workflow/action_pins_test.go index a201eb5ae2..4bcdd18b8e 100644 --- a/pkg/workflow/action_pins_test.go +++ b/pkg/workflow/action_pins_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/action_reference_test.go b/pkg/workflow/action_reference_test.go index 470a95ef35..bab6e9c14f 100644 --- a/pkg/workflow/action_reference_test.go +++ b/pkg/workflow/action_reference_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/action_resolver_test.go b/pkg/workflow/action_resolver_test.go index cb94510e8f..082ac17644 100644 --- a/pkg/workflow/action_resolver_test.go +++ b/pkg/workflow/action_resolver_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/action_sha_checker_test.go b/pkg/workflow/action_sha_checker_test.go index 6de4c9309e..570d0ae6fc 100644 --- a/pkg/workflow/action_sha_checker_test.go +++ b/pkg/workflow/action_sha_checker_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/action_sha_validation_test.go b/pkg/workflow/action_sha_validation_test.go index 8bdac0cbcf..a3cbb5373a 100644 --- a/pkg/workflow/action_sha_validation_test.go +++ b/pkg/workflow/action_sha_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/add_comment_dependencies_test.go b/pkg/workflow/add_comment_dependencies_test.go index 52a39d8127..aff34b80d8 100644 --- a/pkg/workflow/add_comment_dependencies_test.go +++ b/pkg/workflow/add_comment_dependencies_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/add_comment_target_repo_integration_test.go b/pkg/workflow/add_comment_target_repo_integration_test.go index 3a60133ab1..cf16a61f46 100644 --- a/pkg/workflow/add_comment_target_repo_integration_test.go +++ b/pkg/workflow/add_comment_target_repo_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package workflow import ( diff --git a/pkg/workflow/add_comment_target_repo_test.go b/pkg/workflow/add_comment_target_repo_test.go index b788490a58..0d4feae180 100644 --- a/pkg/workflow/add_comment_target_repo_test.go +++ b/pkg/workflow/add_comment_target_repo_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/agentic_engine_interfaces_test.go b/pkg/workflow/agentic_engine_interfaces_test.go index 48e2456d68..888f711f12 100644 --- a/pkg/workflow/agentic_engine_interfaces_test.go +++ b/pkg/workflow/agentic_engine_interfaces_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/agentic_engine_test.go b/pkg/workflow/agentic_engine_test.go index 50a4c02a07..8933cccad0 100644 --- a/pkg/workflow/agentic_engine_test.go +++ b/pkg/workflow/agentic_engine_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/agentic_output_test.go b/pkg/workflow/agentic_output_test.go index 8b876d97fc..7b15fceedb 100644 --- a/pkg/workflow/agentic_output_test.go +++ b/pkg/workflow/agentic_output_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/agentic_workflow_test.go b/pkg/workflow/agentic_workflow_test.go index 12d762427e..ae9eac4202 100644 --- a/pkg/workflow/agentic_workflow_test.go +++ b/pkg/workflow/agentic_workflow_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/allow_github_references_test.go b/pkg/workflow/allow_github_references_test.go index 6f1f85d2ef..fc7921cdc4 100644 --- a/pkg/workflow/allow_github_references_test.go +++ b/pkg/workflow/allow_github_references_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/args_field_test.go b/pkg/workflow/args_field_test.go index 2d44294a49..85655e359d 100644 --- a/pkg/workflow/args_field_test.go +++ b/pkg/workflow/args_field_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/artifact_manager_test.go b/pkg/workflow/artifact_manager_test.go index d5a148b3ee..9cff97b0d7 100644 --- a/pkg/workflow/artifact_manager_test.go +++ b/pkg/workflow/artifact_manager_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/artifact_manager_workflows_test.go b/pkg/workflow/artifact_manager_workflows_test.go deleted file mode 100644 index 13d11a5024..0000000000 --- a/pkg/workflow/artifact_manager_workflows_test.go +++ /dev/null @@ -1,566 +0,0 @@ -//go:build integration - -package workflow - -import ( - "fmt" - "os" - "path/filepath" - "sort" - "strings" - "testing" - - "github.com/githubnext/gh-aw/pkg/stringutil" - - "github.com/goccy/go-yaml" - "github.com/stretchr/testify/require" -) - -// JobArtifacts holds upload and download information for a job -type JobArtifacts struct { - Uploads []*ArtifactUpload - Downloads []*ArtifactDownload -} - -// TestGenerateArtifactsReference compiles all agentic workflows and generates -// a reference document mapping artifacts to file paths per job. -// This document is meant to be used by agents to generate file paths in JavaScript and Go. -func TestGenerateArtifactsReference(t *testing.T) { - // Find all workflow markdown files - workflowsDir := filepath.Join("..", "..", ".github", "workflows") - entries, err := os.ReadDir(workflowsDir) - require.NoError(t, err, "Failed to read workflows directory") - - // Collect workflow files (exclude campaign files and lock files) - var workflowFiles []string - for _, entry := range entries { - if entry.IsDir() { - continue - } - name := entry.Name() - if strings.HasSuffix(name, ".md") && - !strings.HasSuffix(name, ".lock.yml") && - !strings.Contains(name, ".campaign.") { - workflowFiles = append(workflowFiles, filepath.Join(workflowsDir, name)) - } - } - - t.Logf("Found %d workflow files to process", len(workflowFiles)) - - // Map to store artifacts per workflow - workflowArtifacts := make(map[string]map[string]*JobArtifacts) // workflow -> job -> artifacts - - // Compile each workflow and extract artifact information - // Use dry-run mode (noEmit) so we don't write lock.yml files - compiler := NewCompiler() - compiler.SetNoEmit(true) // Enable dry-run mode - validate without generating lock files - successCount := 0 - - for _, workflowPath := range workflowFiles { - workflowName := filepath.Base(workflowPath) - - // Parse the workflow - workflowData, err := compiler.ParseWorkflowFile(workflowPath) - if err != nil { - t.Logf("Warning: Failed to parse %s: %v", workflowName, err) - continue - } - - // Try to compile the workflow - err = compiler.CompileWorkflowData(workflowData, workflowPath) - if err != nil { - // Some workflows may fail compilation for various reasons (missing permissions, etc.) - // We'll skip these for the artifact analysis - t.Logf("Warning: Failed to compile %s: %v", workflowName, err) - continue - } - - // Read the compiled lock file to extract artifact information - lockPath := stringutil.MarkdownToLockFile(workflowPath) - lockContent, err := os.ReadFile(lockPath) - if err != nil { - t.Logf("Warning: Failed to read lock file for %s: %v", workflowName, err) - continue - } - - // Parse the lock file to extract artifact steps - jobs := extractArtifactsFromYAML(string(lockContent), workflowName, t) - - if len(jobs) > 0 { - workflowArtifacts[workflowName] = jobs - successCount++ - } - } - - t.Logf("Successfully analyzed %d workflows with artifacts", successCount) - - // Build a global summary of artifacts by job name - artifactsByJob := buildArtifactsSummary(workflowArtifacts) - - // Generate the markdown reference document - markdown := generateArtifactsMarkdown(workflowArtifacts, artifactsByJob) - - // Write to specs/artifacts.md - specsDir := filepath.Join("..", "..", "specs") - err = os.MkdirAll(specsDir, 0755) - require.NoError(t, err, "Failed to create specs directory") - - artifactsPath := filepath.Join(specsDir, "artifacts.md") - err = os.WriteFile(artifactsPath, []byte(markdown), 0644) - require.NoError(t, err, "Failed to write artifacts.md") - - t.Logf("Generated artifacts reference at %s", artifactsPath) -} - -// extractArtifactsFromYAML parses compiled YAML and extracts artifact upload/download information -func extractArtifactsFromYAML(yamlContent string, workflowName string, t *testing.T) map[string]*JobArtifacts { - // Parse YAML - var workflow map[string]interface{} - err := yaml.Unmarshal([]byte(yamlContent), &workflow) - if err != nil { - t.Logf("Warning: Failed to parse YAML for %s: %v", workflowName, err) - return nil - } - - // Get jobs - jobsRaw, ok := workflow["jobs"].(map[string]interface{}) - if !ok { - return nil - } - - result := make(map[string]*JobArtifacts) - - for jobName, jobDataRaw := range jobsRaw { - jobData, ok := jobDataRaw.(map[string]interface{}) - if !ok { - continue - } - - steps, ok := jobData["steps"].([]interface{}) - if !ok { - continue - } - - jobArtifacts := &JobArtifacts{} - hasArtifacts := false - - for _, stepRaw := range steps { - step, ok := stepRaw.(map[string]interface{}) - if !ok { - continue - } - - uses, ok := step["uses"].(string) - if !ok { - continue - } - - // Check for upload-artifact - if strings.Contains(uses, "actions/upload-artifact@") { - upload := &ArtifactUpload{ - JobName: jobName, - } - - // Extract 'with' parameters - withParams, ok := step["with"].(map[string]interface{}) - if ok { - if name, ok := withParams["name"].(string); ok { - upload.Name = name - } - // Handle path which could be a string or multiline string - if pathStr, ok := withParams["path"].(string); ok { - // Split by newlines and trim whitespace - lines := strings.Split(pathStr, "\n") - for _, line := range lines { - line = strings.TrimSpace(line) - if line != "" { - upload.Paths = append(upload.Paths, line) - } - } - } - } - - if upload.Name != "" { - jobArtifacts.Uploads = append(jobArtifacts.Uploads, upload) - hasArtifacts = true - } - } - - // Check for download-artifact - if strings.Contains(uses, "actions/download-artifact@") { - download := &ArtifactDownload{ - JobName: jobName, - } - - // Extract 'with' parameters - withParams, ok := step["with"].(map[string]interface{}) - if ok { - if name, ok := withParams["name"].(string); ok { - download.Name = name - } - if pattern, ok := withParams["pattern"].(string); ok { - download.Pattern = pattern - } - if pathStr, ok := withParams["path"].(string); ok { - download.Path = pathStr - } - if merge, ok := withParams["merge-multiple"].(bool); ok { - download.MergeMultiple = merge - } - } - - // Try to infer dependencies from job needs - if needs, ok := jobData["needs"].([]interface{}); ok { - for _, need := range needs { - if needStr, ok := need.(string); ok { - download.DependsOn = append(download.DependsOn, needStr) - } - } - } else if needStr, ok := jobData["needs"].(string); ok { - download.DependsOn = []string{needStr} - } - - if download.Name != "" || download.Pattern != "" { - jobArtifacts.Downloads = append(jobArtifacts.Downloads, download) - hasArtifacts = true - } - } - } - - if hasArtifacts { - result[jobName] = jobArtifacts - } - } - - return result -} - -// ArtifactSummary holds merged artifact information for a job across all workflows -type ArtifactSummary struct { - JobName string - Uploads map[string]*ArtifactUploadInfo // artifact name -> upload info - Downloads map[string]*ArtifactDownloadInfo // artifact name/pattern -> download info -} - -// ArtifactUploadInfo holds merged upload information -type ArtifactUploadInfo struct { - ArtifactName string - Paths map[string]bool // unique paths across all workflows - Workflows []string // workflows that upload this artifact -} - -// ArtifactDownloadInfo holds merged download information -type ArtifactDownloadInfo struct { - Identifier string // artifact name or pattern - DownloadPaths map[string]bool // unique download paths - Workflows []string // workflows that download this - MergeMultiple bool -} - -// buildArtifactsSummary creates a summary of artifacts by job name, merging duplicates -func buildArtifactsSummary(workflowArtifacts map[string]map[string]*JobArtifacts) map[string]*ArtifactSummary { - summary := make(map[string]*ArtifactSummary) - - for workflowName, jobs := range workflowArtifacts { - for jobName, artifacts := range jobs { - // Get or create job summary - if summary[jobName] == nil { - summary[jobName] = &ArtifactSummary{ - JobName: jobName, - Uploads: make(map[string]*ArtifactUploadInfo), - Downloads: make(map[string]*ArtifactDownloadInfo), - } - } - jobSummary := summary[jobName] - - // Merge uploads - for _, upload := range artifacts.Uploads { - if upload.Name == "" { - continue - } - - if jobSummary.Uploads[upload.Name] == nil { - jobSummary.Uploads[upload.Name] = &ArtifactUploadInfo{ - ArtifactName: upload.Name, - Paths: make(map[string]bool), - Workflows: []string{}, - } - } - uploadInfo := jobSummary.Uploads[upload.Name] - - // Add paths - for _, path := range upload.Paths { - uploadInfo.Paths[path] = true - } - - // Add workflow if not already present - if !artifactContainsWorkflow(uploadInfo.Workflows, workflowName) { - uploadInfo.Workflows = append(uploadInfo.Workflows, workflowName) - } - } - - // Merge downloads - for _, download := range artifacts.Downloads { - identifier := download.Name - if identifier == "" { - identifier = download.Pattern - } - if identifier == "" { - continue - } - - if jobSummary.Downloads[identifier] == nil { - jobSummary.Downloads[identifier] = &ArtifactDownloadInfo{ - Identifier: identifier, - DownloadPaths: make(map[string]bool), - Workflows: []string{}, - MergeMultiple: download.MergeMultiple, - } - } - downloadInfo := jobSummary.Downloads[identifier] - - // Add download path - if download.Path != "" { - downloadInfo.DownloadPaths[download.Path] = true - } - - // Add workflow if not already present - if !artifactContainsWorkflow(downloadInfo.Workflows, workflowName) { - downloadInfo.Workflows = append(downloadInfo.Workflows, workflowName) - } - } - } - } - - return summary -} - -// artifactContainsWorkflow checks if a string slice contains a value -func artifactContainsWorkflow(slice []string, value string) bool { - for _, item := range slice { - if item == value { - return true - } - } - return false -} - -// generateArtifactsMarkdown generates a markdown document with artifact information -func generateArtifactsMarkdown(workflowArtifacts map[string]map[string]*JobArtifacts, artifactsByJob map[string]*ArtifactSummary) string { - var sb strings.Builder - - sb.WriteString("\n\n") - sb.WriteString("# Artifact File Locations Reference\n\n") - sb.WriteString("This document provides a reference for artifact file locations across all agentic workflows.\n") - sb.WriteString("It is generated automatically and meant to be used by agents when generating file paths in JavaScript and Go code.\n\n") - sb.WriteString("## Overview\n\n") - sb.WriteString("When artifacts are uploaded, GitHub Actions strips the common parent directory from file paths.\n") - sb.WriteString("When artifacts are downloaded, files are extracted based on the download mode:\n\n") - sb.WriteString("- **Download by name**: Files extracted directly to `path/` (e.g., `path/file.txt`)\n") - sb.WriteString("- **Download by pattern (no merge)**: Files in `path/artifact-name/` (e.g., `path/artifact-1/file.txt`)\n") - sb.WriteString("- **Download by pattern (merge)**: Files extracted directly to `path/` (e.g., `path/file.txt`)\n\n") - - // Add summary section - sb.WriteString("## Summary by Job\n\n") - sb.WriteString("This section provides an overview of artifacts organized by job name, with duplicates merged across workflows.\n\n") - - // Sort job names for consistent output - jobNames := make([]string, 0, len(artifactsByJob)) - for jobName := range artifactsByJob { - jobNames = append(jobNames, jobName) - } - sort.Strings(jobNames) - - for _, jobName := range jobNames { - summary := artifactsByJob[jobName] - - fmt.Fprintf(&sb, "### Job: `%s`\n\n", jobName) - - // Uploads summary - if len(summary.Uploads) > 0 { - sb.WriteString("**Artifacts Uploaded:**\n\n") - - // Sort artifact names - uploadNames := make([]string, 0, len(summary.Uploads)) - for name := range summary.Uploads { - uploadNames = append(uploadNames, name) - } - sort.Strings(uploadNames) - - for _, name := range uploadNames { - info := summary.Uploads[name] - fmt.Fprintf(&sb, "- `%s`\n", info.ArtifactName) - - // Sort and list paths - paths := make([]string, 0, len(info.Paths)) - for path := range info.Paths { - paths = append(paths, path) - } - sort.Strings(paths) - - sb.WriteString(" - **Paths**: ") - for i, path := range paths { - if i > 0 { - sb.WriteString(", ") - } - fmt.Fprintf(&sb, "`%s`", path) - } - sb.WriteString("\n") - - // Sort and list workflows - sort.Strings(info.Workflows) - fmt.Fprintf(&sb, " - **Used in**: %d workflow(s) - %s\n", len(info.Workflows), strings.Join(info.Workflows, ", ")) - } - sb.WriteString("\n") - } - - // Downloads summary - if len(summary.Downloads) > 0 { - sb.WriteString("**Artifacts Downloaded:**\n\n") - - // Sort identifiers - downloadIds := make([]string, 0, len(summary.Downloads)) - for id := range summary.Downloads { - downloadIds = append(downloadIds, id) - } - sort.Strings(downloadIds) - - for _, id := range downloadIds { - info := summary.Downloads[id] - fmt.Fprintf(&sb, "- `%s`\n", info.Identifier) - - // Sort and list download paths - paths := make([]string, 0, len(info.DownloadPaths)) - for path := range info.DownloadPaths { - paths = append(paths, path) - } - sort.Strings(paths) - - sb.WriteString(" - **Download paths**: ") - for i, path := range paths { - if i > 0 { - sb.WriteString(", ") - } - fmt.Fprintf(&sb, "`%s`", path) - } - sb.WriteString("\n") - - // Sort and list workflows - sort.Strings(info.Workflows) - fmt.Fprintf(&sb, " - **Used in**: %d workflow(s) - %s\n", len(info.Workflows), strings.Join(info.Workflows, ", ")) - } - sb.WriteString("\n") - } - } - - sb.WriteString("## Workflows\n\n") - - // Sort workflow names for consistent output - workflowNames := make([]string, 0, len(workflowArtifacts)) - for name := range workflowArtifacts { - workflowNames = append(workflowNames, name) - } - sort.Strings(workflowNames) - - for _, workflowName := range workflowNames { - jobs := workflowArtifacts[workflowName] - - fmt.Fprintf(&sb, "### %s\n\n", workflowName) - - // Sort job names - jobNames := make([]string, 0, len(jobs)) - for jobName := range jobs { - jobNames = append(jobNames, jobName) - } - sort.Strings(jobNames) - - for _, jobName := range jobNames { - artifacts := jobs[jobName] - - fmt.Fprintf(&sb, "#### Job: `%s`\n\n", jobName) - - // Uploads - if len(artifacts.Uploads) > 0 { - sb.WriteString("**Uploads:**\n\n") - for _, upload := range artifacts.Uploads { - fmt.Fprintf(&sb, "- **Artifact**: `%s`\n", upload.Name) - sb.WriteString(" - **Upload paths**:\n") - for _, path := range upload.Paths { - fmt.Fprintf(&sb, " - `%s`\n", path) - } - - if len(upload.NormalizedPaths) > 0 { - sb.WriteString(" - **Paths in artifact** (after common parent stripping):\n") - - // Sort normalized paths for consistent output - var normalizedKeys []string - for key := range upload.NormalizedPaths { - normalizedKeys = append(normalizedKeys, key) - } - sort.Strings(normalizedKeys) - - for _, key := range normalizedKeys { - normalizedPath := upload.NormalizedPaths[key] - fmt.Fprintf(&sb, " - `%s` → `%s`\n", key, normalizedPath) - } - } - sb.WriteString("\n") - } - } - - // Downloads - if len(artifacts.Downloads) > 0 { - sb.WriteString("**Downloads:**\n\n") - for _, download := range artifacts.Downloads { - if download.Name != "" { - fmt.Fprintf(&sb, "- **Artifact**: `%s` (by name)\n", download.Name) - } else if download.Pattern != "" { - fmt.Fprintf(&sb, "- **Pattern**: `%s`", download.Pattern) - if download.MergeMultiple { - sb.WriteString(" (merge-multiple: true)\n") - } else { - sb.WriteString(" (merge-multiple: false)\n") - } - } - fmt.Fprintf(&sb, " - **Download path**: `%s`\n", download.Path) - if len(download.DependsOn) > 0 { - fmt.Fprintf(&sb, " - **Depends on jobs**: %v\n", download.DependsOn) - } - sb.WriteString("\n") - } - } - } - } - - sb.WriteString("## Usage Examples\n\n") - sb.WriteString("### JavaScript (actions/github-script)\n\n") - sb.WriteString("```javascript\n") - sb.WriteString("// Reading a file from a downloaded artifact\n") - sb.WriteString("const fs = require('fs');\n") - sb.WriteString("const path = require('path');\n\n") - sb.WriteString("// If artifact 'build-output' was downloaded to '/tmp/artifacts'\n") - sb.WriteString("// and contains 'dist/app.js' (after common parent stripping)\n") - sb.WriteString("const filePath = path.join('/tmp/artifacts', 'dist', 'app.js');\n") - sb.WriteString("const content = fs.readFileSync(filePath, 'utf8');\n") - sb.WriteString("```\n\n") - sb.WriteString("### Go\n\n") - sb.WriteString("```go\n") - sb.WriteString("// Reading a file from a downloaded artifact\n") - sb.WriteString("import (\n") - sb.WriteString(" \"os\"\n") - sb.WriteString(" \"path/filepath\"\n") - sb.WriteString(")\n\n") - sb.WriteString("// If artifact 'build-output' was downloaded to '/tmp/artifacts'\n") - sb.WriteString("// and contains 'dist/app.js' (after common parent stripping)\n") - sb.WriteString("filePath := filepath.Join(\"/tmp/artifacts\", \"dist\", \"app.js\")\n") - sb.WriteString("content, err := os.ReadFile(filePath)\n") - sb.WriteString("```\n\n") - sb.WriteString("## Notes\n\n") - sb.WriteString("- This document is auto-generated from workflow analysis\n") - sb.WriteString("- Actual file paths may vary based on the workflow execution context\n") - sb.WriteString("- Always verify file existence before reading in production code\n") - sb.WriteString("- Common parent directories are automatically stripped during upload\n") - sb.WriteString("- Use `ComputeDownloadPath()` from the artifact manager for accurate path computation\n") - - return sb.String() -} diff --git a/pkg/workflow/aw_info_agent_version_test.go b/pkg/workflow/aw_info_agent_version_test.go index fc8a9bd134..f0336e021f 100644 --- a/pkg/workflow/aw_info_agent_version_test.go +++ b/pkg/workflow/aw_info_agent_version_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/aw_info_tmp_test.go b/pkg/workflow/aw_info_tmp_test.go index dea30f80f8..8dfcfc9913 100644 --- a/pkg/workflow/aw_info_tmp_test.go +++ b/pkg/workflow/aw_info_tmp_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/aw_info_versions_test.go b/pkg/workflow/aw_info_versions_test.go index a6a6c79cbd..e4b90ef081 100644 --- a/pkg/workflow/aw_info_versions_test.go +++ b/pkg/workflow/aw_info_versions_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/bash_defaults_consistency_test.go b/pkg/workflow/bash_defaults_consistency_test.go index 51ef3f75f7..fe09eaf873 100644 --- a/pkg/workflow/bash_defaults_consistency_test.go +++ b/pkg/workflow/bash_defaults_consistency_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/bash_merge_test.go b/pkg/workflow/bash_merge_test.go index 48e4c2acbb..f5ab13f054 100644 --- a/pkg/workflow/bash_merge_test.go +++ b/pkg/workflow/bash_merge_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/bots_test.go b/pkg/workflow/bots_test.go index 5d25f4ec02..ff80c9e4e4 100644 --- a/pkg/workflow/bots_test.go +++ b/pkg/workflow/bots_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/branch_normalize_integration_test.go b/pkg/workflow/branch_normalize_integration_test.go index 8d6d7a2424..e92279ae77 100644 --- a/pkg/workflow/branch_normalize_integration_test.go +++ b/pkg/workflow/branch_normalize_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package workflow import ( diff --git a/pkg/workflow/bundler_deduplicate_test.go b/pkg/workflow/bundler_deduplicate_test.go index fc7492a216..cecf32640b 100644 --- a/pkg/workflow/bundler_deduplicate_test.go +++ b/pkg/workflow/bundler_deduplicate_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/bundler_duplicate_modules_test.go b/pkg/workflow/bundler_duplicate_modules_test.go index 7f65e40d1b..9d3387606e 100644 --- a/pkg/workflow/bundler_duplicate_modules_test.go +++ b/pkg/workflow/bundler_duplicate_modules_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/bundler_file_mode_test.go b/pkg/workflow/bundler_file_mode_test.go index d057e90f81..12df187178 100644 --- a/pkg/workflow/bundler_file_mode_test.go +++ b/pkg/workflow/bundler_file_mode_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/bundler_fs_undefined_test.go b/pkg/workflow/bundler_fs_undefined_test.go index 8b4badd1c4..991b24f944 100644 --- a/pkg/workflow/bundler_fs_undefined_test.go +++ b/pkg/workflow/bundler_fs_undefined_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/bundler_function_scope_test.go b/pkg/workflow/bundler_function_scope_test.go index ff66e6be46..c00a186c8d 100644 --- a/pkg/workflow/bundler_function_scope_test.go +++ b/pkg/workflow/bundler_function_scope_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/bundler_indentation_test.go b/pkg/workflow/bundler_indentation_test.go index 8d053645de..58a0d4e3c8 100644 --- a/pkg/workflow/bundler_indentation_test.go +++ b/pkg/workflow/bundler_indentation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/bundler_inline_test.go b/pkg/workflow/bundler_inline_test.go index 8d2528655c..08a1393314 100644 --- a/pkg/workflow/bundler_inline_test.go +++ b/pkg/workflow/bundler_inline_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/bundler_integration_test.go b/pkg/workflow/bundler_integration_test.go index 844b771246..a3419fe355 100644 --- a/pkg/workflow/bundler_integration_test.go +++ b/pkg/workflow/bundler_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package workflow import ( diff --git a/pkg/workflow/bundler_quotes_test.go b/pkg/workflow/bundler_quotes_test.go index d27ca53971..a502c1b527 100644 --- a/pkg/workflow/bundler_quotes_test.go +++ b/pkg/workflow/bundler_quotes_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/bundler_runtime_mode_test.go b/pkg/workflow/bundler_runtime_mode_test.go index c0cdaa6cb8..43c9e8f9d9 100644 --- a/pkg/workflow/bundler_runtime_mode_test.go +++ b/pkg/workflow/bundler_runtime_mode_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/bundler_scope_mixing_test.go b/pkg/workflow/bundler_scope_mixing_test.go index 2af78f132f..bc404d7aee 100644 --- a/pkg/workflow/bundler_scope_mixing_test.go +++ b/pkg/workflow/bundler_scope_mixing_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/bundler_scope_narrowing_test.go b/pkg/workflow/bundler_scope_narrowing_test.go index 6497514fe5..e03b010ea1 100644 --- a/pkg/workflow/bundler_scope_narrowing_test.go +++ b/pkg/workflow/bundler_scope_narrowing_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/bundler_script_validation_test.go b/pkg/workflow/bundler_script_validation_test.go index 1053546873..e9f767f315 100644 --- a/pkg/workflow/bundler_script_validation_test.go +++ b/pkg/workflow/bundler_script_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/bundler_test.go b/pkg/workflow/bundler_test.go index 6c5bd13fd2..7f11094316 100644 --- a/pkg/workflow/bundler_test.go +++ b/pkg/workflow/bundler_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/cache_memory_import_test.go b/pkg/workflow/cache_memory_import_test.go index 40786b5b5b..6362c335ba 100644 --- a/pkg/workflow/cache_memory_import_test.go +++ b/pkg/workflow/cache_memory_import_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/cache_memory_prompt_test.go b/pkg/workflow/cache_memory_prompt_test.go index eb3848d00b..0f1b92f6b4 100644 --- a/pkg/workflow/cache_memory_prompt_test.go +++ b/pkg/workflow/cache_memory_prompt_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/cache_memory_syntax_test.go b/pkg/workflow/cache_memory_syntax_test.go index f2b127e922..29814b08db 100644 --- a/pkg/workflow/cache_memory_syntax_test.go +++ b/pkg/workflow/cache_memory_syntax_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/cache_retention_days_validation_test.go b/pkg/workflow/cache_retention_days_validation_test.go index a7d7a22822..fffbc7aeff 100644 --- a/pkg/workflow/cache_retention_days_validation_test.go +++ b/pkg/workflow/cache_retention_days_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/campaign_trigger_test.go b/pkg/workflow/campaign_trigger_test.go index 6fe6b78a54..5ad6f77a84 100644 --- a/pkg/workflow/campaign_trigger_test.go +++ b/pkg/workflow/campaign_trigger_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/check_workflow_timestamp_js_test.go b/pkg/workflow/check_workflow_timestamp_js_test.go index 905fc93673..26e71978ae 100644 --- a/pkg/workflow/check_workflow_timestamp_js_test.go +++ b/pkg/workflow/check_workflow_timestamp_js_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/checkout_runtime_order_test.go b/pkg/workflow/checkout_runtime_order_test.go index 260c8cea02..d6cb15a8e5 100644 --- a/pkg/workflow/checkout_runtime_order_test.go +++ b/pkg/workflow/checkout_runtime_order_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/cjs_require_validation_test.go b/pkg/workflow/cjs_require_validation_test.go index 011fd0ef25..1566a88721 100644 --- a/pkg/workflow/cjs_require_validation_test.go +++ b/pkg/workflow/cjs_require_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/claude_engine_network_test.go b/pkg/workflow/claude_engine_network_test.go index d55a6a570d..bdc5d5c15d 100644 --- a/pkg/workflow/claude_engine_network_test.go +++ b/pkg/workflow/claude_engine_network_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/claude_engine_test.go b/pkg/workflow/claude_engine_test.go index b5c7a8e498..9aebc3ef58 100644 --- a/pkg/workflow/claude_engine_test.go +++ b/pkg/workflow/claude_engine_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/claude_engine_tools_test.go b/pkg/workflow/claude_engine_tools_test.go index 601eec94c9..0c5058a16b 100644 --- a/pkg/workflow/claude_engine_tools_test.go +++ b/pkg/workflow/claude_engine_tools_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/codex_engine_test.go b/pkg/workflow/codex_engine_test.go index 4273902b02..339db3ccf5 100644 --- a/pkg/workflow/codex_engine_test.go +++ b/pkg/workflow/codex_engine_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/codex_logs_test.go b/pkg/workflow/codex_logs_test.go index b2bb8b84e0..c7b4d4ffe5 100644 --- a/pkg/workflow/codex_logs_test.go +++ b/pkg/workflow/codex_logs_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/codex_playwright_test.go b/pkg/workflow/codex_playwright_test.go index e020174cee..c58337a196 100644 --- a/pkg/workflow/codex_playwright_test.go +++ b/pkg/workflow/codex_playwright_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/codex_test.go b/pkg/workflow/codex_test.go index d40b8ffba4..932bdc72d9 100644 --- a/pkg/workflow/codex_test.go +++ b/pkg/workflow/codex_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/codex_total_tokens_test.go b/pkg/workflow/codex_total_tokens_test.go index 44af1408f0..77b5ee4610 100644 --- a/pkg/workflow/codex_total_tokens_test.go +++ b/pkg/workflow/codex_total_tokens_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/collect_packages_test.go b/pkg/workflow/collect_packages_test.go index fb24131840..3813a6d2df 100644 --- a/pkg/workflow/collect_packages_test.go +++ b/pkg/workflow/collect_packages_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/command_precision_test.go b/pkg/workflow/command_precision_test.go index 511b54b25d..4b697d890e 100644 --- a/pkg/workflow/command_precision_test.go +++ b/pkg/workflow/command_precision_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/command_test.go b/pkg/workflow/command_test.go index 7e7628c83d..5157957c5c 100644 --- a/pkg/workflow/command_test.go +++ b/pkg/workflow/command_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/comment_env_vars_conditional_test.go b/pkg/workflow/comment_env_vars_conditional_test.go index 8877a9d0ff..5c65ba16aa 100644 --- a/pkg/workflow/comment_env_vars_conditional_test.go +++ b/pkg/workflow/comment_env_vars_conditional_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/comment_test.go b/pkg/workflow/comment_test.go index 70a1d3582d..dec6d005c7 100644 --- a/pkg/workflow/comment_test.go +++ b/pkg/workflow/comment_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compile_config_test.go b/pkg/workflow/compile_config_test.go index 3df8c22124..9753e05954 100644 --- a/pkg/workflow/compile_config_test.go +++ b/pkg/workflow/compile_config_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compile_outputs_allowed_labels_test.go b/pkg/workflow/compile_outputs_allowed_labels_test.go index a03406c267..f4a673c1eb 100644 --- a/pkg/workflow/compile_outputs_allowed_labels_test.go +++ b/pkg/workflow/compile_outputs_allowed_labels_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compile_outputs_comment_test.go b/pkg/workflow/compile_outputs_comment_test.go index a646c1587f..00dc45e626 100644 --- a/pkg/workflow/compile_outputs_comment_test.go +++ b/pkg/workflow/compile_outputs_comment_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compile_outputs_issue_test.go b/pkg/workflow/compile_outputs_issue_test.go index dc7e67c006..eb9c03c2b2 100644 --- a/pkg/workflow/compile_outputs_issue_test.go +++ b/pkg/workflow/compile_outputs_issue_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compile_outputs_label_test.go b/pkg/workflow/compile_outputs_label_test.go index a1d3ab1c2c..736d494398 100644 --- a/pkg/workflow/compile_outputs_label_test.go +++ b/pkg/workflow/compile_outputs_label_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compile_outputs_pr_test.go b/pkg/workflow/compile_outputs_pr_test.go index a105520593..1a894eb38f 100644 --- a/pkg/workflow/compile_outputs_pr_test.go +++ b/pkg/workflow/compile_outputs_pr_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compiler_activation_jobs_test.go b/pkg/workflow/compiler_activation_jobs_test.go index 69d474270c..308e13c5aa 100644 --- a/pkg/workflow/compiler_activation_jobs_test.go +++ b/pkg/workflow/compiler_activation_jobs_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compiler_additional_simple_test.go b/pkg/workflow/compiler_additional_simple_test.go index 126f23fe67..e6f3d7e64b 100644 --- a/pkg/workflow/compiler_additional_simple_test.go +++ b/pkg/workflow/compiler_additional_simple_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compiler_artifacts_test.go b/pkg/workflow/compiler_artifacts_test.go index 94f3a109a6..c1179e2d13 100644 --- a/pkg/workflow/compiler_artifacts_test.go +++ b/pkg/workflow/compiler_artifacts_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compiler_benchmark_test.go b/pkg/workflow/compiler_benchmark_test.go index 21413b4fad..d16ca7bf8b 100644 --- a/pkg/workflow/compiler_benchmark_test.go +++ b/pkg/workflow/compiler_benchmark_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compiler_custom_actions_test.go b/pkg/workflow/compiler_custom_actions_test.go index deee6237f4..faec526211 100644 --- a/pkg/workflow/compiler_custom_actions_test.go +++ b/pkg/workflow/compiler_custom_actions_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compiler_draft_test.go b/pkg/workflow/compiler_draft_test.go index 405ffa28b1..913ff82a78 100644 --- a/pkg/workflow/compiler_draft_test.go +++ b/pkg/workflow/compiler_draft_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compiler_error_formatting_test.go b/pkg/workflow/compiler_error_formatting_test.go index f10720e5d8..01dd1ba393 100644 --- a/pkg/workflow/compiler_error_formatting_test.go +++ b/pkg/workflow/compiler_error_formatting_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compiler_events_test.go b/pkg/workflow/compiler_events_test.go index 5f25e93844..307409c440 100644 --- a/pkg/workflow/compiler_events_test.go +++ b/pkg/workflow/compiler_events_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compiler_filters_validation_test.go b/pkg/workflow/compiler_filters_validation_test.go index f6900ac8f8..9b356b8e87 100644 --- a/pkg/workflow/compiler_filters_validation_test.go +++ b/pkg/workflow/compiler_filters_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compiler_generation_test.go b/pkg/workflow/compiler_generation_test.go index 1e96d51557..200f58c5ec 100644 --- a/pkg/workflow/compiler_generation_test.go +++ b/pkg/workflow/compiler_generation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compiler_jobs_test.go b/pkg/workflow/compiler_jobs_test.go index caf6a4dc00..7cf29bb518 100644 --- a/pkg/workflow/compiler_jobs_test.go +++ b/pkg/workflow/compiler_jobs_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compiler_mcp_test.go b/pkg/workflow/compiler_mcp_test.go index f3c602e7c8..4e0f34c5a4 100644 --- a/pkg/workflow/compiler_mcp_test.go +++ b/pkg/workflow/compiler_mcp_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compiler_orchestrator_test.go b/pkg/workflow/compiler_orchestrator_test.go index 84b483dd8e..c4d1389c73 100644 --- a/pkg/workflow/compiler_orchestrator_test.go +++ b/pkg/workflow/compiler_orchestrator_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compiler_performance_benchmark_test.go b/pkg/workflow/compiler_performance_benchmark_test.go index e421532e81..671f678f44 100644 --- a/pkg/workflow/compiler_performance_benchmark_test.go +++ b/pkg/workflow/compiler_performance_benchmark_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compiler_permissions_test.go b/pkg/workflow/compiler_permissions_test.go index e936fd69a9..f68245bae8 100644 --- a/pkg/workflow/compiler_permissions_test.go +++ b/pkg/workflow/compiler_permissions_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compiler_poststeps_test.go b/pkg/workflow/compiler_poststeps_test.go index a6ffd7bd97..b2126b83e6 100644 --- a/pkg/workflow/compiler_poststeps_test.go +++ b/pkg/workflow/compiler_poststeps_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compiler_reactions_numeric_test.go b/pkg/workflow/compiler_reactions_numeric_test.go index 7dbf275362..68d030a76a 100644 --- a/pkg/workflow/compiler_reactions_numeric_test.go +++ b/pkg/workflow/compiler_reactions_numeric_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compiler_reactions_test.go b/pkg/workflow/compiler_reactions_test.go index d51e4d599b..2b9c3f97d6 100644 --- a/pkg/workflow/compiler_reactions_test.go +++ b/pkg/workflow/compiler_reactions_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compiler_safe_outputs_config_test.go b/pkg/workflow/compiler_safe_outputs_config_test.go index 63fb131b72..d3b322b3de 100644 --- a/pkg/workflow/compiler_safe_outputs_config_test.go +++ b/pkg/workflow/compiler_safe_outputs_config_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compiler_safe_outputs_env_test.go b/pkg/workflow/compiler_safe_outputs_env_test.go index 31855ed029..bdab3b9fbb 100644 --- a/pkg/workflow/compiler_safe_outputs_env_test.go +++ b/pkg/workflow/compiler_safe_outputs_env_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compiler_safe_outputs_job_test.go b/pkg/workflow/compiler_safe_outputs_job_test.go index 0a04463530..cb60ba7a9d 100644 --- a/pkg/workflow/compiler_safe_outputs_job_test.go +++ b/pkg/workflow/compiler_safe_outputs_job_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compiler_safe_outputs_steps_test.go b/pkg/workflow/compiler_safe_outputs_steps_test.go index 67c79a2990..034f44f789 100644 --- a/pkg/workflow/compiler_safe_outputs_steps_test.go +++ b/pkg/workflow/compiler_safe_outputs_steps_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compiler_safe_outputs_test.go b/pkg/workflow/compiler_safe_outputs_test.go index eb5b8bb31c..fe8ca3fba3 100644 --- a/pkg/workflow/compiler_safe_outputs_test.go +++ b/pkg/workflow/compiler_safe_outputs_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compiler_shared_cache_test.go b/pkg/workflow/compiler_shared_cache_test.go index 40d5c8ea17..ff993dac16 100644 --- a/pkg/workflow/compiler_shared_cache_test.go +++ b/pkg/workflow/compiler_shared_cache_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compiler_template_validation_test.go b/pkg/workflow/compiler_template_validation_test.go index 5073d6af95..460c6a66f3 100644 --- a/pkg/workflow/compiler_template_validation_test.go +++ b/pkg/workflow/compiler_template_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compiler_test.go b/pkg/workflow/compiler_test.go index 45c3f692f6..2735b35050 100644 --- a/pkg/workflow/compiler_test.go +++ b/pkg/workflow/compiler_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compiler_validation_test.go b/pkg/workflow/compiler_validation_test.go index 19ffa63bd4..41dbb7fb27 100644 --- a/pkg/workflow/compiler_validation_test.go +++ b/pkg/workflow/compiler_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compiler_yaml_helpers_test.go b/pkg/workflow/compiler_yaml_helpers_test.go index f390401fb1..5d5fab58cf 100644 --- a/pkg/workflow/compiler_yaml_helpers_test.go +++ b/pkg/workflow/compiler_yaml_helpers_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compiler_yaml_logo_test.go b/pkg/workflow/compiler_yaml_logo_test.go index 3faf45eb8a..a25aafc770 100644 --- a/pkg/workflow/compiler_yaml_logo_test.go +++ b/pkg/workflow/compiler_yaml_logo_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compiler_yaml_test.go b/pkg/workflow/compiler_yaml_test.go index d24a4dc791..bc745f6fdc 100644 --- a/pkg/workflow/compiler_yaml_test.go +++ b/pkg/workflow/compiler_yaml_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/compute_text_lazy_test.go b/pkg/workflow/compute_text_lazy_test.go index 1d8e20083b..c0e554c772 100644 --- a/pkg/workflow/compute_text_lazy_test.go +++ b/pkg/workflow/compute_text_lazy_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/concurrency_test.go b/pkg/workflow/concurrency_test.go index b88d623b2a..8586647db2 100644 --- a/pkg/workflow/concurrency_test.go +++ b/pkg/workflow/concurrency_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/config_parsing_helpers_test.go b/pkg/workflow/config_parsing_helpers_test.go index fa4e9298d9..fadc223f62 100644 --- a/pkg/workflow/config_parsing_helpers_test.go +++ b/pkg/workflow/config_parsing_helpers_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/constants_integration_test.go b/pkg/workflow/constants_integration_test.go index 52083b40ed..94b5c92798 100644 --- a/pkg/workflow/constants_integration_test.go +++ b/pkg/workflow/constants_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package workflow import ( diff --git a/pkg/workflow/copilot_engine_test.go b/pkg/workflow/copilot_engine_test.go index f2c14b7242..9a5da51d42 100644 --- a/pkg/workflow/copilot_engine_test.go +++ b/pkg/workflow/copilot_engine_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/copilot_github_mcp_test.go b/pkg/workflow/copilot_github_mcp_test.go index bf698a9bad..c05d4baca1 100644 --- a/pkg/workflow/copilot_github_mcp_test.go +++ b/pkg/workflow/copilot_github_mcp_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/copilot_installer_test.go b/pkg/workflow/copilot_installer_test.go index e98a3ca5fb..e69eadb5a1 100644 --- a/pkg/workflow/copilot_installer_test.go +++ b/pkg/workflow/copilot_installer_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/copilot_mcp_http_integration_test.go b/pkg/workflow/copilot_mcp_http_integration_test.go index 3e3f144be6..77e0b238fc 100644 --- a/pkg/workflow/copilot_mcp_http_integration_test.go +++ b/pkg/workflow/copilot_mcp_http_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package workflow import ( diff --git a/pkg/workflow/copilot_participant_steps_test.go b/pkg/workflow/copilot_participant_steps_test.go index 67f5cbb4be..5cc8925d86 100644 --- a/pkg/workflow/copilot_participant_steps_test.go +++ b/pkg/workflow/copilot_participant_steps_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/copilot_session_copy_test.go b/pkg/workflow/copilot_session_copy_test.go index 6548678f86..208c8c1f86 100644 --- a/pkg/workflow/copilot_session_copy_test.go +++ b/pkg/workflow/copilot_session_copy_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/copilot_session_jsonl_test.go b/pkg/workflow/copilot_session_jsonl_test.go index 865bccbbf4..bca8e8a6ea 100644 --- a/pkg/workflow/copilot_session_jsonl_test.go +++ b/pkg/workflow/copilot_session_jsonl_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/copilot_token_parsing_real_test.go b/pkg/workflow/copilot_token_parsing_real_test.go index e1fc0a1c12..e38da05988 100644 --- a/pkg/workflow/copilot_token_parsing_real_test.go +++ b/pkg/workflow/copilot_token_parsing_real_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/copilot_token_parsing_test.go b/pkg/workflow/copilot_token_parsing_test.go index 82bf15ec36..c006ec96e8 100644 --- a/pkg/workflow/copilot_token_parsing_test.go +++ b/pkg/workflow/copilot_token_parsing_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/create_agent_session_integration_test.go b/pkg/workflow/create_agent_session_integration_test.go index 600f7e4580..cf0e5d5b38 100644 --- a/pkg/workflow/create_agent_session_integration_test.go +++ b/pkg/workflow/create_agent_session_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package workflow import ( diff --git a/pkg/workflow/create_agent_session_test.go b/pkg/workflow/create_agent_session_test.go index 706e33f682..2f18341925 100644 --- a/pkg/workflow/create_agent_session_test.go +++ b/pkg/workflow/create_agent_session_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/create_discussion_dependencies_test.go b/pkg/workflow/create_discussion_dependencies_test.go index ba80b11af9..a57bafce0a 100644 --- a/pkg/workflow/create_discussion_dependencies_test.go +++ b/pkg/workflow/create_discussion_dependencies_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/create_issue_assignees_test.go b/pkg/workflow/create_issue_assignees_test.go index 831b0ce564..dbeed397fd 100644 --- a/pkg/workflow/create_issue_assignees_test.go +++ b/pkg/workflow/create_issue_assignees_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/create_issue_backward_compat_test.go b/pkg/workflow/create_issue_backward_compat_test.go index 690bb26eca..5c5d22e5d3 100644 --- a/pkg/workflow/create_issue_backward_compat_test.go +++ b/pkg/workflow/create_issue_backward_compat_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/create_issue_handler_config_test.go b/pkg/workflow/create_issue_handler_config_test.go index 20af61abee..d6e00e8783 100644 --- a/pkg/workflow/create_issue_handler_config_test.go +++ b/pkg/workflow/create_issue_handler_config_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/create_issue_subissue_test.go b/pkg/workflow/create_issue_subissue_test.go index d4fd30f976..950ba6c30d 100644 --- a/pkg/workflow/create_issue_subissue_test.go +++ b/pkg/workflow/create_issue_subissue_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/create_pr_review_comment_test.go b/pkg/workflow/create_pr_review_comment_test.go index 820aa6d7a7..155f7e92fa 100644 --- a/pkg/workflow/create_pr_review_comment_test.go +++ b/pkg/workflow/create_pr_review_comment_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/create_project_status_update_handler_config_test.go b/pkg/workflow/create_project_status_update_handler_config_test.go index 312d9eb050..e3becc261b 100644 --- a/pkg/workflow/create_project_status_update_handler_config_test.go +++ b/pkg/workflow/create_project_status_update_handler_config_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/create_project_test.go b/pkg/workflow/create_project_test.go index b126d4f593..e90331d70c 100644 --- a/pkg/workflow/create_project_test.go +++ b/pkg/workflow/create_project_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/create_project_token_test.go b/pkg/workflow/create_project_token_test.go index 0cb074135e..fd1042406a 100644 --- a/pkg/workflow/create_project_token_test.go +++ b/pkg/workflow/create_project_token_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/create_pull_request_allow_empty_test.go b/pkg/workflow/create_pull_request_allow_empty_test.go index dd3fd9180d..c56679f595 100644 --- a/pkg/workflow/create_pull_request_allow_empty_test.go +++ b/pkg/workflow/create_pull_request_allow_empty_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/create_pull_request_reviewers_integration_test.go b/pkg/workflow/create_pull_request_reviewers_integration_test.go index e0ce52793e..9db5f6f7b5 100644 --- a/pkg/workflow/create_pull_request_reviewers_integration_test.go +++ b/pkg/workflow/create_pull_request_reviewers_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package workflow import ( diff --git a/pkg/workflow/create_pull_request_reviewers_test.go b/pkg/workflow/create_pull_request_reviewers_test.go index a678906f2d..97cb718294 100644 --- a/pkg/workflow/create_pull_request_reviewers_test.go +++ b/pkg/workflow/create_pull_request_reviewers_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/custom_action_copilot_token_test.go b/pkg/workflow/custom_action_copilot_token_test.go index 945f5176ce..968f2f2ec8 100644 --- a/pkg/workflow/custom_action_copilot_token_test.go +++ b/pkg/workflow/custom_action_copilot_token_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/custom_engine_awinfo_test.go b/pkg/workflow/custom_engine_awinfo_test.go index 8eeb722183..3e838a98a9 100644 --- a/pkg/workflow/custom_engine_awinfo_test.go +++ b/pkg/workflow/custom_engine_awinfo_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/custom_engine_integration_test.go b/pkg/workflow/custom_engine_integration_test.go index e7782d1011..d9b9d1a05a 100644 --- a/pkg/workflow/custom_engine_integration_test.go +++ b/pkg/workflow/custom_engine_integration_test.go @@ -30,7 +30,7 @@ on: push strict: false permissions: contents: read - issues: write + issues: read pull-requests: read engine: id: custom diff --git a/pkg/workflow/custom_engine_test.go b/pkg/workflow/custom_engine_test.go index e6710843b9..2e775c8e9e 100644 --- a/pkg/workflow/custom_engine_test.go +++ b/pkg/workflow/custom_engine_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/custom_job_condition_test.go b/pkg/workflow/custom_job_condition_test.go index decda52254..c0ef60051e 100644 --- a/pkg/workflow/custom_job_condition_test.go +++ b/pkg/workflow/custom_job_condition_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import "testing" diff --git a/pkg/workflow/dangerous_permissions_validation_test.go b/pkg/workflow/dangerous_permissions_validation_test.go index 62d967787c..da27d94e95 100644 --- a/pkg/workflow/dangerous_permissions_validation_test.go +++ b/pkg/workflow/dangerous_permissions_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/data/action_pins.json b/pkg/workflow/data/action_pins.json index 80130e4a1a..11344e2bc6 100644 --- a/pkg/workflow/data/action_pins.json +++ b/pkg/workflow/data/action_pins.json @@ -65,7 +65,7 @@ "version": "v8.0.0", "sha": "ed597411d8f924073f98dfc5c65a23a2325f34cd" }, - "actions/setup-dotnet@v4.3.1": { + "actions/setup-dotnet@v4": { "repo": "actions/setup-dotnet", "version": "v4.3.1", "sha": "67a3573c9a986a3f9c594539f4ab511d57bb3ce9" @@ -80,7 +80,7 @@ "version": "v6.1.0", "sha": "4dc6199c7b1a012772edbd06daecab0f50c9053c" }, - "actions/setup-java@v4.8.0": { + "actions/setup-java@v4": { "repo": "actions/setup-java", "version": "v4.8.0", "sha": "c1e323688fd81a25caa38c78aa6df2d33d3e20d9" @@ -118,7 +118,7 @@ "anchore/sbom-action@v0": { "repo": "anchore/sbom-action", "version": "v0", - "sha": "62ad5284b8ced813296287a0b63906cb364b73ee" + "sha": "deef08a0db64bfad603422135db61477b16cef56" }, "anchore/sbom-action@v0.20.10": { "repo": "anchore/sbom-action", @@ -153,7 +153,7 @@ "docker/login-action@v3": { "repo": "docker/login-action", "version": "v3", - "sha": "5e57cd118135c172c3672efd75eb46360885c0ef" + "sha": "c94ce9fb468520275223c153574b00df6fe4bcc9" }, "docker/metadata-action@v5": { "repo": "docker/metadata-action", diff --git a/pkg/workflow/dependabot_test.go b/pkg/workflow/dependabot_test.go index d55e26e513..523b5a76d1 100644 --- a/pkg/workflow/dependabot_test.go +++ b/pkg/workflow/dependabot_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/dependency_tracker_test.go b/pkg/workflow/dependency_tracker_test.go index 9db48c7f2a..c13cc9bd2f 100644 --- a/pkg/workflow/dependency_tracker_test.go +++ b/pkg/workflow/dependency_tracker_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/detection_success_test.go b/pkg/workflow/detection_success_test.go index 09f1dc5fb0..6fc3cbbfb7 100644 --- a/pkg/workflow/detection_success_test.go +++ b/pkg/workflow/detection_success_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/domains_blocked_test.go b/pkg/workflow/domains_blocked_test.go index da21680a87..a935df1fe0 100644 --- a/pkg/workflow/domains_blocked_test.go +++ b/pkg/workflow/domains_blocked_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/domains_protocol_test.go b/pkg/workflow/domains_protocol_test.go index 525a8b83cc..2697ade28e 100644 --- a/pkg/workflow/domains_protocol_test.go +++ b/pkg/workflow/domains_protocol_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/domains_sort_test.go b/pkg/workflow/domains_sort_test.go index a11c338ac9..07cac3fc2b 100644 --- a/pkg/workflow/domains_sort_test.go +++ b/pkg/workflow/domains_sort_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/domains_test.go b/pkg/workflow/domains_test.go index bf9888a2db..e8f6b31927 100644 --- a/pkg/workflow/domains_test.go +++ b/pkg/workflow/domains_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/duplicate_step_validation_integration_test.go b/pkg/workflow/duplicate_step_validation_integration_test.go index 58ce2c9341..cb6171e6bc 100644 --- a/pkg/workflow/duplicate_step_validation_integration_test.go +++ b/pkg/workflow/duplicate_step_validation_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package workflow import ( diff --git a/pkg/workflow/ecosystem_domains_test.go b/pkg/workflow/ecosystem_domains_test.go index d504384659..d9bf36b1e9 100644 --- a/pkg/workflow/ecosystem_domains_test.go +++ b/pkg/workflow/ecosystem_domains_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/engine_agent_import_test.go b/pkg/workflow/engine_agent_import_test.go index 8c99c148ed..e3f29fac9a 100644 --- a/pkg/workflow/engine_agent_import_test.go +++ b/pkg/workflow/engine_agent_import_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/engine_args_integration_test.go b/pkg/workflow/engine_args_integration_test.go index 075447aff9..fa37b4ff1d 100644 --- a/pkg/workflow/engine_args_integration_test.go +++ b/pkg/workflow/engine_args_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package workflow import ( diff --git a/pkg/workflow/engine_args_test.go b/pkg/workflow/engine_args_test.go index 1201f47db0..dfaa6ed959 100644 --- a/pkg/workflow/engine_args_test.go +++ b/pkg/workflow/engine_args_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/engine_concurrency_test.go b/pkg/workflow/engine_concurrency_test.go index b27e1afaac..feaeb3e47d 100644 --- a/pkg/workflow/engine_concurrency_test.go +++ b/pkg/workflow/engine_concurrency_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/engine_config_test.go b/pkg/workflow/engine_config_test.go index d24d47d2a7..4eb809ff62 100644 --- a/pkg/workflow/engine_config_test.go +++ b/pkg/workflow/engine_config_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/engine_firewall_support_test.go b/pkg/workflow/engine_firewall_support_test.go index 92b7922e1e..97fa954cd1 100644 --- a/pkg/workflow/engine_firewall_support_test.go +++ b/pkg/workflow/engine_firewall_support_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/engine_helpers_github_test.go b/pkg/workflow/engine_helpers_github_test.go index e81a0cf78b..25227187b1 100644 --- a/pkg/workflow/engine_helpers_github_test.go +++ b/pkg/workflow/engine_helpers_github_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/engine_helpers_secrets_test.go b/pkg/workflow/engine_helpers_secrets_test.go index 15b3304300..b12da2ed64 100644 --- a/pkg/workflow/engine_helpers_secrets_test.go +++ b/pkg/workflow/engine_helpers_secrets_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/engine_helpers_shared_test.go b/pkg/workflow/engine_helpers_shared_test.go index b4aa532af5..3fa36f4361 100644 --- a/pkg/workflow/engine_helpers_shared_test.go +++ b/pkg/workflow/engine_helpers_shared_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/engine_helpers_test.go b/pkg/workflow/engine_helpers_test.go index 0d716549e2..752856c066 100644 --- a/pkg/workflow/engine_helpers_test.go +++ b/pkg/workflow/engine_helpers_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/engine_includes_test.go b/pkg/workflow/engine_includes_test.go index c472747ddb..700a1aaaf3 100644 --- a/pkg/workflow/engine_includes_test.go +++ b/pkg/workflow/engine_includes_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/engine_parsing_simple_test.go b/pkg/workflow/engine_parsing_simple_test.go index 4082a11868..10855df325 100644 --- a/pkg/workflow/engine_parsing_simple_test.go +++ b/pkg/workflow/engine_parsing_simple_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/engine_test.go b/pkg/workflow/engine_test.go index c77487fe98..34e4ba7d5a 100644 --- a/pkg/workflow/engine_test.go +++ b/pkg/workflow/engine_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/engine_validation_test.go b/pkg/workflow/engine_validation_test.go index abf394256b..612b1058ef 100644 --- a/pkg/workflow/engine_validation_test.go +++ b/pkg/workflow/engine_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/env_mirror_test.go b/pkg/workflow/env_mirror_test.go index 28eb6133a3..e3a7a57286 100644 --- a/pkg/workflow/env_mirror_test.go +++ b/pkg/workflow/env_mirror_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/error_helpers_test.go b/pkg/workflow/error_helpers_test.go index c443a6f3bb..57dea8e9b7 100644 --- a/pkg/workflow/error_helpers_test.go +++ b/pkg/workflow/error_helpers_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/error_message_quality_test.go b/pkg/workflow/error_message_quality_test.go index 381ec6d478..184521e04b 100644 --- a/pkg/workflow/error_message_quality_test.go +++ b/pkg/workflow/error_message_quality_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/error_wrapping_test.go b/pkg/workflow/error_wrapping_test.go index 74e22b131c..e219b4aa3c 100644 --- a/pkg/workflow/error_wrapping_test.go +++ b/pkg/workflow/error_wrapping_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/expression_coverage_test.go b/pkg/workflow/expression_coverage_test.go index d316e04218..5bc5e8c2c1 100644 --- a/pkg/workflow/expression_coverage_test.go +++ b/pkg/workflow/expression_coverage_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/expression_extraction_test.go b/pkg/workflow/expression_extraction_test.go index a77f9c7cc7..531ab503b6 100644 --- a/pkg/workflow/expression_extraction_test.go +++ b/pkg/workflow/expression_extraction_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/expression_parser_comprehensive_test.go b/pkg/workflow/expression_parser_comprehensive_test.go index 919189791e..7743bba1cf 100644 --- a/pkg/workflow/expression_parser_comprehensive_test.go +++ b/pkg/workflow/expression_parser_comprehensive_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/expression_parser_fuzz_test.go b/pkg/workflow/expression_parser_fuzz_test.go index 7345ddb92c..e9a9447fca 100644 --- a/pkg/workflow/expression_parser_fuzz_test.go +++ b/pkg/workflow/expression_parser_fuzz_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/expression_patterns_test.go b/pkg/workflow/expression_patterns_test.go index a169930a1e..29d857997f 100644 --- a/pkg/workflow/expression_patterns_test.go +++ b/pkg/workflow/expression_patterns_test.go @@ -1,3 +1,5 @@ +//go:build !integration + // This file provides tests for expression pattern matching. package workflow diff --git a/pkg/workflow/expression_safety_test.go b/pkg/workflow/expression_safety_test.go index 87f7ea9388..88f5cc8d24 100644 --- a/pkg/workflow/expression_safety_test.go +++ b/pkg/workflow/expression_safety_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/expressions_benchmark_test.go b/pkg/workflow/expressions_benchmark_test.go index a065fecd67..54eef501da 100644 --- a/pkg/workflow/expressions_benchmark_test.go +++ b/pkg/workflow/expressions_benchmark_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/expressions_cancelled_test.go b/pkg/workflow/expressions_cancelled_test.go index b1c7e9452a..5fd6297c21 100644 --- a/pkg/workflow/expressions_cancelled_test.go +++ b/pkg/workflow/expressions_cancelled_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/expressions_test.go b/pkg/workflow/expressions_test.go index f14f65db19..55758a3204 100644 --- a/pkg/workflow/expressions_test.go +++ b/pkg/workflow/expressions_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/features_test.go b/pkg/workflow/features_test.go index 9d36357022..605b339c6b 100644 --- a/pkg/workflow/features_test.go +++ b/pkg/workflow/features_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/features_validation_test.go b/pkg/workflow/features_validation_test.go index 7429eb91ae..41f479d4c9 100644 --- a/pkg/workflow/features_validation_test.go +++ b/pkg/workflow/features_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/fetch_integration_test.go b/pkg/workflow/fetch_integration_test.go index 72a106350f..5da530a156 100644 --- a/pkg/workflow/fetch_integration_test.go +++ b/pkg/workflow/fetch_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package workflow import ( diff --git a/pkg/workflow/fetch_test.go b/pkg/workflow/fetch_test.go index 61148482d1..0e1fb37e2d 100644 --- a/pkg/workflow/fetch_test.go +++ b/pkg/workflow/fetch_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/firewall_args_integration_test.go b/pkg/workflow/firewall_args_integration_test.go index a98be8f2d4..5746d8cba4 100644 --- a/pkg/workflow/firewall_args_integration_test.go +++ b/pkg/workflow/firewall_args_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package workflow import ( diff --git a/pkg/workflow/firewall_args_test.go b/pkg/workflow/firewall_args_test.go index 8a41637a22..f223d766ce 100644 --- a/pkg/workflow/firewall_args_test.go +++ b/pkg/workflow/firewall_args_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/firewall_blocked_domains_test.go b/pkg/workflow/firewall_blocked_domains_test.go index f755755d00..fdd522f2aa 100644 --- a/pkg/workflow/firewall_blocked_domains_test.go +++ b/pkg/workflow/firewall_blocked_domains_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/firewall_default_enablement_test.go b/pkg/workflow/firewall_default_enablement_test.go index e4fafdab59..09094d0671 100644 --- a/pkg/workflow/firewall_default_enablement_test.go +++ b/pkg/workflow/firewall_default_enablement_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/firewall_disable_integration_test.go b/pkg/workflow/firewall_disable_integration_test.go index 16ecbba39c..6c09ab59d0 100644 --- a/pkg/workflow/firewall_disable_integration_test.go +++ b/pkg/workflow/firewall_disable_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package workflow import ( diff --git a/pkg/workflow/firewall_image_tag_test.go b/pkg/workflow/firewall_image_tag_test.go index 4799ee0a1c..9038834c44 100644 --- a/pkg/workflow/firewall_image_tag_test.go +++ b/pkg/workflow/firewall_image_tag_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/firewall_log_level_test.go b/pkg/workflow/firewall_log_level_test.go index 397863156e..bb80aa5f49 100644 --- a/pkg/workflow/firewall_log_level_test.go +++ b/pkg/workflow/firewall_log_level_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/firewall_test.go b/pkg/workflow/firewall_test.go index 6a8877fd85..b5551b3718 100644 --- a/pkg/workflow/firewall_test.go +++ b/pkg/workflow/firewall_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/firewall_version_pinning_test.go b/pkg/workflow/firewall_version_pinning_test.go index 0a8fc758c4..977686783c 100644 --- a/pkg/workflow/firewall_version_pinning_test.go +++ b/pkg/workflow/firewall_version_pinning_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/firewall_workflow_test.go b/pkg/workflow/firewall_workflow_test.go index 12cca210ec..52bbba48e2 100644 --- a/pkg/workflow/firewall_workflow_test.go +++ b/pkg/workflow/firewall_workflow_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/frontmatter_cache_test.go b/pkg/workflow/frontmatter_cache_test.go index f8e68369f3..f16821c7de 100644 --- a/pkg/workflow/frontmatter_cache_test.go +++ b/pkg/workflow/frontmatter_cache_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/frontmatter_extraction_metadata_test.go b/pkg/workflow/frontmatter_extraction_metadata_test.go index 07b0989e99..efc007463d 100644 --- a/pkg/workflow/frontmatter_extraction_metadata_test.go +++ b/pkg/workflow/frontmatter_extraction_metadata_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/frontmatter_extraction_security_test.go b/pkg/workflow/frontmatter_extraction_security_test.go index a40f6a41a2..d0553b9dff 100644 --- a/pkg/workflow/frontmatter_extraction_security_test.go +++ b/pkg/workflow/frontmatter_extraction_security_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow // Tests for security and network extraction functions diff --git a/pkg/workflow/frontmatter_extraction_yaml_test.go b/pkg/workflow/frontmatter_extraction_yaml_test.go index 35f2280eb5..63d273e6a0 100644 --- a/pkg/workflow/frontmatter_extraction_yaml_test.go +++ b/pkg/workflow/frontmatter_extraction_yaml_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/frontmatter_types_test.go b/pkg/workflow/frontmatter_types_test.go index e761bc1333..74e9688ca7 100644 --- a/pkg/workflow/frontmatter_types_test.go +++ b/pkg/workflow/frontmatter_types_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/gh_cli_mount_test.go b/pkg/workflow/gh_cli_mount_test.go index 445b0e25ed..fa59191e64 100644 --- a/pkg/workflow/gh_cli_mount_test.go +++ b/pkg/workflow/gh_cli_mount_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/git_commands_test.go b/pkg/workflow/git_commands_test.go index 654779a7d0..9083884813 100644 --- a/pkg/workflow/git_commands_test.go +++ b/pkg/workflow/git_commands_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/git_config_test.go b/pkg/workflow/git_config_test.go index 2cf740a178..c3e3b0240f 100644 --- a/pkg/workflow/git_config_test.go +++ b/pkg/workflow/git_config_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/git_helpers_test.go b/pkg/workflow/git_helpers_test.go index 96a97d07a9..52c595ce89 100644 --- a/pkg/workflow/git_helpers_test.go +++ b/pkg/workflow/git_helpers_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/git_patch_head_test.go b/pkg/workflow/git_patch_head_test.go index 0f735210fb..c2af9bceb5 100644 --- a/pkg/workflow/git_patch_head_test.go +++ b/pkg/workflow/git_patch_head_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/git_patch_test.go b/pkg/workflow/git_patch_test.go index 7ae407efae..306f346008 100644 --- a/pkg/workflow/git_patch_test.go +++ b/pkg/workflow/git_patch_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/github_cli_test.go b/pkg/workflow/github_cli_test.go index d9bf8a659f..6917bd7079 100644 --- a/pkg/workflow/github_cli_test.go +++ b/pkg/workflow/github_cli_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/github_context_test.go b/pkg/workflow/github_context_test.go index b76ca5c268..edf4216021 100644 --- a/pkg/workflow/github_context_test.go +++ b/pkg/workflow/github_context_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/github_disabled_test.go b/pkg/workflow/github_disabled_test.go index 1032fe4d62..739b6ac082 100644 --- a/pkg/workflow/github_disabled_test.go +++ b/pkg/workflow/github_disabled_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/github_lockdown_integration_test.go b/pkg/workflow/github_lockdown_integration_test.go index f2dd695d95..10cbd3768c 100644 --- a/pkg/workflow/github_lockdown_integration_test.go +++ b/pkg/workflow/github_lockdown_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package workflow import ( diff --git a/pkg/workflow/github_lockdown_test.go b/pkg/workflow/github_lockdown_test.go index 7a98a852aa..65b241c03a 100644 --- a/pkg/workflow/github_lockdown_test.go +++ b/pkg/workflow/github_lockdown_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/github_mcp_app_token_test.go b/pkg/workflow/github_mcp_app_token_test.go index a6eab25324..a21d6abc57 100644 --- a/pkg/workflow/github_mcp_app_token_test.go +++ b/pkg/workflow/github_mcp_app_token_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/github_readonly_test.go b/pkg/workflow/github_readonly_test.go index 1195cb103a..15187221c9 100644 --- a/pkg/workflow/github_readonly_test.go +++ b/pkg/workflow/github_readonly_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import "testing" diff --git a/pkg/workflow/github_remote_config_test.go b/pkg/workflow/github_remote_config_test.go index 9bfbbf6e07..ece2e12e10 100644 --- a/pkg/workflow/github_remote_config_test.go +++ b/pkg/workflow/github_remote_config_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/github_remote_mode_test.go b/pkg/workflow/github_remote_mode_test.go index 72a200dc2c..c9f4a66a57 100644 --- a/pkg/workflow/github_remote_mode_test.go +++ b/pkg/workflow/github_remote_mode_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/github_token_precedence_integration_test.go b/pkg/workflow/github_token_precedence_integration_test.go index 434a276a07..33bc782241 100644 --- a/pkg/workflow/github_token_precedence_integration_test.go +++ b/pkg/workflow/github_token_precedence_integration_test.go @@ -216,23 +216,19 @@ Test that top-level github-token is used in Codex engine. yamlContent := string(content) - // Verify that the top-level token is used in GH_AW_GITHUB_TOKEN env var - if !strings.Contains(yamlContent, "GH_AW_GITHUB_TOKEN: ${{ secrets.TOPLEVEL_PAT }}") { - t.Error("Expected top-level github-token to be used in GH_AW_GITHUB_TOKEN env var for Codex") + // Verify that the top-level token is used in GITHUB_MCP_SERVER_TOKEN env var + // (Codex now uses GITHUB_MCP_SERVER_TOKEN, same as Copilot, for consistency) + if !strings.Contains(yamlContent, "GITHUB_MCP_SERVER_TOKEN: ${{ secrets.TOPLEVEL_PAT }}") { + t.Error("Expected top-level github-token to be used in GITHUB_MCP_SERVER_TOKEN env var for Codex") t.Logf("Generated YAML:\n%s", yamlContent) } - // Verify that GITHUB_PERSONAL_ACCESS_TOKEN env var is also set to the same value - // The TOML config should reference this via env_vars, not embed the secret directly - if !strings.Contains(yamlContent, "GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.TOPLEVEL_PAT }}") { - t.Error("Expected top-level github-token to be used in GITHUB_PERSONAL_ACCESS_TOKEN env var for Codex") + // Verify that the MCP gateway config uses GITHUB_PERSONAL_ACCESS_TOKEN with the env var reference + // The JSON config passes the token to the GitHub MCP server container + if !strings.Contains(yamlContent, `"GITHUB_PERSONAL_ACCESS_TOKEN": "$GITHUB_MCP_SERVER_TOKEN"`) { + t.Error("Expected MCP gateway config to pass GITHUB_PERSONAL_ACCESS_TOKEN from GITHUB_MCP_SERVER_TOKEN env var") t.Logf("Generated YAML:\n%s", yamlContent) } - - // Verify that the TOML config uses env_vars to reference the environment variable - if !strings.Contains(yamlContent, "env_vars = [\"GITHUB_PERSONAL_ACCESS_TOKEN\"]") { - t.Error("Expected TOML config to reference GITHUB_PERSONAL_ACCESS_TOKEN via env_vars") - } }) t.Run("top-level token used in copilot engine", func(t *testing.T) { diff --git a/pkg/workflow/github_token_test.go b/pkg/workflow/github_token_test.go index a2707c69b3..24f89fe965 100644 --- a/pkg/workflow/github_token_test.go +++ b/pkg/workflow/github_token_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/github_tool_to_toolset_test.go b/pkg/workflow/github_tool_to_toolset_test.go index a9b78de3fb..b9a32189d8 100644 --- a/pkg/workflow/github_tool_to_toolset_test.go +++ b/pkg/workflow/github_tool_to_toolset_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/github_tools_mode_test.go b/pkg/workflow/github_tools_mode_test.go index 15e918bc5c..c653d2ebc8 100644 --- a/pkg/workflow/github_tools_mode_test.go +++ b/pkg/workflow/github_tools_mode_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/github_toolset_expansion_test.go b/pkg/workflow/github_toolset_expansion_test.go index aad68b6994..2e3318189e 100644 --- a/pkg/workflow/github_toolset_expansion_test.go +++ b/pkg/workflow/github_toolset_expansion_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/github_toolset_test.go b/pkg/workflow/github_toolset_test.go index 79bf9a513d..106834f13c 100644 --- a/pkg/workflow/github_toolset_test.go +++ b/pkg/workflow/github_toolset_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/github_toolsets_test.go b/pkg/workflow/github_toolsets_test.go index 3e892e90b0..fe4b5996e4 100644 --- a/pkg/workflow/github_toolsets_test.go +++ b/pkg/workflow/github_toolsets_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/header_test.go b/pkg/workflow/header_test.go index 9a89d13c3a..f564eab137 100644 --- a/pkg/workflow/header_test.go +++ b/pkg/workflow/header_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/heredoc_interpolation_test.go b/pkg/workflow/heredoc_interpolation_test.go index 6f461558aa..bff481612a 100644 --- a/pkg/workflow/heredoc_interpolation_test.go +++ b/pkg/workflow/heredoc_interpolation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/http_mcp_domains_test.go b/pkg/workflow/http_mcp_domains_test.go index 67fa189b9f..3cb6bc3aaa 100644 --- a/pkg/workflow/http_mcp_domains_test.go +++ b/pkg/workflow/http_mcp_domains_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/http_mcp_env_vars_test.go b/pkg/workflow/http_mcp_env_vars_test.go index 9a3f132107..7bf075c570 100644 --- a/pkg/workflow/http_mcp_env_vars_test.go +++ b/pkg/workflow/http_mcp_env_vars_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/if_expression_clean_test.go b/pkg/workflow/if_expression_clean_test.go index a3014e617d..30028c1b11 100644 --- a/pkg/workflow/if_expression_clean_test.go +++ b/pkg/workflow/if_expression_clean_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/importable_tools_test.go b/pkg/workflow/importable_tools_test.go index fa85efa40e..bfad0c1757 100644 --- a/pkg/workflow/importable_tools_test.go +++ b/pkg/workflow/importable_tools_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow_test import ( diff --git a/pkg/workflow/imports_inputs_test.go b/pkg/workflow/imports_inputs_test.go index b5f7470219..f2de267342 100644 --- a/pkg/workflow/imports_inputs_test.go +++ b/pkg/workflow/imports_inputs_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow_test import ( diff --git a/pkg/workflow/imports_markdown_test.go b/pkg/workflow/imports_markdown_test.go index 5b83e1579f..56902fd577 100644 --- a/pkg/workflow/imports_markdown_test.go +++ b/pkg/workflow/imports_markdown_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/imports_recursive_test.go b/pkg/workflow/imports_recursive_test.go index f84c29d39c..6bcc1b7daa 100644 --- a/pkg/workflow/imports_recursive_test.go +++ b/pkg/workflow/imports_recursive_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow_test import ( diff --git a/pkg/workflow/imports_test.go b/pkg/workflow/imports_test.go index 0d0dcc461d..c7151b5391 100644 --- a/pkg/workflow/imports_test.go +++ b/pkg/workflow/imports_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow_test import ( diff --git a/pkg/workflow/inputs_test.go b/pkg/workflow/inputs_test.go index 2a47f9fbf6..572121b323 100644 --- a/pkg/workflow/inputs_test.go +++ b/pkg/workflow/inputs_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/is_task_job_needed_test.go b/pkg/workflow/is_task_job_needed_test.go index 6d359a1075..add441c39a 100644 --- a/pkg/workflow/is_task_job_needed_test.go +++ b/pkg/workflow/is_task_job_needed_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import "testing" diff --git a/pkg/workflow/job_dependencies_test.go b/pkg/workflow/job_dependencies_test.go index f364bb065a..da417eab40 100644 --- a/pkg/workflow/job_dependencies_test.go +++ b/pkg/workflow/job_dependencies_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/jobs_duplicate_steps_test.go b/pkg/workflow/jobs_duplicate_steps_test.go index 3edff6f15e..3ee9c93473 100644 --- a/pkg/workflow/jobs_duplicate_steps_test.go +++ b/pkg/workflow/jobs_duplicate_steps_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/jobs_test.go b/pkg/workflow/jobs_test.go index 34f85d9dd7..c89bcd2524 100644 --- a/pkg/workflow/jobs_test.go +++ b/pkg/workflow/jobs_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/js_comments_test.go b/pkg/workflow/js_comments_test.go index a0db2734d0..44888db893 100644 --- a/pkg/workflow/js_comments_test.go +++ b/pkg/workflow/js_comments_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/js_test.go b/pkg/workflow/js_test.go index 254749da4d..06c59a4fe9 100644 --- a/pkg/workflow/js_test.go +++ b/pkg/workflow/js_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/jsweep_workflow_test.go b/pkg/workflow/jsweep_workflow_test.go index 392fa169cf..d969586bdd 100644 --- a/pkg/workflow/jsweep_workflow_test.go +++ b/pkg/workflow/jsweep_workflow_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/label_filter_test.go b/pkg/workflow/label_filter_test.go index 81d1daae80..ea4bc5e60e 100644 --- a/pkg/workflow/label_filter_test.go +++ b/pkg/workflow/label_filter_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/label_trigger_integration_test.go b/pkg/workflow/label_trigger_integration_test.go index 1fe0ca62d8..328c02e20e 100644 --- a/pkg/workflow/label_trigger_integration_test.go +++ b/pkg/workflow/label_trigger_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package workflow import ( diff --git a/pkg/workflow/label_trigger_parser_fuzz_test.go b/pkg/workflow/label_trigger_parser_fuzz_test.go index 8589a5734e..8103fa4919 100644 --- a/pkg/workflow/label_trigger_parser_fuzz_test.go +++ b/pkg/workflow/label_trigger_parser_fuzz_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/label_trigger_parser_test.go b/pkg/workflow/label_trigger_parser_test.go index 0997dd8a73..2fd65e2ec5 100644 --- a/pkg/workflow/label_trigger_parser_test.go +++ b/pkg/workflow/label_trigger_parser_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/lock_file_bundling_test.go b/pkg/workflow/lock_file_bundling_test.go index aaf27622f0..c656159627 100644 --- a/pkg/workflow/lock_file_bundling_test.go +++ b/pkg/workflow/lock_file_bundling_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/lock_for_agent_test.go b/pkg/workflow/lock_for_agent_test.go index d073c1be3e..0c6d832c11 100644 --- a/pkg/workflow/lock_for_agent_test.go +++ b/pkg/workflow/lock_for_agent_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/log_parser_docker_format_test.go b/pkg/workflow/log_parser_docker_format_test.go index 83858dcc43..4586b2993e 100644 --- a/pkg/workflow/log_parser_docker_format_test.go +++ b/pkg/workflow/log_parser_docker_format_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/log_parser_new_format_file_test.go b/pkg/workflow/log_parser_new_format_file_test.go index 769fd8b9d9..159c6735d8 100644 --- a/pkg/workflow/log_parser_new_format_file_test.go +++ b/pkg/workflow/log_parser_new_format_file_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/log_parser_new_format_test.go b/pkg/workflow/log_parser_new_format_test.go index 9512e66d4a..bb4e0ee2dd 100644 --- a/pkg/workflow/log_parser_new_format_test.go +++ b/pkg/workflow/log_parser_new_format_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/log_parser_snapshot_test.go b/pkg/workflow/log_parser_snapshot_test.go index 62ac174521..fd79223b64 100644 --- a/pkg/workflow/log_parser_snapshot_test.go +++ b/pkg/workflow/log_parser_snapshot_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/log_parser_test.go b/pkg/workflow/log_parser_test.go index 90f0bd2b94..95b25aa364 100644 --- a/pkg/workflow/log_parser_test.go +++ b/pkg/workflow/log_parser_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/logs_test.go b/pkg/workflow/logs_test.go index 277e34f320..df6542bad8 100644 --- a/pkg/workflow/logs_test.go +++ b/pkg/workflow/logs_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/main_export_validation_test.go b/pkg/workflow/main_export_validation_test.go index 8dcfe33b03..3df2a6bc27 100644 --- a/pkg/workflow/main_export_validation_test.go +++ b/pkg/workflow/main_export_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/main_job_env_test.go b/pkg/workflow/main_job_env_test.go index 406dc9572b..e451111a41 100644 --- a/pkg/workflow/main_job_env_test.go +++ b/pkg/workflow/main_job_env_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/maintenance_workflow_test.go b/pkg/workflow/maintenance_workflow_test.go index 219eeb89ff..50233500b1 100644 --- a/pkg/workflow/maintenance_workflow_test.go +++ b/pkg/workflow/maintenance_workflow_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/manifest_test.go b/pkg/workflow/manifest_test.go index 73ae4630ea..7ebd73bea1 100644 --- a/pkg/workflow/manifest_test.go +++ b/pkg/workflow/manifest_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/manual_approval_test.go b/pkg/workflow/manual_approval_test.go index 44cee7929d..94c7e73ccf 100644 --- a/pkg/workflow/manual_approval_test.go +++ b/pkg/workflow/manual_approval_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/map_helpers_test.go b/pkg/workflow/map_helpers_test.go index 09fe10eec6..ea28270ee5 100644 --- a/pkg/workflow/map_helpers_test.go +++ b/pkg/workflow/map_helpers_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/markdown_code_region_balancer_fuzz_test.go b/pkg/workflow/markdown_code_region_balancer_fuzz_test.go index c073b4c4dd..deda600344 100644 --- a/pkg/workflow/markdown_code_region_balancer_fuzz_test.go +++ b/pkg/workflow/markdown_code_region_balancer_fuzz_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/mcp_benchmark_test.go b/pkg/workflow/mcp_benchmark_test.go index f9843d3e61..610800865d 100644 --- a/pkg/workflow/mcp_benchmark_test.go +++ b/pkg/workflow/mcp_benchmark_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/mcp_config_compilation_test.go b/pkg/workflow/mcp_config_compilation_test.go index 861e7a098c..6ad9b0e8d5 100644 --- a/pkg/workflow/mcp_config_compilation_test.go +++ b/pkg/workflow/mcp_config_compilation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/mcp_config_comprehensive_test.go b/pkg/workflow/mcp_config_comprehensive_test.go index 7d0439c244..56ffb7bdcc 100644 --- a/pkg/workflow/mcp_config_comprehensive_test.go +++ b/pkg/workflow/mcp_config_comprehensive_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/mcp_config_copilot_test.go b/pkg/workflow/mcp_config_copilot_test.go index 07a6e2997d..48978fd5de 100644 --- a/pkg/workflow/mcp_config_copilot_test.go +++ b/pkg/workflow/mcp_config_copilot_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/mcp_config_refactor_test.go b/pkg/workflow/mcp_config_refactor_test.go index 5ac75b1c63..a9f8366bd9 100644 --- a/pkg/workflow/mcp_config_refactor_test.go +++ b/pkg/workflow/mcp_config_refactor_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/mcp_config_shared_test.go b/pkg/workflow/mcp_config_shared_test.go index 325eda5ff5..97b2f3b0b7 100644 --- a/pkg/workflow/mcp_config_shared_test.go +++ b/pkg/workflow/mcp_config_shared_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/mcp_config_test.go b/pkg/workflow/mcp_config_test.go index 12fdd3e43d..de576094a7 100644 --- a/pkg/workflow/mcp_config_test.go +++ b/pkg/workflow/mcp_config_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/mcp_config_utils_test.go b/pkg/workflow/mcp_config_utils_test.go index 4f7f109d7a..62c8179bfb 100644 --- a/pkg/workflow/mcp_config_utils_test.go +++ b/pkg/workflow/mcp_config_utils_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/mcp_container_args_test.go b/pkg/workflow/mcp_container_args_test.go index 6837dac4cc..cf3a4d0d07 100644 --- a/pkg/workflow/mcp_container_args_test.go +++ b/pkg/workflow/mcp_container_args_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/mcp_detection_test.go b/pkg/workflow/mcp_detection_test.go index a452b7434c..eb0dfbb818 100644 --- a/pkg/workflow/mcp_detection_test.go +++ b/pkg/workflow/mcp_detection_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/mcp_entrypoint_mounts_integration_test.go b/pkg/workflow/mcp_entrypoint_mounts_integration_test.go index 03b9888a92..bbc806c3de 100644 --- a/pkg/workflow/mcp_entrypoint_mounts_integration_test.go +++ b/pkg/workflow/mcp_entrypoint_mounts_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package workflow import ( diff --git a/pkg/workflow/mcp_error_messages_test.go b/pkg/workflow/mcp_error_messages_test.go index 30cb22ab70..e0978b12f5 100644 --- a/pkg/workflow/mcp_error_messages_test.go +++ b/pkg/workflow/mcp_error_messages_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/mcp_fields_schema_test.go b/pkg/workflow/mcp_fields_schema_test.go index 18a1979b30..01e353153b 100644 --- a/pkg/workflow/mcp_fields_schema_test.go +++ b/pkg/workflow/mcp_fields_schema_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow_test import ( diff --git a/pkg/workflow/mcp_gateway_config_test.go b/pkg/workflow/mcp_gateway_config_test.go index 860be289b2..4ca7af9798 100644 --- a/pkg/workflow/mcp_gateway_config_test.go +++ b/pkg/workflow/mcp_gateway_config_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/mcp_gateway_entrypoint_mounts_e2e_test.go b/pkg/workflow/mcp_gateway_entrypoint_mounts_e2e_test.go index 2e789f48ff..374cc462e9 100644 --- a/pkg/workflow/mcp_gateway_entrypoint_mounts_e2e_test.go +++ b/pkg/workflow/mcp_gateway_entrypoint_mounts_e2e_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/mcp_gateway_mounts_test.go b/pkg/workflow/mcp_gateway_mounts_test.go index 726007e985..b8118dea4e 100644 --- a/pkg/workflow/mcp_gateway_mounts_test.go +++ b/pkg/workflow/mcp_gateway_mounts_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/mcp_gateway_spec_fix_test.go b/pkg/workflow/mcp_gateway_spec_fix_test.go index 5125dd2f23..307291df32 100644 --- a/pkg/workflow/mcp_gateway_spec_fix_test.go +++ b/pkg/workflow/mcp_gateway_spec_fix_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/mcp_http_headers_test.go b/pkg/workflow/mcp_http_headers_test.go index 41468e75ff..2aa8937f90 100644 --- a/pkg/workflow/mcp_http_headers_test.go +++ b/pkg/workflow/mcp_http_headers_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/mcp_json_test.go b/pkg/workflow/mcp_json_test.go index 48702ab088..09f3f58687 100644 --- a/pkg/workflow/mcp_json_test.go +++ b/pkg/workflow/mcp_json_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/mcp_logs_upload_test.go b/pkg/workflow/mcp_logs_upload_test.go index 25a8a92105..014b21fe09 100644 --- a/pkg/workflow/mcp_logs_upload_test.go +++ b/pkg/workflow/mcp_logs_upload_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/mcp_mounts_rendering_test.go b/pkg/workflow/mcp_mounts_rendering_test.go index ba8f41621c..39d8b0851b 100644 --- a/pkg/workflow/mcp_mounts_rendering_test.go +++ b/pkg/workflow/mcp_mounts_rendering_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/mcp_renderer_test.go b/pkg/workflow/mcp_renderer_test.go index 88ff888fc6..3fc4d35da4 100644 --- a/pkg/workflow/mcp_renderer_test.go +++ b/pkg/workflow/mcp_renderer_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/mentions_fuzz_test.go b/pkg/workflow/mentions_fuzz_test.go index 1be86c05ee..ea274392b8 100644 --- a/pkg/workflow/mentions_fuzz_test.go +++ b/pkg/workflow/mentions_fuzz_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/metrics_test.go b/pkg/workflow/metrics_test.go index 8ecd585dff..1e8fe7adbc 100644 --- a/pkg/workflow/metrics_test.go +++ b/pkg/workflow/metrics_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/missing_data_test.go b/pkg/workflow/missing_data_test.go index e6ab1e5a4c..2b88855e50 100644 --- a/pkg/workflow/missing_data_test.go +++ b/pkg/workflow/missing_data_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/missing_tool_test.go b/pkg/workflow/missing_tool_test.go index 0eba84ad70..b008d59f43 100644 --- a/pkg/workflow/missing_tool_test.go +++ b/pkg/workflow/missing_tool_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/model_env_vars_test.go b/pkg/workflow/model_env_vars_test.go index b753edd549..b9931a35e8 100644 --- a/pkg/workflow/model_env_vars_test.go +++ b/pkg/workflow/model_env_vars_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/multiline_test.go b/pkg/workflow/multiline_test.go index a12c4826a2..a1f6161148 100644 --- a/pkg/workflow/multiline_test.go +++ b/pkg/workflow/multiline_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/network_merge_edge_cases_test.go b/pkg/workflow/network_merge_edge_cases_test.go index df4fc2dadb..cb08a33bea 100644 --- a/pkg/workflow/network_merge_edge_cases_test.go +++ b/pkg/workflow/network_merge_edge_cases_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow_test import ( diff --git a/pkg/workflow/network_merge_import_test.go b/pkg/workflow/network_merge_import_test.go index d4d5816474..22cef1d8fb 100644 --- a/pkg/workflow/network_merge_import_test.go +++ b/pkg/workflow/network_merge_import_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow_test import ( diff --git a/pkg/workflow/network_merge_integration_test.go b/pkg/workflow/network_merge_integration_test.go index f9522f2bda..183de29ce3 100644 --- a/pkg/workflow/network_merge_integration_test.go +++ b/pkg/workflow/network_merge_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package workflow_test import ( diff --git a/pkg/workflow/network_test.go b/pkg/workflow/network_test.go index a1ede298fd..a40fe4bb50 100644 --- a/pkg/workflow/network_test.go +++ b/pkg/workflow/network_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/neutral_tools_simple_test.go b/pkg/workflow/neutral_tools_simple_test.go index 5bac133635..419dbad7aa 100644 --- a/pkg/workflow/neutral_tools_simple_test.go +++ b/pkg/workflow/neutral_tools_simple_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/neutral_tools_test.go b/pkg/workflow/neutral_tools_test.go index 88f43ce652..739161be62 100644 --- a/pkg/workflow/neutral_tools_test.go +++ b/pkg/workflow/neutral_tools_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/noop_bundling_test.go b/pkg/workflow/noop_bundling_test.go index 79826f3049..d9a2c2c5a1 100644 --- a/pkg/workflow/noop_bundling_test.go +++ b/pkg/workflow/noop_bundling_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/noop_in_conclusion_test.go b/pkg/workflow/noop_in_conclusion_test.go index 0718e3cc3b..bfc06e21fd 100644 --- a/pkg/workflow/noop_in_conclusion_test.go +++ b/pkg/workflow/noop_in_conclusion_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/notify_comment_test.go b/pkg/workflow/notify_comment_test.go index 1faaec234c..b461d90287 100644 --- a/pkg/workflow/notify_comment_test.go +++ b/pkg/workflow/notify_comment_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/package_extraction_test.go b/pkg/workflow/package_extraction_test.go index 39d591bd2e..1992a2cdaa 100644 --- a/pkg/workflow/package_extraction_test.go +++ b/pkg/workflow/package_extraction_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/patch_artifact_download_verification_test.go b/pkg/workflow/patch_artifact_download_verification_test.go index 38549683c7..22bff06656 100644 --- a/pkg/workflow/patch_artifact_download_verification_test.go +++ b/pkg/workflow/patch_artifact_download_verification_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/patch_generation_test.go b/pkg/workflow/patch_generation_test.go index 3ff1720fbc..c0d3092336 100644 --- a/pkg/workflow/patch_generation_test.go +++ b/pkg/workflow/patch_generation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/permission_restriction_test.go b/pkg/workflow/permission_restriction_test.go index be82a70724..66f76a5b13 100644 --- a/pkg/workflow/permission_restriction_test.go +++ b/pkg/workflow/permission_restriction_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/permissions_enum_test.go b/pkg/workflow/permissions_enum_test.go index 97de598ef1..273beb40ef 100644 --- a/pkg/workflow/permissions_enum_test.go +++ b/pkg/workflow/permissions_enum_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/permissions_operations_test.go b/pkg/workflow/permissions_operations_test.go index ba397d4feb..cccb96ebaf 100644 --- a/pkg/workflow/permissions_operations_test.go +++ b/pkg/workflow/permissions_operations_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/permissions_parser_test.go b/pkg/workflow/permissions_parser_test.go index 88d786473d..c108863d1d 100644 --- a/pkg/workflow/permissions_parser_test.go +++ b/pkg/workflow/permissions_parser_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/permissions_rendering_test.go b/pkg/workflow/permissions_rendering_test.go index 3a349240b1..d188a964bb 100644 --- a/pkg/workflow/permissions_rendering_test.go +++ b/pkg/workflow/permissions_rendering_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/permissions_validator_json_test.go b/pkg/workflow/permissions_validator_json_test.go index 69c5bd116e..1cdf10ca31 100644 --- a/pkg/workflow/permissions_validator_json_test.go +++ b/pkg/workflow/permissions_validator_json_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/permissions_validator_test.go b/pkg/workflow/permissions_validator_test.go index f78866a83a..8a15a758b5 100644 --- a/pkg/workflow/permissions_validator_test.go +++ b/pkg/workflow/permissions_validator_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/pip_test.go b/pkg/workflow/pip_test.go index 8303b03d06..4db23fa43b 100644 --- a/pkg/workflow/pip_test.go +++ b/pkg/workflow/pip_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/pre_activation_custom_fields_test.go b/pkg/workflow/pre_activation_custom_fields_test.go index 5da94504f7..254c7d61a9 100644 --- a/pkg/workflow/pre_activation_custom_fields_test.go +++ b/pkg/workflow/pre_activation_custom_fields_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/processing_benchmark_test.go b/pkg/workflow/processing_benchmark_test.go index cb6b21de9c..879b74e0df 100644 --- a/pkg/workflow/processing_benchmark_test.go +++ b/pkg/workflow/processing_benchmark_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/project_safe_outputs_test.go b/pkg/workflow/project_safe_outputs_test.go index 4640495103..61101b2484 100644 --- a/pkg/workflow/project_safe_outputs_test.go +++ b/pkg/workflow/project_safe_outputs_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( @@ -254,8 +256,3 @@ func TestProjectConfigIntegration(t *testing.T) { assert.Equal(t, 2, result.CreateProjectStatusUpdates.Max, "CreateProjectStatusUpdates max should match") assert.Equal(t, "${{ secrets.TEST_TOKEN }}", result.CreateProjectStatusUpdates.GitHubToken, "CreateProjectStatusUpdates token should match") } - -// boolPtr returns a pointer to a bool value -func boolPtr(b bool) *bool { - return &b -} diff --git a/pkg/workflow/prompt_step_helper_test.go b/pkg/workflow/prompt_step_helper_test.go index 781c66f862..83ffc80b4e 100644 --- a/pkg/workflow/prompt_step_helper_test.go +++ b/pkg/workflow/prompt_step_helper_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/prompt_step_test.go b/pkg/workflow/prompt_step_test.go index 2647eee75e..5b174a6bdd 100644 --- a/pkg/workflow/prompt_step_test.go +++ b/pkg/workflow/prompt_step_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/prompt_validation_test.go b/pkg/workflow/prompt_validation_test.go index 61fcbe1ac9..2eea9455c4 100644 --- a/pkg/workflow/prompt_validation_test.go +++ b/pkg/workflow/prompt_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/prompts_test.go b/pkg/workflow/prompts_test.go index 265b52eb4d..6a7fec6811 100644 --- a/pkg/workflow/prompts_test.go +++ b/pkg/workflow/prompts_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/publish_assets_test.go b/pkg/workflow/publish_assets_test.go index f6f90c7fd9..1ee61968db 100644 --- a/pkg/workflow/publish_assets_test.go +++ b/pkg/workflow/publish_assets_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/pull_request_activity_types_test.go b/pkg/workflow/pull_request_activity_types_test.go index 60f86136e6..26fff53ee4 100644 --- a/pkg/workflow/pull_request_activity_types_test.go +++ b/pkg/workflow/pull_request_activity_types_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/push_to_pull_request_branch_test.go b/pkg/workflow/push_to_pull_request_branch_test.go index a63f18c51c..0d99acbb4f 100644 --- a/pkg/workflow/push_to_pull_request_branch_test.go +++ b/pkg/workflow/push_to_pull_request_branch_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/reaction_discussion_test.go b/pkg/workflow/reaction_discussion_test.go index 6d3452f67d..0423c4d3ed 100644 --- a/pkg/workflow/reaction_discussion_test.go +++ b/pkg/workflow/reaction_discussion_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/reaction_none_test.go b/pkg/workflow/reaction_none_test.go index d507c91904..5f5d421cac 100644 --- a/pkg/workflow/reaction_none_test.go +++ b/pkg/workflow/reaction_none_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/reaction_outputs_test.go b/pkg/workflow/reaction_outputs_test.go index d6d5f4a47c..4e0836ab31 100644 --- a/pkg/workflow/reaction_outputs_test.go +++ b/pkg/workflow/reaction_outputs_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/reactions_test.go b/pkg/workflow/reactions_test.go index 508a281889..a4b69f67d9 100644 --- a/pkg/workflow/reactions_test.go +++ b/pkg/workflow/reactions_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/redact_secrets_test.go b/pkg/workflow/redact_secrets_test.go index 800e340873..77eed13d94 100644 --- a/pkg/workflow/redact_secrets_test.go +++ b/pkg/workflow/redact_secrets_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/regex_benchmark_test.go b/pkg/workflow/regex_benchmark_test.go index d02b5ea116..399f68a794 100644 --- a/pkg/workflow/regex_benchmark_test.go +++ b/pkg/workflow/regex_benchmark_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/repo_memory_integration_test.go b/pkg/workflow/repo_memory_integration_test.go index 1cf8d79340..a1e26c8370 100644 --- a/pkg/workflow/repo_memory_integration_test.go +++ b/pkg/workflow/repo_memory_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package workflow import ( diff --git a/pkg/workflow/repo_memory_path_consistency_test.go b/pkg/workflow/repo_memory_path_consistency_test.go index 7bae3ad2be..99cb1e3fb2 100644 --- a/pkg/workflow/repo_memory_path_consistency_test.go +++ b/pkg/workflow/repo_memory_path_consistency_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/repo_memory_test.go b/pkg/workflow/repo_memory_test.go index 55c9b275f7..a3730a88c5 100644 --- a/pkg/workflow/repo_memory_test.go +++ b/pkg/workflow/repo_memory_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/repository_error_messages_test.go b/pkg/workflow/repository_error_messages_test.go index f18ad6040d..f09a8256cb 100644 --- a/pkg/workflow/repository_error_messages_test.go +++ b/pkg/workflow/repository_error_messages_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/repository_features_logging_test.go b/pkg/workflow/repository_features_logging_test.go index 35b706829a..75c988e124 100644 --- a/pkg/workflow/repository_features_logging_test.go +++ b/pkg/workflow/repository_features_logging_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/repository_features_validation_test.go b/pkg/workflow/repository_features_validation_test.go index 5c848043ef..74864b9f7b 100644 --- a/pkg/workflow/repository_features_validation_test.go +++ b/pkg/workflow/repository_features_validation_test.go @@ -104,11 +104,6 @@ func TestValidateRepositoryFeatures(t *testing.T) { } } -// boolPtr returns a pointer to a boolean value -func boolPtr(b bool) *bool { - return &b -} - func TestGetCurrentRepository(t *testing.T) { // This test will only pass when running in a git repository with GitHub remote // It's expected to fail in non-git environments diff --git a/pkg/workflow/resolve_test.go b/pkg/workflow/resolve_test.go index 1e5d7b802e..8f9bb9eb07 100644 --- a/pkg/workflow/resolve_test.go +++ b/pkg/workflow/resolve_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/role_checks_test.go b/pkg/workflow/role_checks_test.go index c0d6966512..291ad6e6e4 100644 --- a/pkg/workflow/role_checks_test.go +++ b/pkg/workflow/role_checks_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/runtime_import_validation_test.go b/pkg/workflow/runtime_import_validation_test.go index 3a5e1f34f4..2092992d13 100644 --- a/pkg/workflow/runtime_import_validation_test.go +++ b/pkg/workflow/runtime_import_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/runtime_integration_test.go b/pkg/workflow/runtime_integration_test.go index 2ca26d1feb..cd2fb5dd00 100644 --- a/pkg/workflow/runtime_integration_test.go +++ b/pkg/workflow/runtime_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package workflow import ( diff --git a/pkg/workflow/runtime_override_test.go b/pkg/workflow/runtime_override_test.go index bebccbf443..52f61ae466 100644 --- a/pkg/workflow/runtime_override_test.go +++ b/pkg/workflow/runtime_override_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/runtime_setup_order_test.go b/pkg/workflow/runtime_setup_order_test.go index 433a5ecc9e..c3596e267b 100644 --- a/pkg/workflow/runtime_setup_order_test.go +++ b/pkg/workflow/runtime_setup_order_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/runtime_setup_test.go b/pkg/workflow/runtime_setup_test.go index 79dc52fa06..4589bf999c 100644 --- a/pkg/workflow/runtime_setup_test.go +++ b/pkg/workflow/runtime_setup_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/safe_inputs_firewall_test.go b/pkg/workflow/safe_inputs_firewall_test.go index b9c0aa1a24..c364b92808 100644 --- a/pkg/workflow/safe_inputs_firewall_test.go +++ b/pkg/workflow/safe_inputs_firewall_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/safe_inputs_generator_test.go b/pkg/workflow/safe_inputs_generator_test.go index 857eeccc75..bf35504d39 100644 --- a/pkg/workflow/safe_inputs_generator_test.go +++ b/pkg/workflow/safe_inputs_generator_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/safe_inputs_http_codex_test.go b/pkg/workflow/safe_inputs_http_codex_test.go index b6d2741158..94022502c5 100644 --- a/pkg/workflow/safe_inputs_http_codex_test.go +++ b/pkg/workflow/safe_inputs_http_codex_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/safe_inputs_http_integration_test.go b/pkg/workflow/safe_inputs_http_integration_test.go index 8003d5072e..2b1ff783da 100644 --- a/pkg/workflow/safe_inputs_http_integration_test.go +++ b/pkg/workflow/safe_inputs_http_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package workflow import ( diff --git a/pkg/workflow/safe_inputs_mode_test.go b/pkg/workflow/safe_inputs_mode_test.go index d968d8b209..b5be0cb306 100644 --- a/pkg/workflow/safe_inputs_mode_test.go +++ b/pkg/workflow/safe_inputs_mode_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/safe_inputs_parser_test.go b/pkg/workflow/safe_inputs_parser_test.go index c2baf41d28..fd55b2c644 100644 --- a/pkg/workflow/safe_inputs_parser_test.go +++ b/pkg/workflow/safe_inputs_parser_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/safe_inputs_renderer_test.go b/pkg/workflow/safe_inputs_renderer_test.go index e44be0a16a..2a76f1859c 100644 --- a/pkg/workflow/safe_inputs_renderer_test.go +++ b/pkg/workflow/safe_inputs_renderer_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/safe_inputs_timeout_test.go b/pkg/workflow/safe_inputs_timeout_test.go index 0dfb4dae4a..b085d5d906 100644 --- a/pkg/workflow/safe_inputs_timeout_test.go +++ b/pkg/workflow/safe_inputs_timeout_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/safe_jobs_syntax_test.go b/pkg/workflow/safe_jobs_syntax_test.go index 64b6197e5a..f29717c598 100644 --- a/pkg/workflow/safe_jobs_syntax_test.go +++ b/pkg/workflow/safe_jobs_syntax_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/safe_jobs_test.go b/pkg/workflow/safe_jobs_test.go index f9bacd14e4..86ddda69fc 100644 --- a/pkg/workflow/safe_jobs_test.go +++ b/pkg/workflow/safe_jobs_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/safe_jobs_threat_detection_test.go b/pkg/workflow/safe_jobs_threat_detection_test.go index 2409088e0d..b66bc15a29 100644 --- a/pkg/workflow/safe_jobs_threat_detection_test.go +++ b/pkg/workflow/safe_jobs_threat_detection_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/safe_output_helpers_test.go b/pkg/workflow/safe_output_helpers_test.go index a229accd4e..751324fcc0 100644 --- a/pkg/workflow/safe_output_helpers_test.go +++ b/pkg/workflow/safe_output_helpers_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/safe_output_validation_config_test.go b/pkg/workflow/safe_output_validation_config_test.go index cb918a8534..d1db637304 100644 --- a/pkg/workflow/safe_output_validation_config_test.go +++ b/pkg/workflow/safe_output_validation_config_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/safe_outputs_app_import_test.go b/pkg/workflow/safe_outputs_app_import_test.go index 3579bf3915..fc535f33cb 100644 --- a/pkg/workflow/safe_outputs_app_import_test.go +++ b/pkg/workflow/safe_outputs_app_import_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/safe_outputs_app_test.go b/pkg/workflow/safe_outputs_app_test.go index 14b0168998..c9a0db67f5 100644 --- a/pkg/workflow/safe_outputs_app_test.go +++ b/pkg/workflow/safe_outputs_app_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/safe_outputs_cjs_extension_test.go b/pkg/workflow/safe_outputs_cjs_extension_test.go index cfdb8753e9..6b0856619b 100644 --- a/pkg/workflow/safe_outputs_cjs_extension_test.go +++ b/pkg/workflow/safe_outputs_cjs_extension_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/safe_outputs_custom_job_tools_test.go b/pkg/workflow/safe_outputs_custom_job_tools_test.go index e4833670e7..bb969bc0ee 100644 --- a/pkg/workflow/safe_outputs_custom_job_tools_test.go +++ b/pkg/workflow/safe_outputs_custom_job_tools_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/safe_outputs_domains_protocol_validation_test.go b/pkg/workflow/safe_outputs_domains_protocol_validation_test.go index d0c6816cc3..a18b6bf0ec 100644 --- a/pkg/workflow/safe_outputs_domains_protocol_validation_test.go +++ b/pkg/workflow/safe_outputs_domains_protocol_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/safe_outputs_domains_validation_test.go b/pkg/workflow/safe_outputs_domains_validation_test.go index 338593238f..b8ed0d78f0 100644 --- a/pkg/workflow/safe_outputs_domains_validation_test.go +++ b/pkg/workflow/safe_outputs_domains_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/safe_outputs_env_test.go b/pkg/workflow/safe_outputs_env_test.go index 230ab083c7..3660960955 100644 --- a/pkg/workflow/safe_outputs_env_test.go +++ b/pkg/workflow/safe_outputs_env_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/safe_outputs_github_token_test.go b/pkg/workflow/safe_outputs_github_token_test.go index 976e044c63..8497d941c6 100644 --- a/pkg/workflow/safe_outputs_github_token_test.go +++ b/pkg/workflow/safe_outputs_github_token_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/safe_outputs_import_test.go b/pkg/workflow/safe_outputs_import_test.go index 8c77fa4545..3979ca6abf 100644 --- a/pkg/workflow/safe_outputs_import_test.go +++ b/pkg/workflow/safe_outputs_import_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/safe_outputs_max_test.go b/pkg/workflow/safe_outputs_max_test.go index d03634acc9..f23b0138a7 100644 --- a/pkg/workflow/safe_outputs_max_test.go +++ b/pkg/workflow/safe_outputs_max_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/safe_outputs_mcp_integration_test.go b/pkg/workflow/safe_outputs_mcp_integration_test.go index 0894e84cb6..2ae7064cc2 100644 --- a/pkg/workflow/safe_outputs_mcp_integration_test.go +++ b/pkg/workflow/safe_outputs_mcp_integration_test.go @@ -62,10 +62,9 @@ Test safe outputs workflow with MCP server integration. t.Error("Expected safeoutputs in MCP server configuration") } - // Check that the MCP server is configured with Docker containerization (per MCP Gateway spec) - if !strings.Contains(yamlStr, `"command": "docker"`) || - !strings.Contains(yamlStr, `"/opt/gh-aw/safeoutputs/mcp-server.cjs"`) { - t.Error("Expected safeoutputs MCP server to be configured with docker command (containerized per MCP Gateway spec)") + // Check that the MCP server is configured with HTTP transport (per MCP Gateway spec) + if !strings.Contains(yamlStr, `"type": "http"`) { + t.Error("Expected safeoutputs MCP server to be configured with HTTP transport") } // Check that safe outputs config is written to file, not as environment variable @@ -181,9 +180,9 @@ Test safe outputs workflow with Codex engine. t.Error("Expected safeoutputs in Codex MCP server TOML configuration") } - // Check that the MCP server is configured with Docker containerization in TOML format (per MCP Gateway spec) - if !strings.Contains(yamlStr, `command = "docker"`) { - t.Error("Expected safeoutputs MCP server to be configured with docker command in TOML (containerized per MCP Gateway spec)") + // Check that the MCP server is configured with HTTP transport (per MCP Gateway spec) + if !strings.Contains(yamlStr, `type = "http"`) { + t.Error("Expected safeoutputs MCP server to be configured with HTTP transport in TOML") } t.Log("Safe outputs MCP server Codex integration test passed") diff --git a/pkg/workflow/safe_outputs_mcp_server_test.go b/pkg/workflow/safe_outputs_mcp_server_test.go index d8b4def841..a56a5fb957 100644 --- a/pkg/workflow/safe_outputs_mcp_server_test.go +++ b/pkg/workflow/safe_outputs_mcp_server_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/safe_outputs_mentions_test.go b/pkg/workflow/safe_outputs_mentions_test.go index ad5a832ae3..9c51e3e713 100644 --- a/pkg/workflow/safe_outputs_mentions_test.go +++ b/pkg/workflow/safe_outputs_mentions_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/safe_outputs_messages_test.go b/pkg/workflow/safe_outputs_messages_test.go index 53dd0e0431..67af43aff2 100644 --- a/pkg/workflow/safe_outputs_messages_test.go +++ b/pkg/workflow/safe_outputs_messages_test.go @@ -1,3 +1,5 @@ +//go:build !integration + // This file provides workflow compilation and safe-output configuration. // This file contains tests for the safe-outputs messages configuration feature, // which allows customizing footer and notification messages in safe-output jobs. diff --git a/pkg/workflow/safe_outputs_runs_on_test.go b/pkg/workflow/safe_outputs_runs_on_test.go index 41de318f5b..9519084efb 100644 --- a/pkg/workflow/safe_outputs_runs_on_test.go +++ b/pkg/workflow/safe_outputs_runs_on_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/safe_outputs_target_validation_test.go b/pkg/workflow/safe_outputs_target_validation_test.go index d1244637a2..7af61dccee 100644 --- a/pkg/workflow/safe_outputs_target_validation_test.go +++ b/pkg/workflow/safe_outputs_target_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/safe_outputs_test.go b/pkg/workflow/safe_outputs_test.go index 5fc8244290..ff83ba60ba 100644 --- a/pkg/workflow/safe_outputs_test.go +++ b/pkg/workflow/safe_outputs_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/safe_outputs_tools_schema_test.go b/pkg/workflow/safe_outputs_tools_schema_test.go index da50a3acaa..61908b2f9f 100644 --- a/pkg/workflow/safe_outputs_tools_schema_test.go +++ b/pkg/workflow/safe_outputs_tools_schema_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/safe_outputs_tools_test.go b/pkg/workflow/safe_outputs_tools_test.go index af9566989b..e5758aad63 100644 --- a/pkg/workflow/safe_outputs_tools_test.go +++ b/pkg/workflow/safe_outputs_tools_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/safe_outputs_tools_update_issue_test.go b/pkg/workflow/safe_outputs_tools_update_issue_test.go index fba61d38de..684cd0b92c 100644 --- a/pkg/workflow/safe_outputs_tools_update_issue_test.go +++ b/pkg/workflow/safe_outputs_tools_update_issue_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/sandbox_custom_agent_test.go b/pkg/workflow/sandbox_custom_agent_test.go index 04d28802fb..884fd06dd5 100644 --- a/pkg/workflow/sandbox_custom_agent_test.go +++ b/pkg/workflow/sandbox_custom_agent_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/sandbox_mounts_test.go b/pkg/workflow/sandbox_mounts_test.go index 7761c921d4..1d136693b8 100644 --- a/pkg/workflow/sandbox_mounts_test.go +++ b/pkg/workflow/sandbox_mounts_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/sandbox_test.go b/pkg/workflow/sandbox_test.go index e8f7d3e84a..0929ae6b17 100644 --- a/pkg/workflow/sandbox_test.go +++ b/pkg/workflow/sandbox_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/sandbox_validation_test.go b/pkg/workflow/sandbox_validation_test.go index a17c6bbdff..e1a0943877 100644 --- a/pkg/workflow/sandbox_validation_test.go +++ b/pkg/workflow/sandbox_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/sanitize_incoming_text_fuzz_test.go b/pkg/workflow/sanitize_incoming_text_fuzz_test.go index 6f5d9ae127..5b7cd622d8 100644 --- a/pkg/workflow/sanitize_incoming_text_fuzz_test.go +++ b/pkg/workflow/sanitize_incoming_text_fuzz_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/sanitize_label_fuzz_test.go b/pkg/workflow/sanitize_label_fuzz_test.go index 0cbd31ace7..09eeaa9e78 100644 --- a/pkg/workflow/sanitize_label_fuzz_test.go +++ b/pkg/workflow/sanitize_label_fuzz_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/sanitize_output_fuzz_test.go b/pkg/workflow/sanitize_output_fuzz_test.go index dbb7d397b4..83fbaf5e6e 100644 --- a/pkg/workflow/sanitize_output_fuzz_test.go +++ b/pkg/workflow/sanitize_output_fuzz_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/schedule_preprocessing_test.go b/pkg/workflow/schedule_preprocessing_test.go index dae4698fac..689cb269b9 100644 --- a/pkg/workflow/schedule_preprocessing_test.go +++ b/pkg/workflow/schedule_preprocessing_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/schema_validation_integration_test.go b/pkg/workflow/schema_validation_integration_test.go index 487028d2e8..bda6e0f629 100644 --- a/pkg/workflow/schema_validation_integration_test.go +++ b/pkg/workflow/schema_validation_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package workflow import ( diff --git a/pkg/workflow/schema_validation_test.go b/pkg/workflow/schema_validation_test.go index 70b60050d8..76859e8b11 100644 --- a/pkg/workflow/schema_validation_test.go +++ b/pkg/workflow/schema_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( @@ -234,12 +236,3 @@ jobs: }) } } - -// mockValidationError helps create validation errors for testing -type mockValidationError struct { - msg string -} - -func (m *mockValidationError) Error() string { - return m.msg -} diff --git a/pkg/workflow/script_registry_test.go b/pkg/workflow/script_registry_test.go index 7b4b54e189..362f2c8b14 100644 --- a/pkg/workflow/script_registry_test.go +++ b/pkg/workflow/script_registry_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/search_integration_test.go b/pkg/workflow/search_integration_test.go index b481f838d8..ca9154c73f 100644 --- a/pkg/workflow/search_integration_test.go +++ b/pkg/workflow/search_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package workflow import ( diff --git a/pkg/workflow/secret_extraction_test.go b/pkg/workflow/secret_extraction_test.go index 8d3346dd04..d853a63044 100644 --- a/pkg/workflow/secret_extraction_test.go +++ b/pkg/workflow/secret_extraction_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/secret_masking_test.go b/pkg/workflow/secret_masking_test.go index 05ee29d561..77d9911628 100644 --- a/pkg/workflow/secret_masking_test.go +++ b/pkg/workflow/secret_masking_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/secret_validation_test.go b/pkg/workflow/secret_validation_test.go index 00282f1ceb..ae25b56570 100644 --- a/pkg/workflow/secret_validation_test.go +++ b/pkg/workflow/secret_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/secret_verification_output_test.go b/pkg/workflow/secret_verification_output_test.go index eb278701a0..bbc26a0178 100644 --- a/pkg/workflow/secret_verification_output_test.go +++ b/pkg/workflow/secret_verification_output_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/secrets_validation_test.go b/pkg/workflow/secrets_validation_test.go index 305c625a26..efacd6cea5 100644 --- a/pkg/workflow/secrets_validation_test.go +++ b/pkg/workflow/secrets_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/secure_markdown_rendering_test.go b/pkg/workflow/secure_markdown_rendering_test.go index 43641b5d21..866a746b8b 100644 --- a/pkg/workflow/secure_markdown_rendering_test.go +++ b/pkg/workflow/secure_markdown_rendering_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/security_fuzz_test.go b/pkg/workflow/security_fuzz_test.go index 5e10495de7..9492670ea3 100644 --- a/pkg/workflow/security_fuzz_test.go +++ b/pkg/workflow/security_fuzz_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/security_reports_test.go b/pkg/workflow/security_reports_test.go index 8c353c14fd..05621cefcd 100644 --- a/pkg/workflow/security_reports_test.go +++ b/pkg/workflow/security_reports_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/semver_test.go b/pkg/workflow/semver_test.go index 31f54cc5a7..9001c263d3 100644 --- a/pkg/workflow/semver_test.go +++ b/pkg/workflow/semver_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import "testing" diff --git a/pkg/workflow/serena_container_selection_test.go b/pkg/workflow/serena_container_selection_test.go index 19a9feaf21..5c20b1d8f9 100644 --- a/pkg/workflow/serena_container_selection_test.go +++ b/pkg/workflow/serena_container_selection_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/sh_integration_test.go b/pkg/workflow/sh_integration_test.go index 6581881cc7..71ce303547 100644 --- a/pkg/workflow/sh_integration_test.go +++ b/pkg/workflow/sh_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package workflow import ( diff --git a/pkg/workflow/sh_test.go b/pkg/workflow/sh_test.go index 3bc7d5e2ee..a18664a0ba 100644 --- a/pkg/workflow/sh_test.go +++ b/pkg/workflow/sh_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/shared_workflow_test.go b/pkg/workflow/shared_workflow_test.go index c9827543f0..a52c08d0ad 100644 --- a/pkg/workflow/shared_workflow_test.go +++ b/pkg/workflow/shared_workflow_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow_test import ( diff --git a/pkg/workflow/shell_test.go b/pkg/workflow/shell_test.go index 005ab3648b..437abe3fce 100644 --- a/pkg/workflow/shell_test.go +++ b/pkg/workflow/shell_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/skip_if_match_test.go b/pkg/workflow/skip_if_match_test.go index 7baf6bf54b..43118e28a1 100644 --- a/pkg/workflow/skip_if_match_test.go +++ b/pkg/workflow/skip_if_match_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/skip_if_no_match_test.go b/pkg/workflow/skip_if_no_match_test.go index 40a200046a..9dceea2dc8 100644 --- a/pkg/workflow/skip_if_no_match_test.go +++ b/pkg/workflow/skip_if_no_match_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/slash_command_output_test.go b/pkg/workflow/slash_command_output_test.go index 04f86fe08f..42bc8d259a 100644 --- a/pkg/workflow/slash_command_output_test.go +++ b/pkg/workflow/slash_command_output_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/slash_command_parser_test.go b/pkg/workflow/slash_command_parser_test.go index b8ae9a539a..f2d7019746 100644 --- a/pkg/workflow/slash_command_parser_test.go +++ b/pkg/workflow/slash_command_parser_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/source_field_test.go b/pkg/workflow/source_field_test.go index 4ec5935655..cbb72632e6 100644 --- a/pkg/workflow/source_field_test.go +++ b/pkg/workflow/source_field_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/srt_version_pinning_test.go b/pkg/workflow/srt_version_pinning_test.go index ceaaad4189..841d63ad3a 100644 --- a/pkg/workflow/srt_version_pinning_test.go +++ b/pkg/workflow/srt_version_pinning_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/staged_add_issue_labels_test.go b/pkg/workflow/staged_add_issue_labels_test.go index 356bb486da..c20aa5bd76 100644 --- a/pkg/workflow/staged_add_issue_labels_test.go +++ b/pkg/workflow/staged_add_issue_labels_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/staged_awinfo_test.go b/pkg/workflow/staged_awinfo_test.go index 9e160b5679..0e6edcbfd8 100644 --- a/pkg/workflow/staged_awinfo_test.go +++ b/pkg/workflow/staged_awinfo_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/staged_create_issue_test.go b/pkg/workflow/staged_create_issue_test.go index a92acc7916..a332d87785 100644 --- a/pkg/workflow/staged_create_issue_test.go +++ b/pkg/workflow/staged_create_issue_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/staged_preview_bundling_test.go b/pkg/workflow/staged_preview_bundling_test.go index f5a4954755..6cf2634941 100644 --- a/pkg/workflow/staged_preview_bundling_test.go +++ b/pkg/workflow/staged_preview_bundling_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/staged_pull_request_test.go b/pkg/workflow/staged_pull_request_test.go index 579c2b57c9..6ca6880cd3 100644 --- a/pkg/workflow/staged_pull_request_test.go +++ b/pkg/workflow/staged_pull_request_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/staged_test.go b/pkg/workflow/staged_test.go index 75d6fabbb5..480b0381b1 100644 --- a/pkg/workflow/staged_test.go +++ b/pkg/workflow/staged_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/step_order_validation_bug_detection_test.go b/pkg/workflow/step_order_validation_bug_detection_test.go index 771022bded..d0e529c47f 100644 --- a/pkg/workflow/step_order_validation_bug_detection_test.go +++ b/pkg/workflow/step_order_validation_bug_detection_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/step_order_validation_integration_test.go b/pkg/workflow/step_order_validation_integration_test.go index df9528f3cb..6e22f05225 100644 --- a/pkg/workflow/step_order_validation_integration_test.go +++ b/pkg/workflow/step_order_validation_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package workflow import ( diff --git a/pkg/workflow/step_order_validation_test.go b/pkg/workflow/step_order_validation_test.go index 584c9a4e12..bae1f3db3e 100644 --- a/pkg/workflow/step_order_validation_test.go +++ b/pkg/workflow/step_order_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/step_types_test.go b/pkg/workflow/step_types_test.go index 5c9f98116d..e142f8cbef 100644 --- a/pkg/workflow/step_types_test.go +++ b/pkg/workflow/step_types_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/stop_after_test.go b/pkg/workflow/stop_after_test.go index 3f3036f6a4..6aa669e87e 100644 --- a/pkg/workflow/stop_after_test.go +++ b/pkg/workflow/stop_after_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/stop_time_check_job_test.go b/pkg/workflow/stop_time_check_job_test.go index 20770238bf..9683b74960 100644 --- a/pkg/workflow/stop_time_check_job_test.go +++ b/pkg/workflow/stop_time_check_job_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/strict_mode_serena_test.go b/pkg/workflow/strict_mode_serena_test.go index 39b38638e6..96a8bf4930 100644 --- a/pkg/workflow/strict_mode_serena_test.go +++ b/pkg/workflow/strict_mode_serena_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/strict_mode_validation_test.go b/pkg/workflow/strict_mode_validation_test.go index d86a475218..7fd4ed438b 100644 --- a/pkg/workflow/strict_mode_validation_test.go +++ b/pkg/workflow/strict_mode_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/strict_mode_zizmor_test.go b/pkg/workflow/strict_mode_zizmor_test.go index e08eab09b0..7c2c3a89e8 100644 --- a/pkg/workflow/strict_mode_zizmor_test.go +++ b/pkg/workflow/strict_mode_zizmor_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/strings_test.go b/pkg/workflow/strings_test.go index 3269d6fdb3..0496faf3d8 100644 --- a/pkg/workflow/strings_test.go +++ b/pkg/workflow/strings_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/task_and_reaction_permissions_test.go b/pkg/workflow/task_and_reaction_permissions_test.go index a8cdd48a76..f98ee3b152 100644 --- a/pkg/workflow/task_and_reaction_permissions_test.go +++ b/pkg/workflow/task_and_reaction_permissions_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/task_job_if_condition_test.go b/pkg/workflow/task_job_if_condition_test.go index a2012967a3..c25a26b7a0 100644 --- a/pkg/workflow/task_job_if_condition_test.go +++ b/pkg/workflow/task_job_if_condition_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/team_member_test.go b/pkg/workflow/team_member_test.go index cc187a874d..8a0ac6491f 100644 --- a/pkg/workflow/team_member_test.go +++ b/pkg/workflow/team_member_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/temp_dir_before_custom_steps_test.go b/pkg/workflow/temp_dir_before_custom_steps_test.go index 209fcd248e..23ef5bbd5a 100644 --- a/pkg/workflow/temp_dir_before_custom_steps_test.go +++ b/pkg/workflow/temp_dir_before_custom_steps_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/temp_folder_test.go b/pkg/workflow/temp_folder_test.go index b5082b2f81..a9e98a1a0d 100644 --- a/pkg/workflow/temp_folder_test.go +++ b/pkg/workflow/temp_folder_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/template_expression_integration_test.go b/pkg/workflow/template_expression_integration_test.go index 68ea58e3ee..68e00e186b 100644 --- a/pkg/workflow/template_expression_integration_test.go +++ b/pkg/workflow/template_expression_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package workflow import ( diff --git a/pkg/workflow/template_expression_wrapping_test.go b/pkg/workflow/template_expression_wrapping_test.go index 584bfe8fb6..f1a501226f 100644 --- a/pkg/workflow/template_expression_wrapping_test.go +++ b/pkg/workflow/template_expression_wrapping_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/template_fuzz_test.go b/pkg/workflow/template_fuzz_test.go index a66ebbdaa6..76f53071bc 100644 --- a/pkg/workflow/template_fuzz_test.go +++ b/pkg/workflow/template_fuzz_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/template_include_validation_test.go b/pkg/workflow/template_include_validation_test.go index f73dda00f7..04dd33e0a1 100644 --- a/pkg/workflow/template_include_validation_test.go +++ b/pkg/workflow/template_include_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/template_injection_validation_fuzz_test.go b/pkg/workflow/template_injection_validation_fuzz_test.go index 8c4914aa14..e34ef01b27 100644 --- a/pkg/workflow/template_injection_validation_fuzz_test.go +++ b/pkg/workflow/template_injection_validation_fuzz_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/template_injection_validation_test.go b/pkg/workflow/template_injection_validation_test.go index 32c1ada178..e4ceb40475 100644 --- a/pkg/workflow/template_injection_validation_test.go +++ b/pkg/workflow/template_injection_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/template_pattern_consistency_test.go b/pkg/workflow/template_pattern_consistency_test.go index 956f8505ca..2ce7b680af 100644 --- a/pkg/workflow/template_pattern_consistency_test.go +++ b/pkg/workflow/template_pattern_consistency_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/template_rendering_test.go b/pkg/workflow/template_rendering_test.go index d1409662be..33ddae1039 100644 --- a/pkg/workflow/template_rendering_test.go +++ b/pkg/workflow/template_rendering_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/test_helpers_shared_test.go b/pkg/workflow/test_helpers_shared_test.go new file mode 100644 index 0000000000..229888d69c --- /dev/null +++ b/pkg/workflow/test_helpers_shared_test.go @@ -0,0 +1,17 @@ +package workflow + +// boolPtr returns a pointer to a bool value. +// This is a shared helper used by both unit and integration tests. +func boolPtr(b bool) *bool { + return &b +} + +// mockValidationError helps create validation errors for testing. +// This is a shared helper used by both unit and integration tests. +type mockValidationError struct { + msg string +} + +func (m *mockValidationError) Error() string { + return m.msg +} diff --git a/pkg/workflow/threat_detection_file_access_test.go b/pkg/workflow/threat_detection_file_access_test.go index 232eb16fab..28886a2e27 100644 --- a/pkg/workflow/threat_detection_file_access_test.go +++ b/pkg/workflow/threat_detection_file_access_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/threat_detection_isolation_test.go b/pkg/workflow/threat_detection_isolation_test.go index 516b29d888..e96b5b854c 100644 --- a/pkg/workflow/threat_detection_isolation_test.go +++ b/pkg/workflow/threat_detection_isolation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/threat_detection_test.go b/pkg/workflow/threat_detection_test.go index d4d253bf18..cbe0ccafee 100644 --- a/pkg/workflow/threat_detection_test.go +++ b/pkg/workflow/threat_detection_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/time_delta_test.go b/pkg/workflow/time_delta_test.go index 2ae095680e..a408f7640d 100644 --- a/pkg/workflow/time_delta_test.go +++ b/pkg/workflow/time_delta_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/timeout_minutes_test.go b/pkg/workflow/timeout_minutes_test.go index 26f4f20fba..6c08769ed9 100644 --- a/pkg/workflow/timeout_minutes_test.go +++ b/pkg/workflow/timeout_minutes_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/token_counting_test.go b/pkg/workflow/token_counting_test.go index 787803ee67..ce030de9ce 100644 --- a/pkg/workflow/token_counting_test.go +++ b/pkg/workflow/token_counting_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/tools_timeout_integration_test.go b/pkg/workflow/tools_timeout_integration_test.go index 2d3a6a445e..424653a5df 100644 --- a/pkg/workflow/tools_timeout_integration_test.go +++ b/pkg/workflow/tools_timeout_integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package workflow import ( diff --git a/pkg/workflow/tools_timeout_test.go b/pkg/workflow/tools_timeout_test.go index b7a49988e0..4ccd549368 100644 --- a/pkg/workflow/tools_timeout_test.go +++ b/pkg/workflow/tools_timeout_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/tools_timeout_validation_test.go b/pkg/workflow/tools_timeout_validation_test.go index 299ead6136..4ba3397710 100644 --- a/pkg/workflow/tools_timeout_validation_test.go +++ b/pkg/workflow/tools_timeout_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/tools_types_test.go b/pkg/workflow/tools_types_test.go index 5848700911..b518d6e36a 100644 --- a/pkg/workflow/tools_types_test.go +++ b/pkg/workflow/tools_types_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/tracker_id_test.go b/pkg/workflow/tracker_id_test.go index 355c2cc8fd..e09869915e 100644 --- a/pkg/workflow/tracker_id_test.go +++ b/pkg/workflow/tracker_id_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/trigger_parser_fuzz_test.go b/pkg/workflow/trigger_parser_fuzz_test.go index 6618802e6f..4084fcc76c 100644 --- a/pkg/workflow/trigger_parser_fuzz_test.go +++ b/pkg/workflow/trigger_parser_fuzz_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/trigger_parser_test.go b/pkg/workflow/trigger_parser_test.go index 507743a04a..20f7e01b58 100644 --- a/pkg/workflow/trigger_parser_test.go +++ b/pkg/workflow/trigger_parser_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/type_conversion_test.go b/pkg/workflow/type_conversion_test.go index 2dd25dc7a6..c5e05a8af6 100644 --- a/pkg/workflow/type_conversion_test.go +++ b/pkg/workflow/type_conversion_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/unified_prompt_creation_test.go b/pkg/workflow/unified_prompt_creation_test.go index 66a4b9bb1c..b108298393 100644 --- a/pkg/workflow/unified_prompt_creation_test.go +++ b/pkg/workflow/unified_prompt_creation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/unified_prompt_step_test.go b/pkg/workflow/unified_prompt_step_test.go index db16c2925b..e30a5674cb 100644 --- a/pkg/workflow/unified_prompt_step_test.go +++ b/pkg/workflow/unified_prompt_step_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/unquote_uses_test.go b/pkg/workflow/unquote_uses_test.go index ead6fff3b4..e441b217cb 100644 --- a/pkg/workflow/unquote_uses_test.go +++ b/pkg/workflow/unquote_uses_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/update_discussion_test.go b/pkg/workflow/update_discussion_test.go index 6ce1f41058..8f5fdb5ced 100644 --- a/pkg/workflow/update_discussion_test.go +++ b/pkg/workflow/update_discussion_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/update_entity_helpers_test.go b/pkg/workflow/update_entity_helpers_test.go index 455d008643..a1ad0d859c 100644 --- a/pkg/workflow/update_entity_helpers_test.go +++ b/pkg/workflow/update_entity_helpers_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/update_issue_test.go b/pkg/workflow/update_issue_test.go index 7ae5b549f2..25f6b549a8 100644 --- a/pkg/workflow/update_issue_test.go +++ b/pkg/workflow/update_issue_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/update_project_handler_config_test.go b/pkg/workflow/update_project_handler_config_test.go index 5294ddb1e8..742273a158 100644 --- a/pkg/workflow/update_project_handler_config_test.go +++ b/pkg/workflow/update_project_handler_config_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/update_project_test.go b/pkg/workflow/update_project_test.go index 5293431aed..d42571f0e1 100644 --- a/pkg/workflow/update_project_test.go +++ b/pkg/workflow/update_project_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/update_project_token_test.go b/pkg/workflow/update_project_token_test.go index cd5c04f2b0..b84b5777b4 100644 --- a/pkg/workflow/update_project_token_test.go +++ b/pkg/workflow/update_project_token_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/upload_assets_config_test.go b/pkg/workflow/upload_assets_config_test.go index 884d4c7c79..9cacb1b6b8 100644 --- a/pkg/workflow/upload_assets_config_test.go +++ b/pkg/workflow/upload_assets_config_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/validation_helpers_test.go b/pkg/workflow/validation_helpers_test.go index 2a0e764787..a4cf492a6b 100644 --- a/pkg/workflow/validation_helpers_test.go +++ b/pkg/workflow/validation_helpers_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/validation_strict_mcp_network_test.go b/pkg/workflow/validation_strict_mcp_network_test.go index 8b129b8306..553967c8e4 100644 --- a/pkg/workflow/validation_strict_mcp_network_test.go +++ b/pkg/workflow/validation_strict_mcp_network_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/version_field_test.go b/pkg/workflow/version_field_test.go index 2b9e7a55f4..f4922ca5ee 100644 --- a/pkg/workflow/version_field_test.go +++ b/pkg/workflow/version_field_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/version_test.go b/pkg/workflow/version_test.go index 19202d40fc..350a630180 100644 --- a/pkg/workflow/version_test.go +++ b/pkg/workflow/version_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/workflow_dispatch_inputs_fuzz_test.go b/pkg/workflow/workflow_dispatch_inputs_fuzz_test.go index 1c78ae1d97..f93659fd1d 100644 --- a/pkg/workflow/workflow_dispatch_inputs_fuzz_test.go +++ b/pkg/workflow/workflow_dispatch_inputs_fuzz_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/workflow_run_validation_test.go b/pkg/workflow/workflow_run_validation_test.go index 1897d40757..97ef20d01f 100644 --- a/pkg/workflow/workflow_run_validation_test.go +++ b/pkg/workflow/workflow_run_validation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/xml_comments_test.go b/pkg/workflow/xml_comments_test.go index 2c25856e1a..32a12d9c97 100644 --- a/pkg/workflow/xml_comments_test.go +++ b/pkg/workflow/xml_comments_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/yaml_options_test.go b/pkg/workflow/yaml_options_test.go index 7110ee22e2..2f8082cbb1 100644 --- a/pkg/workflow/yaml_options_test.go +++ b/pkg/workflow/yaml_options_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/yaml_test.go b/pkg/workflow/yaml_test.go index 8f7cd14f0b..7da321f475 100644 --- a/pkg/workflow/yaml_test.go +++ b/pkg/workflow/yaml_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/pkg/workflow/zizmor_annotation_test.go b/pkg/workflow/zizmor_annotation_test.go index 8cf3efc51d..ba318c0979 100644 --- a/pkg/workflow/zizmor_annotation_test.go +++ b/pkg/workflow/zizmor_annotation_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package workflow import ( diff --git a/scripts/lint_error_messages_test.go b/scripts/lint_error_messages_test.go index c90f9dae25..ff8a7f6761 100644 --- a/scripts/lint_error_messages_test.go +++ b/scripts/lint_error_messages_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package main import ( diff --git a/specs/layout.md b/specs/layout.md index f9c546280c..60dc635bef 100644 --- a/specs/layout.md +++ b/specs/layout.md @@ -31,10 +31,10 @@ Common GitHub Actions used across workflows (24 unique external actions + 1 loca | `actions/ai-inference` | `a6101c89c6feaecc585efdd8d461f18bb7896f20` | AI inference action | Used for AI model inference tasks | | `astral-sh/setup-uv` | `d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86` | Sets up uv package manager | Used for Python package management | | `docker/setup-buildx-action` | `8d2750c68a42422c14e847fe6c8ac0403b4cbd6f` | Sets up Docker Buildx | Used for multi-platform Docker builds | -| `docker/login-action` | `5e57cd118135c172c3672efd75eb46360885c0ef` | Logs in to Docker registry | Used for Docker registry authentication | +| `docker/login-action` | `c94ce9fb468520275223c153574b00df6fe4bcc9` | Logs in to Docker registry | Used for Docker registry authentication | | `docker/metadata-action` | `c299e40c65443455700f0fdfc63efafe5b349051` | Extracts Docker metadata | Used for Docker image tagging | | `docker/build-push-action` | `263435318d21b8e681c14492fe198d362a7d2c83` | Builds and pushes Docker images | Used for containerized workflows | -| `anchore/sbom-action` | `62ad5284b8ced813296287a0b63906cb364b73ee` | Generates Software Bill of Materials | Used for security compliance | +| `anchore/sbom-action` | `deef08a0db64bfad603422135db61477b16cef56` | Generates Software Bill of Materials | Used for security compliance | | `github/stale-repos` | `3477b6488008d9411aaf22a0924ec7c1f6a69980` | Identifies stale repositories | Used for repository maintenance | | `super-linter/super-linter` | `2bdd90ed3262e023ac84bf8fe35dc480721fc1f2` | Lints code across multiple languages | Used for code quality checks | | `githubnext/gh-aw/actions/setup` | `623e612ff6a684e9a8634449508bdda21e2c178c` | gh-aw setup action (pinned version) | Used for specific workflow versions |