diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 3ba151a92..1b160e022 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -7,32 +7,6 @@ on: branches: [main, bundle-integ] jobs: - run-tests: - strategy: - fail-fast: false - matrix: - arch: - [ - { cli_arch: darwin_amd64, os: macos-latest }, - { cli_arch: windows_amd64, os: windows-latest }, - ] - node-version: [18.x] - vscode-version: [stable] - uses: ./.github/workflows/tests.yml - with: - os: ${{ matrix.arch.os }} - node-version: ${{ matrix.node-version }} - vscode-version: ${{ matrix.vscode-version }} - cli_arch: ${{ matrix.arch.cli_arch }} - secrets: inherit - - validate-tests: - runs-on: ubuntu-latest - needs: ["run-tests"] - steps: - - run: echo "Tests successfull" - shell: bash - package: name: Package Arm64 VSIX runs-on: "macos-latest" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index 61a73f1ee..000000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,212 +0,0 @@ -name: VSCode extension Tests - -on: - workflow_call: - inputs: - os: - required: true - type: string - node-version: - required: true - type: string - vscode-version: - required: true - type: string - cli_arch: - required: true - type: string - -jobs: - unit-test-extension: - name: Run unit tests - runs-on: ${{ inputs.os }} - environment: - name: azure-prod-usr - - env: - VSCODE_TEST_VERSION: ${{ inputs.vscode-version }} - DATABRICKS_HOST: ${{ secrets.DATABRICKS_HOST }} - DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }} - TEST_DEFAULT_CLUSTER_ID: ${{ secrets.TEST_VSCODE_CLUSTER_ID }} - CLI_ARCH: ${{ inputs.cli_arch }} - - defaults: - run: - shell: bash - - 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" - - - name: Cache VSCode unit test runner - uses: actions/cache@v3 - with: - path: /tmp/vscode-test-databricks - key: ${{ inputs.cli_arch }}-${{ inputs.vscode-version }}-vscode-test - - - run: yarn install --immutable - - - name: Prettier and Linting - run: yarn run test:lint - working-directory: packages/databricks-vscode - - - name: Fetching Databricks CLI - run: yarn run package:cli:fetch - working-directory: packages/databricks-vscode - env: - GH_TOKEN: ${{ github.token }} - - - name: Building packages - run: yarn run build - - - name: Unit Tests with Coverage - uses: coactions/setup-xvfb@v1 - with: - run: yarn run test:cov - working-directory: packages/databricks-vscode - - list-integration-test-specs: - name: Generate integration test matrix - runs-on: ${{ inputs.os }} - outputs: - specs: ${{ steps.generate-matrix.outputs.specs }} - defaults: - run: - shell: bash - - 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: Generate matrix - id: generate-matrix - run: | - echo "specs=$(yarn ts-node scripts/list_integration_tests.ts)" - echo "specs=$(yarn ts-node scripts/list_integration_tests.ts)" >> $GITHUB_OUTPUT - working-directory: packages/databricks-vscode - - extension-integration-tests: - name: Run extension e2e integration tests - needs: [list-integration-test-specs] - strategy: - fail-fast: false - matrix: - spec: ${{fromJson(needs.list-integration-test-specs.outputs.specs)}} - - runs-on: ${{ inputs.os }} - environment: - name: azure-prod-usr - - env: - VSCODE_TEST_VERSION: ${{ inputs.vscode-version }} - DATABRICKS_HOST: ${{ secrets.DATABRICKS_HOST }} - DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }} - TEST_DEFAULT_CLUSTER_ID: ${{ secrets.TEST_VSCODE_CLUSTER_ID }} - CLI_ARCH: ${{ inputs.cli_arch }} - - defaults: - run: - shell: bash - - 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" - - - name: Get vscode engine - id: vscode-engine - run: | - echo "vscode=$(cat package.json | jq .engines.vscode | tr -d '^"')" - echo "vscode=$(cat package.json | jq .engines.vscode | tr -d '^"')" >> $GITHUB_OUTPUT - working-directory: packages/databricks-vscode - - - name: Cache wdio - id: wdio-cache - uses: actions/cache@v3 - with: - path: packages/databricks-vscode/tmp/wdio-vscode-service - key: ${{ inputs.cli_arch }}-${{ steps.vscode-engine.outputs.vscode }}-wdio - - - name: mkdir packages/databricks-vscode/tmp/wdio-vscode-service - run: mkdir -p packages/databricks-vscode/tmp/wdio-vscode-service - if: steps.wdio-cache.outputs.cache-hit != 'true' - - - run: yarn install --immutable - - - name: Fetching Databricks CLI - run: yarn run package:cli:fetch - working-directory: packages/databricks-vscode - env: - GH_TOKEN: ${{ github.token }} - - - name: Building packages - run: yarn run build - - - name: Integration Tests - run: yarn run test:integ:extension --spec ${{ matrix.spec.path }} - working-directory: packages/databricks-vscode - - - name: Upload test logs - if: failure() - continue-on-error: true - uses: actions/upload-artifact@v3 - with: - name: test-logs ${{ join(inputs.*, ' - ') }} - ${{ matrix.spec.baseName }} - ${{ github.event_name }} - path: packages/databricks-vscode/logs - - sdk-wrappers-integration-tests: - name: Run integration tests for SDK wrappers - runs-on: ${{ inputs.os }} - environment: - name: azure-prod-usr - - env: - VSCODE_TEST_VERSION: ${{ inputs.vscode-version }} - DATABRICKS_HOST: ${{ secrets.DATABRICKS_HOST }} - DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }} - TEST_DEFAULT_CLUSTER_ID: ${{ secrets.TEST_VSCODE_CLUSTER_ID }} - CLI_ARCH: ${{ inputs.cli_arch }} - - defaults: - run: - shell: bash - - 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: Fetching Databricks CLI - run: yarn run package:cli:fetch - working-directory: packages/databricks-vscode - env: - GH_TOKEN: ${{ github.token }} - - - name: Building packages - run: yarn run build - - - name: Integration Tests SDK wrappers - run: yarn run test:integ:sdk - working-directory: packages/databricks-vscode