Run integration tests
This change runs the examples integration tests for every test run. They used to be split out because the AWS tests take so long, but now those are in their own separate package. Running the integration tests here more frequently will prevent breaking the most basic Lumi CLI commands and capabilities.
This commit is contained in:
parent
d7273b1e9e
commit
2f4d7a9789
9
Makefile
9
Makefile
|
@ -16,7 +16,7 @@ default: banner vet test install lint_quiet
|
|||
all: banner_all vet test install lint_quiet lumijs lumirtpkg lumijspkg lumipkg
|
||||
|
||||
.PHONY: nightly
|
||||
nightly: banner_all vet test install lint_quiet lumijs lumirtpkg lumijspkg lumipkg examples gocover
|
||||
nightly: all gocover
|
||||
|
||||
.PHONY: banner
|
||||
banner:
|
||||
|
@ -67,7 +67,7 @@ vet:
|
|||
.PHONY: test
|
||||
test:
|
||||
@$(ECHO) "\033[0;32mTEST:\033[0m"
|
||||
go test -cover -parallel ${TESTPARALLELISM} ${PROJECT_PKGS}
|
||||
go test -cover -parallel ${TESTPARALLELISM} ${PROJECT_PKGS} ./examples
|
||||
|
||||
.PHONY: lumijs
|
||||
lumijs:
|
||||
|
@ -86,11 +86,6 @@ publish:
|
|||
./scripts/publish.sh
|
||||
.PHONY: publish
|
||||
|
||||
.PHONY: examples
|
||||
examples:
|
||||
@$(ECHO) "\033[0;32mTEST EXAMPLES:\033[0m"
|
||||
go test -v -cover -timeout 1h -parallel ${TESTPARALLELISM} ./examples
|
||||
|
||||
.PHONY: gocover
|
||||
gocover:
|
||||
@$(ECHO) "\033[0;32mGO CODE COVERAGE:\033[0m"
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/pulumi/pulumi-fabric/pkg/integrationtesting"
|
||||
"github.com/pulumi/pulumi-fabric/pkg/testing/integration"
|
||||
)
|
||||
|
||||
func TestExamples(t *testing.T) {
|
||||
|
@ -17,19 +17,19 @@ func TestExamples(t *testing.T) {
|
|||
if !assert.NoError(t, err, "expected a valid working directory: %v", err) {
|
||||
return
|
||||
}
|
||||
examples := []string{
|
||||
path.Join(cwd, "basic/minimal"),
|
||||
}
|
||||
options := integrationtesting.LumiProgramTestOptions{
|
||||
examples := []integration.LumiProgramTestOptions{
|
||||
{
|
||||
Dir: path.Join(cwd, "basic/minimal"),
|
||||
Dependencies: []string{
|
||||
"@lumi/lumirt",
|
||||
"@lumi/lumi",
|
||||
},
|
||||
},
|
||||
}
|
||||
for _, ex := range examples {
|
||||
example := ex
|
||||
t.Run(example, func(t *testing.T) {
|
||||
integrationtesting.LumiProgramTest(t, example, options)
|
||||
t.Run(example.Dir, func(t *testing.T) {
|
||||
integration.LumiProgramTest(t, example)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue