-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Improve tasks CLI #821
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
Improve tasks CLI #821
Conversation
- to make it consistent with `npm run watch`
- no need to hide mapbox access tokens (there are public) - remove `export MAPBOX_ACCESS_TOKEN` step in contributing guide
- group sub-tasks in subroutines - DRY up using common module - add image test container setup sub-task such that `npm run pretest` on CircleCI runs the docker container and sets it up once and for all
- format bundle does not make sense in a non-watchify context
- use in watchified bundle module
- use in image test container tasks to display to the last build/plotly.js bundle time.
| - sudo ./tasks/run_in_testbed.sh mytestbed "export CIRCLECI=1 && node test/image/compare_pixels_test.js" | ||
| - sudo ./tasks/run_in_testbed.sh mytestbed "node test/image/export_test.js" | ||
| - npm run test-image | ||
| - npm run test-export |
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.
the local vs CI differences are now handled at the task-runner script level.
tasks/preprocess.js
Outdated
| updateVersion(constants.pathToPlotlyGeoAssetsSrc); | ||
| // copy topojson files from sane-topojson to dist/ | ||
| function copyTopojsonFiles() { | ||
| fs.copy(constants.pathToTopojsonSrc, constants.pathToTopojsonDist, |
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.
🐄 separate lines for each arg?
|
Great PR! After those little cows and things, 💃 ! |
| containerCommands.setup = [ | ||
| containerCommands.cpIndex, | ||
| containerCommands.restart, | ||
| 'sleep 1', |
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.
Looks like the npm run pretest is a little more flaky than the previous list of shell commands on CIrcleCi.
Not sure what's up.
I've added sleep delays:
- between the
nwrestart and the ping as well as as - between the docker run and setup commands.
Hopefully that will fix it. But we might have to look into this further.
resolves #794
In brief
this PR:
tasks/in node which (1) will allow to Windows users to run them hassle-free (2) allow us to DRY up significant amounts of tasks code.pretestlifecycle task. It now contains everything needed to prep up the CircleCI box before testing including booting up the imagetest docker container (which cleans up ourcircle.ymlsignificantly)tasks/util/constants.js. No moreexport <mapbox-access-token>needed to start dev'ing!tasks/anddevtools/code.Ideas for future development
docker-composefor booting the imagetest container locally. That would mean one less dependency for devs 🎉 . Usenpm run pretestinstead (and maybe add annpm run postesttask to shut down the container while at it).