浏览代码

e2e: run CI on PRs that modify the workflow file (#3740)

…and add the option to skip build when spawning e2e locally
Antoine du Hamel 2 年之前
父节点
当前提交
f325fb2163
共有 2 个文件被更改,包括 6 次插入1 次删除
  1. 4 0
      .github/workflows/e2e.yml
  2. 2 1
      package.json

+ 4 - 0
.github/workflows/e2e.yml

@@ -4,6 +4,10 @@ on:
     branches: [ main ]
   pull_request_target:
     types: [ opened, synchronize, reopened, labeled ]
+  pull_request:
+    types: [ opened, synchronize, reopened ]
+    path:
+      - .github/workflows/e2e.yml
 
 concurrency: ${{ github.workflow }}--${{ github.ref }}
 

+ 2 - 1
package.json

@@ -147,7 +147,8 @@
     "size": "echo 'JS Bundle mingz:' && cat ./packages/uppy/dist/uppy.min.js | gzip | wc -c && echo 'CSS Bundle mingz:' && cat ./packages/uppy/dist/uppy.min.css | gzip | wc -c",
     "start:companion": "bash bin/companion.sh",
     "start": "npm-run-all --parallel watch start:companion web:start",
-    "e2e": "yarn build && npm-run-all --parallel watch:js:lib e2e:client start:companion e2e:cypress",
+    "e2e": "yarn build && yarn e2e:skip-build",
+    "e2e:skip-build": "npm-run-all --parallel watch:js:lib e2e:client start:companion e2e:cypress",
     "e2e:ci": "start-server-and-test 'npm-run-all --parallel e2e:client start:companion' '1234|3020' e2e:headless",
     "e2e:client": "yarn workspace e2e client:start",
     "e2e:cypress": "yarn workspace e2e cypress:open",