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 07:50:50 UTC

[GitHub] [incubator-superset] ktmud opened a new pull request #10161: build: dont prefer ts for cypress tests

ktmud opened a new pull request #10161:
URL: https://github.com/apache/incubator-superset/pull/10161


   ### SUMMARY
   
   Cypress tests don't need to be TypeScript
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   N/A
   
   ### TEST PLAN
   
   Check CI.
   
   Tested in https://github.com/ktmud/incubator-superset/pull/153


----------------------------------------------------------------
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


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

Posted by GitBox <gi...@apache.org>.
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


[GitHub] [incubator-superset] ktmud edited a comment on pull request #10161: build: dont prefer ts for cypress tests

Posted by GitBox <gi...@apache.org>.
ktmud edited a comment on pull request #10161:
URL: https://github.com/apache/incubator-superset/pull/10161#issuecomment-649681257


   > I feel like we should still prefer TS for all files (tests or not) but not force tests to be TS right away. What do you think? Note that this workflow doesn't block merging, this is an optional check
   
   I think it's OK to not require TypeScript for Cypress tests, as they seldom need typing. It does block merging, see: https://github.com/apache/incubator-superset/pull/10158 (because of the broken comment action, I guess).


----------------------------------------------------------------
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


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

Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #10161:
URL: https://github.com/apache/incubator-superset/pull/10161#discussion_r445701505



##########
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:
       Yeah, fortunately empty string is also considered falsy in GitHub actions.




----------------------------------------------------------------
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


[GitHub] [incubator-superset] ktmud merged pull request #10161: build: dont prefer ts for cypress tests

Posted by GitBox <gi...@apache.org>.
ktmud merged pull request #10161:
URL: https://github.com/apache/incubator-superset/pull/10161


   


----------------------------------------------------------------
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


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

Posted by GitBox <gi...@apache.org>.
etr2460 commented on a change in pull request #10161:
URL: https://github.com/apache/incubator-superset/pull/10161#discussion_r445686764



##########
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:
       oh, i see your link to your fork. nevermind




----------------------------------------------------------------
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


[GitHub] [incubator-superset] ktmud edited a comment on pull request #10161: build: dont prefer ts for cypress tests

Posted by GitBox <gi...@apache.org>.
ktmud edited a comment on pull request #10161:
URL: https://github.com/apache/incubator-superset/pull/10161#issuecomment-649681257


   > I feel like we should still prefer TS for all files (tests or not) but not force tests to be TS right away. What do you think? Note that this workflow doesn't block merging, this is an optional check
   
   I think it's OK to not require TypeScript for Cypress tests, as they seldom need typing. It does block merging, see: https://github.com/apache/incubator-superset/pull/10158 . Could be just a glitch though.


----------------------------------------------------------------
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


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

Posted by GitBox <gi...@apache.org>.
ktmud commented on pull request #10161:
URL: https://github.com/apache/incubator-superset/pull/10161#issuecomment-649681257


   > I feel like we should still prefer TS for all files (tests or not) but not force tests to be TS right away. What do you think? Note that this workflow doesn't block merging, this is an optional check
   
   I think it's OK to not require TypeScript for Cypress tests, as they seldom need typing. It does block merging, see: https://github.com/apache/incubator-superset/pull/10158


----------------------------------------------------------------
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