Replies: 1 comment
-
I had a few realizations:
So here's an updated set of flowcharts about how data can flow in our build pipelines. All data flow below will happen through artifacts, instead of caches, with the exception of The job "npm" is meant to unpack the global ~/.npm cache into
The The Finally, the e2e jobs download the .app/.apk and .jsbundle artifacts from the earlier jobs, insert the .jsbundle into the .app/.apk, and kick off the e2e tests, uploading any e2e artifacts that they create. graph TD
npm --> eslint
npm --> tsc
npm --> jest
npm --> ajv
npm --> prettier
npm --> ios.app
npm --> ios.bundle
npm --> android.app
npm --> android.bundle
npm --> e2e.ios
ios.app --> e2e.ios
ios.bundle --> e2e.ios
npm --> e2e.android
android.app --> e2e.android
android.bundle --> e2e.android
|
Beta Was this translation helpful? Give feedback.
-
I've been doing more reading, and it seems like a simple test to determine if something should be a cache or an artifact is:
If it's shared between workflows, it should be a cache.
If it's only used within one workflow, it should be an artifact.
I guess that our caches are really "per-branch"? Or just "per hash," right? I designed them fox maximum safe sharing. So the stuff should probably all remain in cache.
It might be nice to upload the jsbundle and generated app as artifacts, too, for debugging? At least until GitHub gets around to letting you download caches from the UI!
Trade offs:
I'm posting this so that I'm not just carrying this info around in my head.
Action items?
Beta Was this translation helpful? Give feedback.
All reactions