-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Turn on esm tests #28336
Turn on esm tests #28336
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for picking this up, @erwinmombay! I've made some preliminary comments in case they might help you debug / troubleshoot.
build-system/pr-check/esm-tests.js
Outdated
|
||
if (!isTravisPullRequestBuild()) { | ||
timedExecOrDie('gulp update-packages'); | ||
timedExecOrDie('gulp dist --fortesting --esm'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to compile here. You can download what was built in the ESM Dist
job from the build
stage (added in #27705). This will shave off ~10 mins from the total build time.
amphtml/build-system/pr-check/utils.js
Lines 338 to 344 in 6913469
/** | |
* Downloads and unzips esm dist output from storage | |
* @param {string} functionName | |
*/ | |
function downloadEsmDistOutput(functionName) { | |
downloadOutput_(functionName, ESM_DIST_OUTPUT_FILE, BUILD_OUTPUT_DIRS); | |
} |
Recommended order of steps:
downloadEsmDistOutput(FILENAME);
timedExecOrDie('gulp update-packages');
timedExecOrDie('gulp integration --nobuild --compiled --headless');
build-system/pr-check/esm-tests.js
Outdated
timedExecOrDie('gulp update-packages'); | ||
timedExecOrDie('gulp dist --fortesting --esm'); | ||
timedExecOrDie( | ||
'gulp integration --nobuild --compiled --headless --coverage' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop --coverage
. (Coverage mode only works for unminified code.)
build-system/pr-check/esm-tests.js
Outdated
if (!isTravisPullRequestBuild()) { | ||
timedExecOrDie('gulp update-packages'); | ||
timedExecOrDie('gulp dist --fortesting --esm'); | ||
timedExecOrDie('gulp integration --nobuild --compiled --headless'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple comments:
-
This will not start up the test server that's built-in to
gulp integration
in--esm
mode. Is this a problem? You may need to make a change to the integration test runner to launch the server inesm
mode. See 🏗✨ Addesm
support forgulp serve
via a new typescript-based server module #27340 (comment) for details. -
This will break test status reporting by merging esm and non-esm results. You'd need to add a new mode here:
amphtml/build-system/tasks/report-test-status.js
Lines 27 to 44 in 6913469
const IS_GULP_INTEGRATION = argv._[0] === 'integration'; | |
const IS_GULP_UNIT = argv._[0] === 'unit'; | |
const IS_GULP_E2E = argv._[0] === 'e2e'; | |
const IS_LOCAL_CHANGES = !!argv.local_changes; | |
const IS_SAUCELABS = !!argv.saucelabs; | |
const IS_SAUCELABS_STABLE = !!argv.saucelabs && !!argv.stable; | |
const IS_SAUCELABS_BETA = !!argv.saucelabs && !!argv.beta; | |
const IS_SINGLE_PASS = !!argv.single_pass; | |
const TEST_TYPE_SUBTYPES = new Map([ | |
[ | |
'integration', | |
['local', 'single-pass', 'saucelabs-beta', 'saucelabs-stable'], | |
], | |
['unit', ['local', 'local-changes', 'saucelabs']], | |
['e2e', ['local']], | |
]); |
9e87060
to
b837407
Compare
dcf1124
to
0b3203c
Compare
This pull request introduces 2 alerts when merging 0b3203c into f3612a9 - view on LGTM.com new alerts:
|
b903281
to
9b399e8
Compare
Hey @rsimha! These files were changed:
|
eda171c
to
30d778c
Compare
338b1fd
to
5f8a783
Compare
5f8a783
to
d1b79c4
Compare
7303998
to
bc92991
Compare
…mpproject#27576)" This reverts commit f801a93.
… for regex replace
3638dba
to
721dd9e
Compare
721dd9e
to
e9bf0c3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
* temp * temp * add conditional to the css removal * add travis entry * add esm-tests.js file * minor fix to add coverage * remove compiled to test * add compiled back in * Revert "🏗♻️ Consolidate all `babel` configs into `babel.config.js` (ampproject#27576)" This reverts commit f801a93. * temp * temp * reset this to be close to master * temp * temp * temp * temp * for non dev builds (compiled, rtv) take into account the module build for regex replace * temp * remove debuggers * temp * apply recs * remove runner.js * apply recs * add --esm flag to integration run * download dist output as we need f.js/integration.js from dist nomodule * allow cors explicitly for mjs files GET requests * add flag to overwrite when unzipping * fix test type inference * apply recs
No description provided.