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

Add json checking for more mods on all PRs #35995

Merged
merged 2 commits into from
Dec 16, 2019

Conversation

jbytheway
Copy link
Contributor

Summary

SUMMARY: Infrastructure "Add json checking for more mods on all PRs"

Purpose of change

Currently our CI doesn't check mod json except for a couple of cases, and in one of those cases (Magiclysm) it doesn't check it on json-only PRs, which is unhelpful.

This makes it easy for more json errors to creep in (as has happened recently a couple of times with Magiclysm).

Describe the solution

Add an additional test run, called as part of the TEST_STAGE CI job (i.e. the first one, which runs in full on json-only changes). This runs the test executable with every mod enabled (except those from a blacklist), without actually running any tests.

The purposes is simply to load all of the mod json, enabling us to catch any errors therein.

At the same time, I took the opportunity to simplify the code which parses the --mods argument to the test executable.

Describe alternatives you've considered

Fixing all the mods first, so we wouldn't need the blacklist, but that is problematic.

Testing

Have done some local testing, but to truly test I need to see Travis run this, which is why this is marked [WIP].

@BevapDin
Copy link
Contributor

Would be nice if this script could considers the mod dependencies, e.g. if mod A requires mod B, the script should only test mod A and it can skip testing mod B as it was already loaded in the test for mod A.

@jbytheway
Copy link
Contributor Author

We're testing all the mods at once, so dependencies are not the issue -- conflicts between mods could be, but I'll leave that for a future PR.

@ifreund ifreund added <Enhancement / Feature> New features, or enhancements on existing Code: Build Issues regarding different builds and build environments [C++] Changes (can be) made in C++. Previously named `Code` Mods Issues related to mods or modding labels Dec 11, 2019
@jbytheway jbytheway force-pushed the json_checking_more_mods branch 2 times, most recently from ae6f982 to e46bf0d Compare December 15, 2019 03:34
@jbytheway jbytheway force-pushed the json_checking_more_mods branch 3 times, most recently from b76efc4 to 0079cdb Compare December 15, 2019 15:13
@jbytheway jbytheway changed the title [WIP] Add json checking for more mods on all PRs Add json checking for more mods on all PRs Dec 15, 2019
@jbytheway
Copy link
Contributor Author

Appears to be working properly now.

The test executable had custom string splitting code.  Use the generic
string_split instead.
Currently our CI doesn't check mod json except for a couple of cases,
and in one of those cases (Magiclysm) it doesn't check it on json-only
PRs, which is unhelpful.

Add an additional test run, called as part of the TEST_STAGE CI job
(i.e. the first one, which runs in full on json-only changes).  This
runs the test executable with every mod enabled (except those from a
blacklist), without actually running any tests.

The purposes is simply to load all of the mod json, enabling us to catch
any errors therein.
@jbytheway jbytheway force-pushed the json_checking_more_mods branch from 0079cdb to f122583 Compare December 15, 2019 20:35
@ZhilkinSerg ZhilkinSerg merged commit 79be8d6 into CleverRaven:master Dec 16, 2019
@jbytheway jbytheway deleted the json_checking_more_mods branch December 17, 2019 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Code: Build Issues regarding different builds and build environments <Enhancement / Feature> New features, or enhancements on existing Mods Issues related to mods or modding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants