* Steps to run during PR builds.
()
| 41 | * Steps to run during PR builds. |
| 42 | */ |
| 43 | function prBuildWorkflow() { |
| 44 | if (buildTargetsInclude(Targets.PRESUBMIT)) { |
| 45 | timedExecOrDie('amp presubmit'); |
| 46 | } |
| 47 | |
| 48 | if (buildTargetsInclude(Targets.INVALID_WHITESPACES)) { |
| 49 | timedExecOrDie('amp check-invalid-whitespaces'); |
| 50 | } |
| 51 | |
| 52 | if (buildTargetsInclude(Targets.IGNORE_LIST)) { |
| 53 | timedExecOrDie(`amp check-ignore-lists`); |
| 54 | } |
| 55 | |
| 56 | if (buildTargetsInclude(Targets.LINT_RULES)) { |
| 57 | timedExecOrDie('amp lint'); |
| 58 | } else if (buildTargetsInclude(Targets.LINT)) { |
| 59 | timedExecOrDie('amp lint --local_changes'); |
| 60 | } |
| 61 | |
| 62 | if (buildTargetsInclude(Targets.PRETTIFY)) { |
| 63 | timedExecOrDie('amp prettify'); |
| 64 | } |
| 65 | |
| 66 | if (buildTargetsInclude(Targets.JSON_FILES)) { |
| 67 | timedExecOrDie('amp check-json-schemas'); |
| 68 | } |
| 69 | |
| 70 | if (buildTargetsInclude(Targets.AVA)) { |
| 71 | timedExecOrDie('amp ava'); |
| 72 | } |
| 73 | |
| 74 | if (buildTargetsInclude(Targets.BUILD_SYSTEM)) { |
| 75 | timedExecOrDie('amp check-build-system'); |
| 76 | } |
| 77 | |
| 78 | if (buildTargetsInclude(Targets.BABEL_PLUGIN)) { |
| 79 | timedExecOrDie('amp babel-plugin-tests'); |
| 80 | } |
| 81 | |
| 82 | if (buildTargetsInclude(Targets.DOCS)) { |
| 83 | timedExecOrDie('amp check-links --local_changes'); // only for PR builds |
| 84 | timedExecOrDie('amp markdown-toc'); |
| 85 | } |
| 86 | |
| 87 | if (buildTargetsInclude(Targets.OWNERS)) { |
| 88 | timedExecOrDie('amp check-owners --local_changes'); // only for PR builds |
| 89 | } |
| 90 | |
| 91 | if (buildTargetsInclude(Targets.PACKAGE_UPGRADE)) { |
| 92 | timedExecOrDie('amp check-exact-versions'); |
| 93 | } |
| 94 | |
| 95 | if (buildTargetsInclude(Targets.RENOVATE_CONFIG)) { |
| 96 | timedExecOrDie('amp check-renovate-config'); |
| 97 | } |
| 98 | |
| 99 | if (buildTargetsInclude(Targets.SERVER)) { |
| 100 | timedExecOrDie('amp server-tests'); |
nothing calls this directly
no test coverage detected