Add support for installing the CLI on DBR #171
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: | |
pull_request: | |
types: [opened, synchronize] | |
push: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
action_with_defaults: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- macos-latest | |
- ubuntu-latest | |
- windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
path: ./setup-cli | |
- uses: ./setup-cli | |
- run: databricks version | |
shell: bash | |
- run: ./setup-cli/assert/version.sh $(cat ./setup-cli/VERSION) | |
shell: bash | |
action_with_version: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- macos-latest | |
- ubuntu-latest | |
- windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
path: ./setup-cli | |
- uses: ./setup-cli | |
with: | |
version: 0.200.0 | |
- run: databricks version | |
shell: bash | |
- run: ./setup-cli/assert/version.sh 0.200.0 | |
shell: bash | |
install: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- macos-latest | |
- ubuntu-latest | |
- windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
path: ./setup-cli | |
- run: env | |
shell: bash | |
- run: ./setup-cli/install.sh | |
shell: bash | |
- run: databricks version | |
shell: bash | |
- 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 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
path: ./setup-cli | |
- run: ./setup-cli/install.sh | |
shell: bash | |
env: | |
DATABRICKS_RUNTIME_VERSION: value-does-not-matter | |
# Append ~/bin to the PATH. This helps with the assertions in the next steps. | |
- run: echo "PATH=$PATH:$HOME/bin" >> $GITHUB_ENV | |
- run: databricks version | |
shell: bash | |
- 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 ~/bin | |
run: ./setup-cli/assert/path.sh ~/bin/databricks | |
shell: bash | |
curl: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- macos-latest | |
- ubuntu-latest | |
- windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
path: ./setup-cli | |
- run: curl -fsSL https://raw.githubusercontent.com/databricks/setup-cli/${{ github.sha }}/install.sh | sh | |
shell: bash | |
- run: databricks version | |
shell: bash | |
- 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 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
path: ./setup-cli | |
- run: curl -fsSL https://raw.githubusercontent.com/databricks/setup-cli/${{ github.sha }}/install.sh | sh | |
shell: bash | |
env: | |
DATABRICKS_RUNTIME_VERSION: value-does-not-matter | |
# Append ~/bin to the PATH. This helps with the assertions in the next steps. | |
- run: echo "PATH=$PATH:$HOME/bin" >> $GITHUB_ENV | |
- run: databricks version | |
shell: bash | |
- 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 ~/bin | |
run: ./setup-cli/assert/path.sh ~/bin/databricks | |
shell: bash |