diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 709807a..f8039d1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,6 +11,7 @@ jobs: - run: git config --global --add safe.directory $(pwd) - run: make - run: make test + - run: make integration - run: GOBIN=/usr/bin make lint void: runs-on: ubuntu-latest @@ -23,4 +24,5 @@ jobs: - run: git config --global --add safe.directory $(pwd) - run: make - run: make test + - run: make integration - run: GOBIN=/usr/bin make lint diff --git a/Makefile b/Makefile index 789675b..08453db 100644 --- a/Makefile +++ b/Makefile @@ -66,7 +66,9 @@ test: .PHONY: integration integration: - go test -v tests/integration_test.go + # vmtest doesn't allow provide a way to pass --tags to the command that compiles + # the test (see: vmtest.RunGoTestsInVM) so we pass it as an env variable. + GOFLAGS=--tags=integration go test -v tests/integration_test.go .PHONY: local-aur .ONESHELL: diff --git a/tests/integration_test.go b/tests/integration_test.go index 035a2fe..ce006ba 100644 --- a/tests/integration_test.go +++ b/tests/integration_test.go @@ -1,3 +1,6 @@ +//go:build integration +// +build integration + package tests import ( diff --git a/tests/integrations/enroll_keys/enroll_keys_test.go b/tests/integrations/enroll_keys/enroll_keys_test.go index 1e96250..c72c795 100644 --- a/tests/integrations/enroll_keys/enroll_keys_test.go +++ b/tests/integrations/enroll_keys/enroll_keys_test.go @@ -1,3 +1,6 @@ +//go:build integration +// +build integration + package main import ( diff --git a/tests/integrations/enroll_keys/secure_boot_enabled_test.go b/tests/integrations/enroll_keys/secure_boot_enabled_test.go index c64861c..ec1b7b8 100644 --- a/tests/integrations/enroll_keys/secure_boot_enabled_test.go +++ b/tests/integrations/enroll_keys/secure_boot_enabled_test.go @@ -1,3 +1,6 @@ +//go:build integration +// +build integration + package main import ( diff --git a/tests/integrations/list_enrolled_keys/list_enrolled_keys_test.go b/tests/integrations/list_enrolled_keys/list_enrolled_keys_test.go index 47a09de..66d5217 100644 --- a/tests/integrations/list_enrolled_keys/list_enrolled_keys_test.go +++ b/tests/integrations/list_enrolled_keys/list_enrolled_keys_test.go @@ -1,3 +1,6 @@ +//go:build integration +// +build integration + package main import (