From dbbcefbdb50511a9aa566358b2567db98f2c8ca0 Mon Sep 17 00:00:00 2001 From: Shreyas Goenka Date: Thu, 22 Feb 2024 15:12:39 +0100 Subject: [PATCH] add assertions --- .github/workflows/test.yml | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 80f92e5..b8f154f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,5 @@ name: test -# TODO: Add assertion on installation path for the default routes on: pull_request: types: [opened, synchronize] @@ -86,9 +85,20 @@ jobs: - run: databricks version shell: bash - - run: ./setup-cli/assert/version.sh $(cat ./setup-cli/VERSION) + - name: Assert the version of the CLI installed + run: ./setup-cli/assert/version.sh $(cat ./setup-cli/VERSION) + shell: bash + + - name: Assert installation path is /usr/local/bin for non-windows platforms + run: ./setup-cli/assert/path.sh /usr/local/bin/databricks + if: matrix.os != 'windows-latest' shell: bash + - name: Assert installation path is /c/Windows for windows platforms + if: matrix.os == 'windows-latest' + run: ./setup-cli/assert/path.sh /c/Windows/databricks + + install-dbr: # All DBR images are built on top of Ubuntu runs-on: ubuntu-latest @@ -109,10 +119,12 @@ jobs: - run: databricks version shell: bash - - run: ./setup-cli/assert/version.sh $(cat ./setup-cli/VERSION) + - name: Assert the version of the CLI installed + run: ./setup-cli/assert/version.sh $(cat ./setup-cli/VERSION) shell: bash - - run: ./setup-cli/assert/path.sh ~/databricks + - name: Assert installation path is ~/bin + run: ./setup-cli/assert/path.sh ~/bin/databricks shell: bash curl: @@ -137,9 +149,19 @@ jobs: - run: databricks version shell: bash - - run: ./setup-cli/assert/version.sh $(cat ./setup-cli/VERSION) + - name: Assert the version of the CLI installed + run: ./setup-cli/assert/version.sh $(cat ./setup-cli/VERSION) + shell: bash + + - name: Assert installation path is /usr/local/bin for non-windows platforms + run: ./setup-cli/assert/path.sh /usr/local/bin/databricks + if: matrix.os != 'windows-latest' shell: bash + - name: Assert installation path is /c/Windows for windows platforms + if: matrix.os == 'windows-latest' + run: ./setup-cli/assert/path.sh /c/Windows/databricks + curl-dbr: # All DBR images are built on top of Ubuntu @@ -161,8 +183,10 @@ jobs: - run: databricks version shell: bash - - run: ./setup-cli/assert/version.sh $(cat ./setup-cli/VERSION) + - name: Assert the version of the CLI installed + run: ./setup-cli/assert/version.sh $(cat ./setup-cli/VERSION) shell: bash - - run: ./setup-cli/assert/path.sh ~/databricks + - name: Assert installation path is ~/bin + run: ./setup-cli/assert/path.sh ~/bin/databricks shell: bash