Skip to content

Commit 67ef984

Browse files
committed
Skip job runs during integration testing for PRs
1 parent d7eac59 commit 67ef984

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ vendor:
3737
@go mod vendor
3838

3939
integration:
40-
gotestsum --format github-actions --rerun-fails --jsonfile output.json --packages "./integration/..." -- -parallel 4 -timeout=2h
40+
gotestsum --format github-actions --rerun-fails --jsonfile output.json --packages "./integration/..." -- -parallel 4 -timeout=2h -short
4141

4242
.PHONY: fmt lint lintcheck test testonly coverage build snapshot vendor integration

integration/bundle/clusters_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ func TestDeployBundleWithCluster(t *testing.T) {
4444
require.NoError(t, err)
4545
require.NotNil(t, cluster)
4646

47+
if testing.Short() {
48+
t.Log("Skip the job run in short mode")
49+
return
50+
}
51+
4752
out, err := runResource(t, ctx, root, "foo")
4853
require.NoError(t, err)
4954
require.Contains(t, out, "Hello World!")

integration/bundle/python_wheel_test.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ func runPythonWheelTest(t *testing.T, templateName, sparkVersion string, pythonW
2929
destroyBundle(t, ctx, bundleRoot)
3030
})
3131

32+
if testing.Short() {
33+
t.Log("Skip the job run in short mode")
34+
return
35+
}
36+
3237
out, err := runResource(t, ctx, bundleRoot, "some_other_job")
3338
require.NoError(t, err)
3439
require.Contains(t, out, "Hello from my func")
@@ -51,9 +56,7 @@ func TestPythonWheelTaskDeployAndRunWithWrapper(t *testing.T) {
5156
}
5257

5358
func TestPythonWheelTaskDeployAndRunOnInteractiveCluster(t *testing.T) {
54-
_, wt := acc.WorkspaceTest(t)
55-
56-
if testutil.IsAWSCloud(wt) {
59+
if testutil.GetCloud(t) == testutil.AWS {
5760
t.Skip("Skipping test for AWS cloud because it is not permitted to create clusters")
5861
}
5962

integration/bundle/spark_jar_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ func runSparkJarTestCommon(t *testing.T, ctx context.Context, sparkVersion, arti
3030
destroyBundle(t, ctx, bundleRoot)
3131
})
3232

33+
if testing.Short() {
34+
t.Log("Skip the job run in short mode")
35+
return
36+
}
37+
3338
out, err := runResource(t, ctx, bundleRoot, "jar_job")
3439
require.NoError(t, err)
3540
require.Contains(t, out, "Hello from Jar!")

0 commit comments

Comments
 (0)