mirror of https://github.com/databricks/cli.git
Skip job runs during integration testing for PRs (#2024)
## Changes A small subset of tests trigger cluster creation to run jobs. These tests comprise a substantial amount of the total integration test runtime. We can skip them on PRs and only run them on the main branch. ## Tests Confirmed the short runtime is ~20 mins.
This commit is contained in:
parent
2fa3b48083
commit
23ddee8023
11
Makefile
11
Makefile
|
@ -30,7 +30,12 @@ vendor:
|
|||
@echo "✓ Filling vendor folder with library code ..."
|
||||
@go mod vendor
|
||||
|
||||
integration:
|
||||
gotestsum --format github-actions --rerun-fails --jsonfile output.json --packages "./integration/..." -- -parallel 4 -timeout=2h
|
||||
INTEGRATION = gotestsum --format github-actions --rerun-fails --jsonfile output.json --packages "./integration/..." -- -parallel 4 -timeout=2h
|
||||
|
||||
.PHONY: lint lintcheck test testonly coverage build snapshot vendor integration
|
||||
integration:
|
||||
$(INTEGRATION)
|
||||
|
||||
integration-short:
|
||||
$(INTEGRATION) -short
|
||||
|
||||
.PHONY: lint lintcheck test testonly coverage build snapshot vendor integration integration-short
|
||||
|
|
|
@ -44,6 +44,11 @@ func TestDeployBundleWithCluster(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
require.NotNil(t, cluster)
|
||||
|
||||
if testing.Short() {
|
||||
t.Log("Skip the job run in short mode")
|
||||
return
|
||||
}
|
||||
|
||||
out, err := runResource(t, ctx, root, "foo")
|
||||
require.NoError(t, err)
|
||||
require.Contains(t, out, "Hello World!")
|
||||
|
|
|
@ -29,6 +29,11 @@ func runPythonWheelTest(t *testing.T, templateName, sparkVersion string, pythonW
|
|||
destroyBundle(t, ctx, bundleRoot)
|
||||
})
|
||||
|
||||
if testing.Short() {
|
||||
t.Log("Skip the job run in short mode")
|
||||
return
|
||||
}
|
||||
|
||||
out, err := runResource(t, ctx, bundleRoot, "some_other_job")
|
||||
require.NoError(t, err)
|
||||
require.Contains(t, out, "Hello from my func")
|
||||
|
|
|
@ -30,6 +30,11 @@ func runSparkJarTestCommon(t *testing.T, ctx context.Context, sparkVersion, arti
|
|||
destroyBundle(t, ctx, bundleRoot)
|
||||
})
|
||||
|
||||
if testing.Short() {
|
||||
t.Log("Skip the job run in short mode")
|
||||
return
|
||||
}
|
||||
|
||||
out, err := runResource(t, ctx, bundleRoot, "jar_job")
|
||||
require.NoError(t, err)
|
||||
require.Contains(t, out, "Hello from Jar!")
|
||||
|
|
Loading…
Reference in New Issue