Ensures that all Unit Tests are ticked in _unit_tests.dm (#76404)

## About The Pull Request

Ensures we don't get a repeat of #76345 (unit test that wasn't ticked in
the `_unit_tests.dm` file, fixed in
596ca8b6d4). Basically, we leverage the
code that was already being used in the DME Validator but then expand it
a bunch via using JSON Schemas that correspond to the type of scan we
want to run. Even though sorting unit tests alphabetically is a bit
different than sorting the tgstation DME, it's good to leverage the
already existing framework rather than create a copy-pasta "lesser" code
runner. This went through strenous testing on my end, so let me know if
anything seems off.

While in the area, I added some other niceties that I've found work
really well in GitHub Runners environments, as well as local testing in
case you really like doing that before you make a PR for some reason.
## Why It's Good For The Game


![image](https://github.com/tgstation/tgstation/assets/34697715/307161d7-cef1-418b-9a51-2a7bf6c5b678)

This is what it looks like pre-596ca8b6d4cc49cd69fc104b53b7f4973497a2e5
(this is now merged, so it will pass CI)

De-hardcodes some stuff and allows for some neater flexibility, less
cringe unit tests being coded and not being ticked in the file, etc.
etc.
## Changelog
Nothing for players to care about.

Let me know if you have a better idea than the schemas, I couldn't think
of one that could be really extensible and flexible in the same way this
is.
This commit is contained in:
san7890
2023-06-30 14:16:37 +12:00
committed by GitHub
parent 74d6e315a3
commit 616772574e
6 changed files with 160 additions and 99 deletions
+5 -3
View File
@@ -79,6 +79,7 @@
/// A trait source when adding traits through unit tests
#define TRAIT_SOURCE_UNIT_TESTS "unit_tests"
// BEGIN_INCLUDE
#include "ablative_hud.dm"
#include "achievements.dm"
#include "anchored_mobs.dm"
@@ -146,8 +147,8 @@
#include "knockoff_component.dm"
#include "lesserform.dm"
#include "limbsanity.dm"
#include "lungs.dm"
#include "load_map_security.dm"
#include "lungs.dm"
#include "machine_disassembly.dm"
#include "map_landmarks.dm"
#include "mapload_space_verification.dm"
@@ -171,8 +172,8 @@
#include "objectives.dm"
#include "operating_table.dm"
#include "orderable_items.dm"
#include "organs.dm"
#include "organ_set_bonus.dm"
#include "organs.dm"
#include "outfit_sanity.dm"
#include "paintings.dm"
#include "pills.dm"
@@ -201,8 +202,8 @@
#include "screenshot_humanoids.dm"
#include "screenshot_husk.dm"
#include "screenshot_saturnx.dm"
#include "security_officer_distribution.dm"
#include "security_levels.dm"
#include "security_officer_distribution.dm"
#include "serving_tray.dm"
#include "simple_animal_freeze.dm"
#include "siunit.dm"
@@ -242,6 +243,7 @@
#include "verify_emoji_names.dm"
#include "wizard_loadout.dm"
#include "worn_icons.dm"
// END_INCLUDE
#ifdef REFERENCE_TRACKING_DEBUG //Don't try and parse this file if ref tracking isn't turned on. IE: don't parse ref tracking please mr linter
#include "find_reference_sanity.dm"
#endif