Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bundle/tests/bundle/python_wheel/bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 4 additions & 6 deletions bundle/tests/bundle/wheel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,23 @@ 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)

m := phases.Build()
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))
}