-
Notifications
You must be signed in to change notification settings - Fork 108
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
Generate GHA workflow files from originals #485
Conversation
Moved original .github/workflows/*.yml files to a new dir called .github/workflows-ys/ Added a Makefile to the new directory. Running `make build` from there will generate the workflows/*.yml files from workflows-src/*.yml files using YAMLScript. Plain YAML files are valid YAMLScript, so these newly generated files should work the same. The generated files have no comments and are formatted according to ys default rules. From here forward, changes to the workflows-src files should not produce any changes to the workflow files. This allows us to progressively refactor the workflow-src files and be sure no bad side effects have happened.
576a4ed
to
94a619d
Compare
9408a6d
to
89c896f
Compare
291fad5
to
d725d6a
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #485 +/- ##
==========================================
- Coverage 97.28% 97.13% -0.15%
==========================================
Files 34 33 -1
Lines 11267 10473 -794
==========================================
- Hits 10961 10173 -788
+ Misses 306 300 -6 ☔ View full report in Codecov by Sentry. |
45a7834
to
fb0b0b2
Compare
6fda518
to
9649f5c
Compare
4a1d725
to
3d7fdb9
Compare
Thanks @ingydotnet ! This enables an effective way of working around github's limited workflow syntax, and makes maintenance of the workflows a breeze. For example,
that is, 185 -> 957 lines, and 7KB -> 33KB. That's a huge saving! |
Moved original .github/workflows/*.yml files to a new dir called .github/workflows-ys/
Added a Makefile to the new directory. Running
make build
from there will generate the workflows/.yml files from workflows-src/.yml files using YAMLScript. Plain YAML files are valid YAMLScript, so these newly generated files should work the same.The generated files have no comments and are formatted according to ys default rules.
From here forward, changes to the workflows-src files should not produce any changes to the workflow files.
This allows us to progressively refactor the workflow-src files and be sure no bad side effects have happened.