Skip to content

Commit

Permalink
Remove SDK tests from workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
fjakobs committed Aug 18, 2023
1 parent 2c623ba commit 4e80f15
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 77 deletions.
27 changes: 5 additions & 22 deletions .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,12 @@ on:
default: 0.0.0
type: string

sdk_version:
description: "SDK Release version"
required: true
default: 0.0.0
type: string

workflow_call:
inputs:
extension_version:
default: 0.0.0
type: string

sdk_version:
default: 0.0.0
type: string

jobs:
release-pr:
runs-on: "macos-latest"
Expand All @@ -41,9 +31,6 @@ jobs:
- name: Check Extension Version
run: bash -c '$([[ "${{ inputs.extension_version }}" =~ ^([0-9]+\.){2}[0-9]+ ]])'

- name: Check SDK Version
run: bash -c '$([[ "${{ inputs.sdk_version }}" =~ ^([0-9]+\.){2}[0-9]+ ]])'

- run: |
git config --global user.name "releasebot"
git config --global user.email "noreply@github.com"
Expand All @@ -56,10 +43,6 @@ jobs:

- run: yarn install --immutable

- name: Bump SDK version
if: ${{ inputs.sdk_version != '0.0.0' }}
run: yarn workspace @databricks/databricks-sdk version ${{ inputs.sdk_version }}

- name: Bump Extension version
if: ${{ inputs.extension_version != '0.0.0' }}
run: |
Expand All @@ -71,22 +54,22 @@ jobs:
id: create-changelog
run: |
TMPFILE=$(mktemp /tmp/tmpfile.XXXX)
bash scripts/generate_changelog.sh ${{ inputs.extension_version }} ${{ inputs.sdk_version }} $TMPFILE
bash scripts/generate_changelog.sh ${{ inputs.extension_version }} $TMPFILE
cat $TMPFILE >> $GITHUB_STEP_SUMMARY
echo "changelog_file=$TMPFILE" >> $GITHUB_OUTPUT
- name: Generate notice file
if: ${{ inputs.extension_version != '0.0.0' && inputs.sdk_version != '0.0.0' }}
if: ${{ inputs.extension_version != '0.0.0' }}
run: yarn run generate-notice

- name: lint fix
if: ${{ inputs.extension_version != '0.0.0' && inputs.sdk_version != '0.0.0' }}
if: ${{ inputs.extension_version != '0.0.0' }}
run: yarn run fix

- name: Create Branch
if: ${{ inputs.extension_version != '0.0.0' && inputs.sdk_version != '0.0.0' }}
if: ${{ inputs.extension_version != '0.0.0' }}
id: create-branch
run: |
COMMIT_SHA=$(git rev-parse --short HEAD)
Expand All @@ -99,7 +82,7 @@ jobs:
echo "branch_name=$BRANCH" >> $GITHUB_OUTPUT
- name: Create PR
if: ${{ inputs.extension_version != '0.0.0' && inputs.sdk_version != '0.0.0'}}
if: ${{ inputs.extension_version != '0.0.0'}}
run: |
gh pr create -B main -H ${{ steps.create-branch.outputs.branch_name }} --title "Release: v${{ inputs.extension_version }}" --body-file ${{ steps.create-changelog.outputs.changelog_file }}
rm ${{ steps.create-changelog.outputs.changelog_file }}
Expand Down
50 changes: 0 additions & 50 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,56 +17,6 @@ on:
type: string

jobs:
test-sdk:
name: Test Databricks SDK
runs-on: ${{ inputs.os }}
environment:
name: azure-prod-usr

defaults:
run:
shell: bash
working-directory: packages/databricks-sdk-js
env:
DATABRICKS_HOST: ${{ secrets.DATABRICKS_HOST }}
DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }}
TEST_DEFAULT_CLUSTER_ID: ${{ secrets.TEST_JS_SDK_CLUSTER_ID }}

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ inputs.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node-version }}
cache: "yarn"

- run: yarn install --immutable

- name: Building packages
run: yarn run build

- name: Prettier and Linting
run: yarn run test:lint

- name: Unit Tests With Code Cov
run: yarn test:cov

- name: Upload unit test coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
directory: ./packages/databricks-sdk-js/coverage/unit
flags: unit

- name: Integration Tests
run: yarn run test:integ:cov

- name: Upload unit test coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
directory: ./packages/databricks-sdk-js/coverage/integration
flags: integration

test-extension:
name: Test VSCode Extension
runs-on: ${{ inputs.os }}
Expand Down
6 changes: 1 addition & 5 deletions scripts/generate_changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ process() {

if [[ "$1" != "0.0.0" ]]; then
for PACKAGE in "packages/databricks-vscode" "packages/databricks-vscode-types"; do
process $PACKAGE $1 $3
process $PACKAGE $1 $2
done
fi

if [[ "$2" != "0.0.0" ]]; then
process "packages/databricks-sdk-js" $2 $3
fi

0 comments on commit 4e80f15

Please sign in to comment.