Skip to content

Commit

Permalink
Skip integration tests when running make test
Browse files Browse the repository at this point in the history
and run them with `make integration`

Signed-off-by: Dimitris Karakasilis <[email protected]>
  • Loading branch information
jimmykarily committed Apr 24, 2024
1 parent 5e58670 commit 90e8ef2
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions tests/integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build integration
// +build integration

package tests

import (
Expand Down
3 changes: 3 additions & 0 deletions tests/integrations/enroll_keys/enroll_keys_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build integration
// +build integration

package main

import (
Expand Down
3 changes: 3 additions & 0 deletions tests/integrations/enroll_keys/secure_boot_enabled_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build integration
// +build integration

package main

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build integration
// +build integration

package main

import (
Expand Down

0 comments on commit 90e8ef2

Please sign in to comment.