You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/06/25 16:29:11 UTC

[GitHub] [incubator-superset] etr2460 commented on a change in pull request #10161: build: dont prefer ts for cypress tests

etr2460 commented on a change in pull request #10161:
URL: https://github.com/apache/incubator-superset/pull/10161#discussion_r445685488



##########
File path: .github/workflows/prefer_typescript.yml
##########
@@ -6,26 +6,43 @@ on:
       - master
 
 jobs:
-  comment:
-    name: Comment about preferring TypeScript
+  check:
     runs-on: ubuntu-latest
     steps:
       - name: Get changed files
         id: changed
         uses: trilom/file-changes-action@master
         with:
           githubToken: ${{ secrets.GITHUB_TOKEN }}
+
       - name: Determine if a .js or .jsx file was added
         id: check
         run: |
-          echo ::set-output name=was_js_file_added::$(jq 'map(endswith(".js") or endswith(".jsx"))' ${HOME}/files_added.json | jq 'reduce .[] as $is_js (false; . or $is_js)')
-      - if: steps.check.outputs.was_js_file_added != 'false'
-        name: Comment about preferring TypeScript
+          js_files_added() {
+            jq -r '
+              map(
+                select(
+                  (contains("cypress-base/") | not) and
+                  (endswith(".js") or endswith(".jsx"))
+                )
+              ) | join("\n")
+            ' ${HOME}/files_added.json
+          }
+          echo ::set-output name=js_files_added::$(js_files_added)
+
+      - if: steps.check.outputs.js_files_added

Review comment:
       i think this might need to still have the string comparison? how did you test this?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org