Skip to content
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

Create a testing script for new commits #167

Open
ahankinson opened this issue Jul 25, 2018 · 0 comments
Open

Create a testing script for new commits #167

ahankinson opened this issue Jul 25, 2018 · 0 comments
Assignees
Milestone

Comments

@ahankinson
Copy link
Contributor

A new script (possibly test.sh or validate.sh?) should be created that will get the latest changes from the repo and run a validator against these changes.

Files changed in the most recent commit can be discovered with the command:

git diff-tree --no-commit-id --name-only -r HEAD

This will give a list of paths. Only changes in the collections/ subfolder should be used. These paths can then be passed off to an XML validator, such as xmllint or jing, and validated against the consolidated TEI schema, as well as checking for well-formedness.

The return value of the script should be either 0 (for success) or 1 (for validation errors).

The intent of this script is to use it in a Continuous Integration environment, to check the most recent commits for any errors, and send the committer a report if the build failed.

As an extension to this, other functionality could be built in as desired, including:

  • Checking authority files for well-formedness and validity
  • Running the xQuery scripts over just the changed files (if possible?) and reporting any problems with the index file generation.

Once developed, this script could be rolled out to the other catalogues to provide similar testing and feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants