diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 7e1bc2437a..2406ed71f2 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -39,7 +39,9 @@ jobs: go install honnef.co/go/tools/cmd/staticcheck@latest - name: Pull external libraries - run: make vendor + run: | + make vendor + pip install wheel - name: Run tests run: make test diff --git a/bundle/tests/bundle/python_wheel/bundle.yml b/bundle/tests/bundle/python_wheel/bundle.yml index 9c518589df..b3a793a63d 100644 --- a/bundle/tests/bundle/python_wheel/bundle.yml +++ b/bundle/tests/bundle/python_wheel/bundle.yml @@ -5,7 +5,7 @@ artifacts: my_test_code: type: whl path: "./my_test_code" - build: "/usr/local/bin/python setup.py bdist_wheel" + build: "python setup.py bdist_wheel" resources: jobs: diff --git a/bundle/tests/bundle/wheel_test.go b/bundle/tests/bundle/wheel_test.go index 9a6b2fd2cb..5b786185b4 100644 --- a/bundle/tests/bundle/wheel_test.go +++ b/bundle/tests/bundle/wheel_test.go @@ -2,18 +2,15 @@ package bundle import ( "context" - "os" + "path/filepath" "testing" "github.com/databricks/cli/bundle" "github.com/databricks/cli/bundle/phases" - "github.com/databricks/cli/internal" "github.com/stretchr/testify/require" ) -func TestAccBundlePythonWheelBuild(t *testing.T) { - t.Log(internal.GetEnvOrSkipTest(t, "CLOUD_ENV")) - +func TestBundlePythonWheelBuild(t *testing.T) { b, err := bundle.Load("./python_wheel") require.NoError(t, err) @@ -21,6 +18,7 @@ func TestAccBundlePythonWheelBuild(t *testing.T) { err = m.Apply(context.Background(), b) require.NoError(t, err) - _, err = os.Stat("./python_wheel/my_test_code/dist/my_test_code-0.0.1-py2-none-any.whl") + matches, err := filepath.Glob("python_wheel/my_test_code/dist/my_test_code-*.whl") require.NoError(t, err) + require.Equal(t, 1, len(matches)) }