|
1 | 1 | name: VSCode extension Tests |
2 | 2 |
|
3 | 3 | on: |
4 | | - workflow_call: |
5 | | - inputs: |
6 | | - os: |
7 | | - required: true |
8 | | - type: string |
9 | | - node-version: |
10 | | - required: true |
11 | | - type: string |
12 | | - vscode-version: |
13 | | - required: true |
14 | | - type: string |
15 | | - bricks_arch: |
16 | | - required: true |
17 | | - type: string |
| 4 | + workflow_call: |
| 5 | + inputs: |
| 6 | + os: |
| 7 | + required: true |
| 8 | + type: string |
| 9 | + node-version: |
| 10 | + required: true |
| 11 | + type: string |
| 12 | + vscode-version: |
| 13 | + required: true |
| 14 | + type: string |
| 15 | + bricks_arch: |
| 16 | + required: true |
| 17 | + type: string |
18 | 18 |
|
19 | 19 | jobs: |
20 | | - test-sdk: |
21 | | - name: Test Databricks SDK |
22 | | - runs-on: ${{ inputs.os }} |
23 | | - environment: |
24 | | - name: azure-prod-usr |
25 | | - |
26 | | - defaults: |
27 | | - run: |
28 | | - shell: bash |
29 | | - working-directory: packages/databricks-sdk-js |
30 | | - env: |
31 | | - DATABRICKS_HOST: ${{ secrets.DATABRICKS_HOST }} |
32 | | - DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }} |
33 | | - TEST_DEFAULT_CLUSTER_ID: ${{ secrets.TEST_JS_SDK_CLUSTER_ID }} |
34 | | - |
35 | | - steps: |
36 | | - - uses: actions/checkout@v3 |
37 | | - |
38 | | - - name: Use Node.js ${{ inputs.node-version }} |
39 | | - uses: actions/setup-node@v3 |
40 | | - with: |
41 | | - node-version: ${{ inputs.node-version }} |
42 | | - cache: "yarn" |
43 | | - |
44 | | - - run: yarn install --immutable |
45 | | - |
46 | | - - name: Building packages |
47 | | - run: yarn run build |
48 | | - |
49 | | - - name: Prettier and Linting |
50 | | - run: yarn run test:lint |
51 | | - |
52 | | - - name: Unit Tests With Code Cov |
53 | | - run: yarn test:cov |
54 | | - |
55 | | - - name: Upload unit test coverage reports to Codecov |
56 | | - uses: codecov/codecov-action@v3 |
57 | | - with: |
58 | | - directory: ./coverage/unit |
59 | | - flags: unit |
60 | | - working-directory: packages/databricks-sdk-js |
61 | | - |
62 | | - - name: Integration Tests |
63 | | - run: yarn run test:integ:cov |
64 | | - |
65 | | - - name: Upload unit test coverage reports to Codecov |
66 | | - uses: codecov/codecov-action@v3 |
67 | | - with: |
68 | | - directory: ./coverage/integration |
69 | | - flags: integration |
70 | | - working-directory: packages/databricks-sdk-js |
71 | | - |
72 | | - test-extension: |
73 | | - name: Test VSCode Extension |
74 | | - runs-on: ${{ inputs.os }} |
75 | | - environment: |
76 | | - name: azure-prod-usr |
77 | | - |
78 | | - env: |
79 | | - VSCODE_TEST_VERSION: ${{ inputs.vscode-version }} |
80 | | - DATABRICKS_HOST: ${{ secrets.DATABRICKS_HOST }} |
81 | | - DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }} |
82 | | - TEST_DEFAULT_CLUSTER_ID: ${{ secrets.TEST_VSCODE_CLUSTER_ID }} |
83 | | - BRICKS_ARCH: ${{ inputs.bricks_arch }} |
84 | | - |
85 | | - defaults: |
86 | | - run: |
87 | | - shell: bash |
88 | | - |
89 | | - steps: |
90 | | - - uses: actions/checkout@v3 |
91 | | - |
92 | | - - name: Use Node.js ${{ inputs.node-version }} |
93 | | - uses: actions/setup-node@v3 |
94 | | - with: |
95 | | - node-version: ${{ inputs.node-version }} |
96 | | - cache: "yarn" |
97 | | - |
98 | | - - name: Cache wdio |
99 | | - uses: actions/cache@v3 |
100 | | - with: |
101 | | - path: /tmp/wdio-vscode-service |
102 | | - key: ${{ inputs.bricks_arch }}-${{ inputs.vscode-version }}-wdio |
103 | | - |
104 | | - - name: Cache VSCode unit test runner |
105 | | - uses: actions/cache@v3 |
106 | | - with: |
107 | | - path: /tmp/vscode-test-databricks |
108 | | - key: ${{ inputs.bricks_arch }}-${{ inputs.vscode-version }}-vscode-test |
109 | | - |
110 | | - - run: yarn install --immutable |
111 | | - |
112 | | - - name: Prettier and Linting |
113 | | - run: yarn run test:lint |
114 | | - working-directory: packages/databricks-vscode |
115 | | - |
116 | | - - name: Fetching Bricks CLI |
117 | | - run: yarn run package:cli:fetch |
118 | | - working-directory: packages/databricks-vscode |
119 | | - |
120 | | - - name: Building packages |
121 | | - run: yarn run build |
122 | | - |
123 | | - - name: Unit Tests with Coverage (OSX) |
124 | | - uses: GabrielBB/xvfb-action@v1 |
125 | | - if: inputs.os != 'windows-latest' |
126 | | - with: |
127 | | - run: yarn run test:cov |
128 | | - working-directory: packages/databricks-vscode |
129 | | - |
130 | | - - name: Unit Tests with Coverage (Windows) |
131 | | - if: inputs.os == 'windows-latest' |
132 | | - run: yarn run test:cov |
133 | | - working-directory: packages/databricks-vscode |
134 | | - |
135 | | - - name: Integration Tests |
136 | | - run: yarn run test:integ |
137 | | - working-directory: packages/databricks-vscode |
138 | | - |
139 | | - - name: Upload test logs |
140 | | - if: always() |
141 | | - continue-on-error: true |
142 | | - uses: actions/upload-artifact@v3 |
143 | | - with: |
144 | | - name: test-logs ${{ join(inputs.*, ' - ') }} - ${{ github.event_name }} |
145 | | - path: packages/databricks-vscode/logs |
| 20 | + test-sdk: |
| 21 | + name: Test Databricks SDK |
| 22 | + runs-on: ${{ inputs.os }} |
| 23 | + environment: |
| 24 | + name: azure-prod-usr |
| 25 | + |
| 26 | + defaults: |
| 27 | + run: |
| 28 | + shell: bash |
| 29 | + working-directory: packages/databricks-sdk-js |
| 30 | + env: |
| 31 | + DATABRICKS_HOST: ${{ secrets.DATABRICKS_HOST }} |
| 32 | + DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }} |
| 33 | + TEST_DEFAULT_CLUSTER_ID: ${{ secrets.TEST_JS_SDK_CLUSTER_ID }} |
| 34 | + |
| 35 | + steps: |
| 36 | + - uses: actions/checkout@v3 |
| 37 | + |
| 38 | + - name: Use Node.js ${{ inputs.node-version }} |
| 39 | + uses: actions/setup-node@v3 |
| 40 | + with: |
| 41 | + node-version: ${{ inputs.node-version }} |
| 42 | + cache: "yarn" |
| 43 | + |
| 44 | + - run: yarn install --immutable |
| 45 | + |
| 46 | + - name: Building packages |
| 47 | + run: yarn run build |
| 48 | + |
| 49 | + - name: Prettier and Linting |
| 50 | + run: yarn run test:lint |
| 51 | + |
| 52 | + - name: Unit Tests With Code Cov |
| 53 | + run: yarn test:cov |
| 54 | + |
| 55 | + - name: Upload unit test coverage reports to Codecov |
| 56 | + uses: codecov/codecov-action@v3 |
| 57 | + with: |
| 58 | + directory: ./packages/databricks-sdk-js/coverage/unit |
| 59 | + flags: unit |
| 60 | + |
| 61 | + - name: Integration Tests |
| 62 | + run: yarn run test:integ:cov |
| 63 | + |
| 64 | + - name: Upload unit test coverage reports to Codecov |
| 65 | + uses: codecov/codecov-action@v3 |
| 66 | + with: |
| 67 | + directory: ./packages/databricks-sdk-js/coverage/integration |
| 68 | + flags: integration |
| 69 | + |
| 70 | + test-extension: |
| 71 | + name: Test VSCode Extension |
| 72 | + runs-on: ${{ inputs.os }} |
| 73 | + environment: |
| 74 | + name: azure-prod-usr |
| 75 | + |
| 76 | + env: |
| 77 | + VSCODE_TEST_VERSION: ${{ inputs.vscode-version }} |
| 78 | + DATABRICKS_HOST: ${{ secrets.DATABRICKS_HOST }} |
| 79 | + DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }} |
| 80 | + TEST_DEFAULT_CLUSTER_ID: ${{ secrets.TEST_VSCODE_CLUSTER_ID }} |
| 81 | + BRICKS_ARCH: ${{ inputs.bricks_arch }} |
| 82 | + |
| 83 | + defaults: |
| 84 | + run: |
| 85 | + shell: bash |
| 86 | + |
| 87 | + steps: |
| 88 | + - uses: actions/checkout@v3 |
| 89 | + |
| 90 | + - name: Use Node.js ${{ inputs.node-version }} |
| 91 | + uses: actions/setup-node@v3 |
| 92 | + with: |
| 93 | + node-version: ${{ inputs.node-version }} |
| 94 | + cache: "yarn" |
| 95 | + |
| 96 | + - name: Cache wdio |
| 97 | + uses: actions/cache@v3 |
| 98 | + with: |
| 99 | + path: /tmp/wdio-vscode-service |
| 100 | + key: ${{ inputs.bricks_arch }}-${{ inputs.vscode-version }}-wdio |
| 101 | + |
| 102 | + - name: Cache VSCode unit test runner |
| 103 | + uses: actions/cache@v3 |
| 104 | + with: |
| 105 | + path: /tmp/vscode-test-databricks |
| 106 | + key: ${{ inputs.bricks_arch }}-${{ inputs.vscode-version }}-vscode-test |
| 107 | + |
| 108 | + - run: yarn install --immutable |
| 109 | + |
| 110 | + - name: Prettier and Linting |
| 111 | + run: yarn run test:lint |
| 112 | + working-directory: packages/databricks-vscode |
| 113 | + |
| 114 | + - name: Fetching Bricks CLI |
| 115 | + run: yarn run package:cli:fetch |
| 116 | + working-directory: packages/databricks-vscode |
| 117 | + |
| 118 | + - name: Building packages |
| 119 | + run: yarn run build |
| 120 | + |
| 121 | + - name: Unit Tests with Coverage (OSX) |
| 122 | + uses: GabrielBB/xvfb-action@v1 |
| 123 | + if: inputs.os != 'windows-latest' |
| 124 | + with: |
| 125 | + run: yarn run test:cov |
| 126 | + working-directory: packages/databricks-vscode |
| 127 | + |
| 128 | + - name: Unit Tests with Coverage (Windows) |
| 129 | + if: inputs.os == 'windows-latest' |
| 130 | + run: yarn run test:cov |
| 131 | + working-directory: packages/databricks-vscode |
| 132 | + |
| 133 | + - name: Integration Tests |
| 134 | + run: yarn run test:integ |
| 135 | + working-directory: packages/databricks-vscode |
| 136 | + |
| 137 | + - name: Upload test logs |
| 138 | + if: always() |
| 139 | + continue-on-error: true |
| 140 | + uses: actions/upload-artifact@v3 |
| 141 | + with: |
| 142 | + name: test-logs ${{ join(inputs.*, ' - ') }} - ${{ github.event_name }} |
| 143 | + path: packages/databricks-vscode/logs |
0 commit comments