From 9afe8c290dafbafd835860dff7882941b4296f70 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 6 Mar 2026 21:50:55 +0000 Subject: [PATCH 1/4] Initial plan From 27728a41c2ec63df5a6c2a7ab8f16867c1a99f33 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 6 Mar 2026 21:55:32 +0000 Subject: [PATCH 2/4] Add build tag and standalone workflow for integration tests - Add //go:build testintegration to all test files in internal/testintegration/ - Create .github/workflows/integration-test.yml as standalone workflow - Matrix: linux + windows, stable Go only (2 jobs) - No -race, no fuzz, no test report - Coverage upload via artifacts Co-authored-by: fredbi <14262513+fredbi@users.noreply.github.com> --- .github/workflows/integration-test.yml | 53 +++++++++++++++++++ internal/testintegration/doc_test.go | 2 + internal/testintegration/helpers_spec_test.go | 2 + internal/testintegration/spec_test.go | 2 + 4 files changed, 59 insertions(+) create mode 100644 .github/workflows/integration-test.yml diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml new file mode 100644 index 0000000..a7cbb92 --- /dev/null +++ b/.github/workflows/integration-test.yml @@ -0,0 +1,53 @@ +name: integration test + +permissions: + pull-requests: read + contents: read + +on: + push: + branches: + - master + + pull_request: + +jobs: + test: + name: integration (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest] + + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + + - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 + with: + go-version: stable + check-latest: true + cache: true + cache-dependency-path: '**/go.sum' + + - name: Run integration tests + working-directory: internal/testintegration + run: > + go test + -v + -tags testintegration + -count 1 + -timeout 30m + -coverprofile='integration.coverage.${{ matrix.os }}.out' + -covermode=atomic + -coverpkg=github.com/go-openapi/analysis/... + ./... + + - name: Upload coverage + if: always() + uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 + with: + path: 'internal/testintegration/*.coverage.*.out' + name: 'integration.coverage.${{ matrix.os }}' + retention-days: 1 diff --git a/internal/testintegration/doc_test.go b/internal/testintegration/doc_test.go index 067a26b..ea92f78 100644 --- a/internal/testintegration/doc_test.go +++ b/internal/testintegration/doc_test.go @@ -1,6 +1,8 @@ // SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers // SPDX-License-Identifier: Apache-2.0 +//go:build testintegration + package analysis_test import ( diff --git a/internal/testintegration/helpers_spec_test.go b/internal/testintegration/helpers_spec_test.go index c3b771b..0cea242 100644 --- a/internal/testintegration/helpers_spec_test.go +++ b/internal/testintegration/helpers_spec_test.go @@ -1,6 +1,8 @@ // SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers // SPDX-License-Identifier: Apache-2.0 +//go:build testintegration + package analysis_test import ( diff --git a/internal/testintegration/spec_test.go b/internal/testintegration/spec_test.go index f5d22ea..550a815 100644 --- a/internal/testintegration/spec_test.go +++ b/internal/testintegration/spec_test.go @@ -1,6 +1,8 @@ // SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers // SPDX-License-Identifier: Apache-2.0 +//go:build testintegration + package analysis_test import ( From 3464a37c24a1c1dbb8b5abce7c1c2a58a6b1e9f5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 6 Mar 2026 21:57:00 +0000 Subject: [PATCH 3/4] Final state: integration test workflow and build tags Co-authored-by: fredbi <14262513+fredbi@users.noreply.github.com> --- internal/testintegration/go.mod | 2 +- internal/testintegration/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/testintegration/go.mod b/internal/testintegration/go.mod index 59722d2..af218e5 100644 --- a/internal/testintegration/go.mod +++ b/internal/testintegration/go.mod @@ -18,7 +18,7 @@ require ( github.com/go-openapi/swag/conv v0.25.5 // indirect github.com/go-openapi/swag/jsonname v0.25.5 // indirect github.com/go-openapi/swag/jsonutils v0.25.5 // indirect - github.com/go-openapi/swag/mangling v0.25.4 // indirect + github.com/go-openapi/swag/mangling v0.25.5 // indirect github.com/go-openapi/swag/stringutils v0.25.5 // indirect github.com/go-openapi/swag/typeutils v0.25.5 // indirect github.com/go-openapi/swag/yamlutils v0.25.5 // indirect diff --git a/internal/testintegration/go.sum b/internal/testintegration/go.sum index f0c473d..760cb59 100644 --- a/internal/testintegration/go.sum +++ b/internal/testintegration/go.sum @@ -22,8 +22,8 @@ github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.5 h1:SX6sE4FrGb4sEnnxbF github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.5/go.mod h1:/2KvOTrKWjVA5Xli3DZWdMCZDzz3uV/T7bXwrKWPquo= github.com/go-openapi/swag/loading v0.25.5 h1:odQ/umlIZ1ZVRteI6ckSrvP6e2w9UTF5qgNdemJHjuU= github.com/go-openapi/swag/loading v0.25.5/go.mod h1:I8A8RaaQ4DApxhPSWLNYWh9NvmX2YKMoB9nwvv6oW6g= -github.com/go-openapi/swag/mangling v0.25.4 h1:2b9kBJk9JvPgxr36V23FxJLdwBrpijI26Bx5JH4Hp48= -github.com/go-openapi/swag/mangling v0.25.4/go.mod h1:6dxwu6QyORHpIIApsdZgb6wBk/DPU15MdyYj/ikn0Hg= +github.com/go-openapi/swag/mangling v0.25.5 h1:hyrnvbQRS7vKePQPHHDso+k6CGn5ZBs5232UqWZmJZw= +github.com/go-openapi/swag/mangling v0.25.5/go.mod h1:6hadXM/o312N/h98RwByLg088U61TPGiltQn71Iw0NY= github.com/go-openapi/swag/stringutils v0.25.5 h1:NVkoDOA8YBgtAR/zvCx5rhJKtZF3IzXcDdwOsYzrB6M= github.com/go-openapi/swag/stringutils v0.25.5/go.mod h1:PKK8EZdu4QJq8iezt17HM8RXnLAzY7gW0O1KKarrZII= github.com/go-openapi/swag/typeutils v0.25.5 h1:EFJ+PCga2HfHGdo8s8VJXEVbeXRCYwzzr9u4rJk7L7E= From 82a4ec3a6e161110dc2d69a660f0e4653f9cc7b1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 6 Mar 2026 22:04:04 +0000 Subject: [PATCH 4/4] Add doc.go to internal/testintegration to satisfy linter The build tag on all test files made the linter complain about no Go code in the module. Adding a doc.go with just a package declaration fixes this. Co-authored-by: fredbi <14262513+fredbi@users.noreply.github.com> --- internal/testintegration/doc.go | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 internal/testintegration/doc.go diff --git a/internal/testintegration/doc.go b/internal/testintegration/doc.go new file mode 100644 index 0000000..dd0f0be --- /dev/null +++ b/internal/testintegration/doc.go @@ -0,0 +1,5 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + +// Package analysis contains integration tests for the go-openapi/analysis module. +package analysis