This is an automated email from the ASF dual-hosted git repository.

sadpandajoe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 03c97764d15 chore(ci): remove nyc usage for merging coverage results 
as Codecov natively supports the action (#42431)
03c97764d15 is described below

commit 03c97764d15838f9eaf385bc728bd8a27ca4919f
Author: Đỗ Trọng Hải <[email protected]>
AuthorDate: Tue Jul 28 00:28:26 2026 +0700

    chore(ci): remove nyc usage for merging coverage results as Codecov 
natively supports the action (#42431)
    
    Signed-off-by: hainenber <[email protected]>
---
 .github/workflows/superset-frontend.yml        | 14 +-----
 superset-frontend/src/database/actions.test.ts | 67 ++++++++++++++++++++++++++
 superset-frontend/src/database/actions.ts      |  2 +-
 3 files changed, 69 insertions(+), 14 deletions(-)

diff --git a/.github/workflows/superset-frontend.yml 
b/.github/workflows/superset-frontend.yml
index e4e61344a7c..46cb237c4d8 100644
--- a/.github/workflows/superset-frontend.yml
+++ b/.github/workflows/superset-frontend.yml
@@ -122,25 +122,13 @@ jobs:
           pattern: coverage-artifacts-*
           path: coverage/
 
-      - name: Reorganize test result reports
-        run: |
-          find coverage/
-          for i in {1..8}; do
-            mv coverage/coverage-artifacts-${i}/coverage-final.json 
coverage/coverage-shard-${i}.json
-          done
-        shell: bash
-
-      - name: Merge Code Coverage
-        run: npx nyc merge coverage/ merged-output/coverage-summary.json
-
       - name: Upload Code Coverage
         uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f 
# v7.0.0
         with:
           flags: javascript
           use_oidc: true
           verbose: true
-          disable_search: true
-          files: merged-output/coverage-summary.json
+          directory: coverage
           slug: apache/superset
 
   lint-frontend:
diff --git a/superset-frontend/src/database/actions.test.ts 
b/superset-frontend/src/database/actions.test.ts
new file mode 100644
index 00000000000..82958ae98f6
--- /dev/null
+++ b/superset-frontend/src/database/actions.test.ts
@@ -0,0 +1,67 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { executeQuery } from './actions';
+import fetchMock from 'fetch-mock';
+
+fetchMock.post('glob:*/sqllab/execute', { result: [] });
+
+afterAll(() => {
+  fetchMock.clearHistory().removeRoutes();
+});
+
+test('executeQuery', async () => {
+  const mockDispatch = jest.fn();
+  const mockedQueryExecutePayload = {
+    client_id: 'client_id_1',
+    database_id: 1,
+    runAsync: false,
+    catalog: null,
+    schema: 'schema_1',
+    sql: '1',
+    tmp_table_name: 'tmp_table_1',
+    select_as_cta: false,
+    ctas_method: 'SELECT',
+    queryLimit: 10,
+    expand_data: false,
+  };
+
+  const returnedDispatchFunc = executeQuery(mockedQueryExecutePayload);
+  await returnedDispatchFunc(mockDispatch);
+
+  const [
+    [setQueryIsLoadingActionObject],
+    [setQueryResultActionObject],
+    [setQueryIsNotLoadingActionObject],
+  ] = mockDispatch.mock.calls;
+  expect(setQueryIsLoadingActionObject).toStrictEqual({
+    type: 'SET_QUERY_IS_LOADING',
+    payload: true,
+  });
+  expect(setQueryResultActionObject).toStrictEqual({
+    type: 'SET_QUERY_RESULT',
+    payload: {
+      result: [],
+    },
+  });
+  expect(setQueryIsNotLoadingActionObject).toStrictEqual({
+    type: 'SET_QUERY_IS_LOADING',
+    payload: false,
+  });
+});
diff --git a/superset-frontend/src/database/actions.ts 
b/superset-frontend/src/database/actions.ts
index ef20594537d..fd70034dad4 100644
--- a/superset-frontend/src/database/actions.ts
+++ b/superset-frontend/src/database/actions.ts
@@ -67,7 +67,7 @@ export function executeQuery(payload: QueryExecutePayload) {
       const result = await executeQueryApi(payload);
       dispatch(setQueryResult(result as QueryExecuteResponse));
     } catch (error) {
-      dispatch(setQueryError(error.message));
+      dispatch(setQueryError((error as Error).message));
     } finally {
       dispatch(setQueryIsLoading(false));
     }

Reply via email to