-
-
Notifications
You must be signed in to change notification settings - Fork 556
CI check to verify required exercises files exist. #458
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
Conversation
Checks to see that all exercises have both a `description.md` and a `metadata.yml` file. Note this only checks for existence and does not validate the contents in any way.
If there are required files missing the return value will be nonzero and the ci check will fail.
Broken exercise to test missing file verificaton in CI.
This reverts commit b3b6af2.
Example Travis build failure: https://travis-ci.org/exercism/x-common/builds/179865364 Squashing will eliminate the reverted broken exercise commit. Fixes #457 |
require_file "$exercise_directory/metadata.yml" | ||
done | ||
|
||
exit $MISSING_FILES |
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.
not that I ever expect this to happen (so I don't ask for anything to change), but for completeness...
if the number of missing files is ever an exact multiple of 256, on my machine this would exit with 0
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.
That is a good point.
I should not try to be so clever with return values.
If this PR gets chosen I'll just make it exit 1
(if $MISSING_FILES > 0)
The links to passing and failing builds is so great—note to self: do stuff like that more! I really like how clean this is with the |
The exit value could be interpreted as 0 if there were 256 missing files, so just return 1 in case of any missing files. If the exact number is relevant in the future, further functionality can be added to the script to deal with it.
If --progress command line option is provided, progress will be displayed by outputing a `.` to STDOUT for each directory checked.
Adds progress message on completion if the --progress option is in use.
This has been open for quite a while. Is this ready to be merged? |
Yes, this is ready to be merged. There was some confusion between this PR and #459 which did essentially the same thing and were committed at almost the same time. Either is probably better than nothing but I like this one the best. (I'm definitely biased though.) I think we either need @tejasbubane to close his request, or have an independent reviewer (@ErikSchierboom?) decide which to merge. |
Regenerate the test file and update the version number. see also: #457
Adds a bash script and travis configuration update to run it to check that all exercises have both a
description.md
and ametadata.yml
file.Note: This only checks for existence and does not validate the contents in any way.