diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c1610b4f8a..60816fda91 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -68,27 +68,12 @@ jobs: run: go mod download - name: Run integration tests env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GITHUB_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} ENT_TEST_DATABASE_URL: 'postgresql://guac:guac@localhost/guac?sslmode=disable' run: make integration-test - + test-unit: runs-on: ubuntu-latest name: CI for unit tests - services: - postgres: - image: postgres - env: - POSTGRES_USER: guac - POSTGRES_PASSWORD: guac - options: >- - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - ports: - - 5432:5432 steps: - name: Checkout code uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # tag=v3 @@ -103,8 +88,6 @@ jobs: - name: Setup the project run: go mod download - name: Run tests - env: - ENT_TEST_DATABASE_URL: 'postgresql://guac:guac@localhost/guac?sslmode=disable' run: make test static-analysis: diff --git a/pkg/assembler/backends/ent/backend/artifact_test.go b/pkg/assembler/backends/ent/backend/artifact_test.go index 43ae52680b..ec35441eb7 100644 --- a/pkg/assembler/backends/ent/backend/artifact_test.go +++ b/pkg/assembler/backends/ent/backend/artifact_test.go @@ -13,6 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build integration + package backend import ( diff --git a/pkg/assembler/backends/ent/backend/certify_test.go b/pkg/assembler/backends/ent/backend/certify_test.go index 19e9898c14..120aa2cd13 100644 --- a/pkg/assembler/backends/ent/backend/certify_test.go +++ b/pkg/assembler/backends/ent/backend/certify_test.go @@ -13,6 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build integration + package backend import ( diff --git a/pkg/assembler/backends/ent/backend/dependency_test.go b/pkg/assembler/backends/ent/backend/dependency_test.go index b4d7b7a912..d564a0332b 100644 --- a/pkg/assembler/backends/ent/backend/dependency_test.go +++ b/pkg/assembler/backends/ent/backend/dependency_test.go @@ -13,6 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build integration + package backend // func (s *Suite) TestIsDependency() { diff --git a/pkg/assembler/backends/ent/backend/hashequal_test.go b/pkg/assembler/backends/ent/backend/hashequal_test.go index 9d330ecf40..a7846a27e6 100644 --- a/pkg/assembler/backends/ent/backend/hashequal_test.go +++ b/pkg/assembler/backends/ent/backend/hashequal_test.go @@ -13,6 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build integration + package backend import ( diff --git a/pkg/assembler/backends/ent/backend/helpers_test.go b/pkg/assembler/backends/ent/backend/helpers_test.go index 0faaf0d030..34e4f1eb19 100644 --- a/pkg/assembler/backends/ent/backend/helpers_test.go +++ b/pkg/assembler/backends/ent/backend/helpers_test.go @@ -13,6 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build integration + package backend import ( diff --git a/pkg/assembler/backends/ent/backend/neighbors_test.go b/pkg/assembler/backends/ent/backend/neighbors_test.go index c03ca040a0..f451d01f83 100644 --- a/pkg/assembler/backends/ent/backend/neighbors_test.go +++ b/pkg/assembler/backends/ent/backend/neighbors_test.go @@ -13,6 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build integration + package backend import ( diff --git a/pkg/assembler/backends/ent/backend/occurrence_test.go b/pkg/assembler/backends/ent/backend/occurrence_test.go index 48183b12ef..edb6b7f616 100644 --- a/pkg/assembler/backends/ent/backend/occurrence_test.go +++ b/pkg/assembler/backends/ent/backend/occurrence_test.go @@ -13,6 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build integration + package backend import ( diff --git a/pkg/assembler/backends/ent/backend/package_test.go b/pkg/assembler/backends/ent/backend/package_test.go index 13ea9b6644..bcd8097c2e 100644 --- a/pkg/assembler/backends/ent/backend/package_test.go +++ b/pkg/assembler/backends/ent/backend/package_test.go @@ -13,6 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build integration + package backend import ( diff --git a/pkg/assembler/backends/ent/backend/pkgequal_test.go b/pkg/assembler/backends/ent/backend/pkgequal_test.go index 5995e17c42..1c59cd6f12 100644 --- a/pkg/assembler/backends/ent/backend/pkgequal_test.go +++ b/pkg/assembler/backends/ent/backend/pkgequal_test.go @@ -13,6 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build integration + package backend import ( diff --git a/pkg/assembler/backends/ent/backend/sbom_test.go b/pkg/assembler/backends/ent/backend/sbom_test.go index 48167a4354..4a0b5488cf 100644 --- a/pkg/assembler/backends/ent/backend/sbom_test.go +++ b/pkg/assembler/backends/ent/backend/sbom_test.go @@ -13,6 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build integration + package backend import ( diff --git a/pkg/assembler/backends/ent/backend/scorecard_test.go b/pkg/assembler/backends/ent/backend/scorecard_test.go index a7e33af3bd..cb4cbf5862 100644 --- a/pkg/assembler/backends/ent/backend/scorecard_test.go +++ b/pkg/assembler/backends/ent/backend/scorecard_test.go @@ -13,6 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build integration + package backend import ( diff --git a/pkg/assembler/backends/ent/backend/search_test.go b/pkg/assembler/backends/ent/backend/search_test.go index a2d582539e..cd4f518514 100644 --- a/pkg/assembler/backends/ent/backend/search_test.go +++ b/pkg/assembler/backends/ent/backend/search_test.go @@ -13,6 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build integration + package backend import ( diff --git a/pkg/assembler/backends/ent/backend/slsa_test.go b/pkg/assembler/backends/ent/backend/slsa_test.go index c39da162b0..a45812ead5 100644 --- a/pkg/assembler/backends/ent/backend/slsa_test.go +++ b/pkg/assembler/backends/ent/backend/slsa_test.go @@ -13,6 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build integration + package backend import ( diff --git a/pkg/assembler/backends/ent/backend/software_test.go b/pkg/assembler/backends/ent/backend/software_test.go index 6a430b41b1..0b60e0b42b 100644 --- a/pkg/assembler/backends/ent/backend/software_test.go +++ b/pkg/assembler/backends/ent/backend/software_test.go @@ -13,6 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build integration + package backend // Usually this would be part of ent, but the import cycle doesn't allow for it. diff --git a/pkg/assembler/backends/ent/backend/source_test.go b/pkg/assembler/backends/ent/backend/source_test.go index acd7164d5c..7e248a5aa6 100644 --- a/pkg/assembler/backends/ent/backend/source_test.go +++ b/pkg/assembler/backends/ent/backend/source_test.go @@ -13,6 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build integration + package backend import ( diff --git a/pkg/assembler/backends/ent/backend/vex_test.go b/pkg/assembler/backends/ent/backend/vex_test.go index e796969b2a..4eb85ef895 100644 --- a/pkg/assembler/backends/ent/backend/vex_test.go +++ b/pkg/assembler/backends/ent/backend/vex_test.go @@ -13,6 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build integration + package backend // func (s *Suite) TestVEX() { diff --git a/pkg/assembler/backends/ent/backend/vulnerability_test.go b/pkg/assembler/backends/ent/backend/vulnerability_test.go index db6b253d5d..149b2d9ec2 100644 --- a/pkg/assembler/backends/ent/backend/vulnerability_test.go +++ b/pkg/assembler/backends/ent/backend/vulnerability_test.go @@ -13,6 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build integration + package backend //var c1 = &model.VulnerabilityInputSpec{