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.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 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/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= 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 (