diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 31fd819b1a..f17859ba43 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -60,8 +60,8 @@ Then in our `handle_grabs_ch()` proc, if we want to avoid performing the stock g ### Pull Requests -* Your submission must pass Travis CI checking. The checks are important, prevent many common mistakes, and even experienced coders get caught by it sometimes. If you think there is a bug in Travis, open an issue. (One known Travis issue is comments in the middle of multi-line lists, just don't do it) -* Your PR should not have an excessive number of commits unless it is a large project or includes many separate remote commits (such as a pull from Polaris). If you need to keep tweaking your PR to pass Travis or to satisfy a maintainer's requests and are making many commits, you should squash them in the end and update your PR accordingly so these commits don't clog up the history. +* Your submission must pass CI checking. The checks are important, prevent many common mistakes, and even experienced coders get caught by it sometimes. If you think there is a bug in CI, open an issue. (One known CI issue is comments in the middle of multi-line lists, just don't do it) +* Your PR should not have an excessive number of commits unless it is a large project or includes many separate remote commits (such as a pull from Polaris). If you need to keep tweaking your PR to pass CI or to satisfy a maintainer's requests and are making many commits, you should squash them in the end and update your PR accordingly so these commits don't clog up the history. * You can create a WIP PR, and if so, please mark it with [WIP] in the title so it can be labeled appropriately. These can't sit forever, though. * If your pull request has many no-conflict merge commits ('merge from master' into your PR branch), it cannot be merged. Squash and make a new PR/forcepush to your PR branch. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..f6e206bc33 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,69 @@ +name: CI +on: + pull_request: + branches: + - master + +env: + BASENAME: "vorestation" + +jobs: + file_tests: + name: Run Linters + runs-on: ubuntu-16.04 + steps: + - uses: actions/checkout@v2 + - name: Ensure +x on CI directory + run: | + chmod -R +x ./tools/ci + - name: Install Tools + run: | + bash tools/ci/install_build_deps.sh + - name: Run Tests + run: | + tools/ci/validate_files.sh + tools/ci/build_tgui.sh + + unit_tests: + name: Integration Tests + runs-on: ubuntu-16.04 + steps: + - uses: actions/checkout@v2 + - name: Ensure +x on CI directory + run: | + chmod -R +x ./tools/ci + - name: Setup Cache + uses: actions/cache@v2 + with: + path: $HOME/BYOND + key: ${{ runner.os }}-byond + - name: Install RUST_G Dependencies + run: | + sudo dpkg --add-architecture i386 + sudo apt update || true + sudo apt install libc6:i386 libgcc1:i386 libstdc++6:i386 libssl1.0.0:i386 g++-7 g++-7-multilib gcc-multilib zlib1g:i386 + ldd librust_g.so + - name: Unit Tests + run: | + tools/ci/install_byond.sh + tools/ci/compile_and_run.sh + env: + TEST_DEFINE: "UNIT_TEST" + TEST_FILE: "code/_unit_tests.dm" + RUN: "1" + - name: Compile POIs (no run) + run: | + tools/ci/install_byond.sh + tools/ci/compile_and_run.sh + env: + TEST_DEFINE: "MAP_TEST" + TEST_FILE: "code/_map_tests.dm" + RUN: "0" + - name: Compile away missions (no run) + run: | + tools/ci/install_byond.sh + tools/ci/compile_and_run.sh + env: + TEST_DEFINE: "AWAY_MISSION_TEST" + TEST_FILE: "code/_away_mission_tests.dm" + RUN: "0" diff --git a/_build_dependencies.sh b/_build_dependencies.sh index ed9ff6f2eb..579dc9d9b5 100644 --- a/_build_dependencies.sh +++ b/_build_dependencies.sh @@ -3,8 +3,6 @@ export SPACEMANDMM_TAG=suite-1.4 # For NanoUI + TGUI export NODE_VERSION=12 -# For the scripts in tools -export PHP_VERSION=7.2 # Byond Major export BYOND_MAJOR=513 # Byond Minor diff --git a/code/_away_mission_tests.dm b/code/_away_mission_tests.dm index 75286fb34e..4d9d4e91f9 100644 --- a/code/_away_mission_tests.dm +++ b/code/_away_mission_tests.dm @@ -1,7 +1,7 @@ /* * - * This file is used by Travis to indicate that additional maps need to be compiled to look for errors such as missing paths. - * Do not add anything but the AWAY_MISSION_TEST definition here as it will be overwritten by Travis when running tests. + * This file is used by CI to indicate that additional maps need to be compiled to look for errors such as missing paths. + * Do not add anything but the AWAY_MISSION_TEST definition here as it will be overwritten by CI when running tests. * * * Should you wish to edit set AWAY_MISSION_TEST to 1 like so: diff --git a/code/_helpers/text.dm b/code/_helpers/text.dm index a9aac1ffcf..2d59fa6b6a 100644 --- a/code/_helpers/text.dm +++ b/code/_helpers/text.dm @@ -55,7 +55,7 @@ input = replace_characters(input, list("\n"=" ","\t"=" ")) if(encode) - // The below \ escapes have a space inserted to attempt to enable Travis auto-checking of span class usage. Please do not remove the space. + // The below \ escapes have a space inserted to attempt to enable CI auto-checking of span class usage. Please do not remove the space. //In addition to processing html, html_encode removes byond formatting codes like "\ red", "\ i" and other. //It is important to avoid double-encode text, it can "break" quotes and some other characters. //Also, keep in mind that escaped characters don't work in the interface (window titles, lower left corner of the main window, etc.) diff --git a/code/_map_tests.dm b/code/_map_tests.dm index 90a4004b79..372a4a7194 100644 --- a/code/_map_tests.dm +++ b/code/_map_tests.dm @@ -1,7 +1,7 @@ /* * - * This file is used by Travis to indicate that additional maps need to be compiled to look for errors such as missing paths. - * Do not add anything but the MAP_TEST definition here as it will be overwritten by Travis when running tests. + * This file is used by CI to indicate that additional maps need to be compiled to look for errors such as missing paths. + * Do not add anything but the MAP_TEST definition here as it will be overwritten by CI when running tests. * * * Should you wish to edit set MAP_TEST to 1 like so: diff --git a/code/_unit_tests.dm b/code/_unit_tests.dm index 88eebd5aec..7a1a4cbbf3 100644 --- a/code/_unit_tests.dm +++ b/code/_unit_tests.dm @@ -1,7 +1,7 @@ /* * - * This file is used by Travis to indicate that Unit Tests are to be ran. - * Do not add anything but the UNIT_TEST definition here as it will be overwritten by Travis when running tests. + * This file is used by CI to indicate that Unit Tests are to be ran. + * Do not add anything but the UNIT_TEST definition here as it will be overwritten by CI when running tests. * * * Should you wish to edit set UNIT_TEST to 1 like so: diff --git a/code/controllers/subsystems/air.dm b/code/controllers/subsystems/air.dm index 40d2cc3133..8ef34e164f 100644 --- a/code/controllers/subsystems/air.dm +++ b/code/controllers/subsystems/air.dm @@ -27,7 +27,7 @@ SUBSYSTEM_DEF(air) // Updating zone tiles requires temporary storage location of self-zone-blocked turfs across resumes. Used only by process_tiles_to_update. var/list/selfblock_deferred = null - // This is used to tell Travis WHERE the edges are. + // This is used to tell CI WHERE the edges are. var/list/startup_active_edge_log = list() /datum/controller/subsystem/air/PreInit() diff --git a/code/game/antagonist/station/rogue_ai.dm b/code/game/antagonist/station/rogue_ai.dm index 4fcb678d34..2a46cfd0d9 100644 --- a/code/game/antagonist/station/rogue_ai.dm +++ b/code/game/antagonist/station/rogue_ai.dm @@ -68,7 +68,7 @@ var/datum/antagonist/rogue_ai/malf sleep(50) to_chat(malf, "MEMCHCK Corrupted sectors confirmed. Reccomended solution: Delete. Proceed? Y/N: Y") sleep(10) - // this is so Travis doesn't complain about the backslash-B. Fixed at compile time (or should be). + // this is so CI doesn't complain about the backslash-B. Fixed at compile time (or should be). to_chat(malf, "Corrupted files deleted: sys\\core\\users.dat sys\\core\\laws.dat sys\\core\\" + "backups.dat") sleep(20) to_chat(malf, "CAUTION: Law database not found! User database not found! Unable to restore backups. Activating failsafe AI shutd3wn52&&$#!##") diff --git a/code/modules/awaymissions/zlevel.dm b/code/modules/awaymissions/zlevel.dm index dc4ad7ecd6..43c1dc4a91 100644 --- a/code/modules/awaymissions/zlevel.dm +++ b/code/modules/awaymissions/zlevel.dm @@ -1,5 +1,5 @@ proc/createRandomZlevel() - if(awaydestinations.len || UNIT_TEST) //crude, but it saves another var! //VOREStation Edit - No loading away missions during Travis testing + if(awaydestinations.len || UNIT_TEST) //crude, but it saves another var! //VOREStation Edit - No loading away missions during CI testing return var/list/potentialRandomZlevels = list() diff --git a/code/modules/research/prosfab_designs.dm b/code/modules/research/prosfab_designs.dm index 318606516f..8f932b0082 100644 --- a/code/modules/research/prosfab_designs.dm +++ b/code/modules/research/prosfab_designs.dm @@ -102,7 +102,7 @@ build_path = /obj/item/organ/external/chest gender = MALE -/obj/item/organ/external/chest/f //To satisfy Travis. :| +/obj/item/organ/external/chest/f //To satisfy CI. :| /datum/design/item/prosfab/pros/torso/female name = "FBP Torso (F)" diff --git a/code/modules/ventcrawl/ventcrawl.dm b/code/modules/ventcrawl/ventcrawl.dm index 44bb57e18c..c7af54a6d4 100644 --- a/code/modules/ventcrawl/ventcrawl.dm +++ b/code/modules/ventcrawl/ventcrawl.dm @@ -12,7 +12,7 @@ var/list/ventcrawl_machinery = list( /obj/belly, /obj/screen ) - //VOREStation Edit : added /obj/belly, to this list, travis is complaining about this in his indentation check + //VOREStation Edit : added /obj/belly, to this list, CI is complaining about this in his indentation check //mob/living/simple_mob/borer, //VORESTATION AI TEMPORARY REMOVAL REPLACE BACK IN LIST WHEN RESOLVED //VOREStation Edit /mob/living/var/list/icon/pipes_shown = list() diff --git a/guides/Guide to Map Folders.md b/guides/Guide to Map Folders.md index 3131cb530c..95ad239178 100644 --- a/guides/Guide to Map Folders.md +++ b/guides/Guide to Map Folders.md @@ -34,7 +34,7 @@ RandomZLevels: Polaris, do not touch southern_cross: Polaris, do not touch submaps: All our submaps. non _vr files are Polaris, do not touch them. tether: VORE, Our map, self-explanatory -virgo_minitest: VORE, Testing map used for Travis, do not touch +virgo_minitest: VORE, Testing map used for CI, do not touch ## What _submaps.dm (map-folder-specific, Tether uses _tether_submaps.dm) should look like: diff --git a/maps/submaps/engine_submaps/southern_cross/_engine_submaps.dm b/maps/submaps/engine_submaps/southern_cross/_engine_submaps.dm index 9e63699e94..84374d4a66 100644 --- a/maps/submaps/engine_submaps/southern_cross/_engine_submaps.dm +++ b/maps/submaps/engine_submaps/southern_cross/_engine_submaps.dm @@ -1,5 +1,5 @@ // This causes engine maps to get 'checked' and compiled, when undergoing a unit test. -// This is so Travis can validate PoIs, and ensure future changes don't break PoIs, as PoIs are loaded at runtime and the compiler can't catch errors. +// This is so CI can validate PoIs, and ensure future changes don't break PoIs, as PoIs are loaded at runtime and the compiler can't catch errors. // When adding a new engine, please add it to this list. // Polaris: R-UST and Singulo are commented out as their current submap does not line up with the control room. #if MAP_TEST diff --git a/maps/submaps/engine_submaps_vr/tether/_engine_submaps.dm b/maps/submaps/engine_submaps_vr/tether/_engine_submaps.dm index 0f16e26e41..ee0a748b26 100644 --- a/maps/submaps/engine_submaps_vr/tether/_engine_submaps.dm +++ b/maps/submaps/engine_submaps_vr/tether/_engine_submaps.dm @@ -1,5 +1,5 @@ // This causes engine maps to get 'checked' and compiled, when undergoing a unit test. -// This is so Travis can validate PoIs, and ensure future changes don't break PoIs, as PoIs are loaded at runtime and the compiler can't catch errors. +// This is so CI can validate PoIs, and ensure future changes don't break PoIs, as PoIs are loaded at runtime and the compiler can't catch errors. // When adding a new engine, please add it to this list. #if MAP_TEST #include "engine_rust.dmm" diff --git a/maps/submaps/space_submaps/debrisfield/debrisfield.dm b/maps/submaps/space_submaps/debrisfield/debrisfield.dm index f6f628e219..6520107209 100644 --- a/maps/submaps/space_submaps/debrisfield/debrisfield.dm +++ b/maps/submaps/space_submaps/debrisfield/debrisfield.dm @@ -1,5 +1,5 @@ // This causes PoI maps to get 'checked' and compiled, when undergoing a unit test. -// This is so Travis can validate PoIs, and ensure future changes don't break PoIs, as PoIs are loaded at runtime and the compiler can't catch errors. +// This is so CI can validate PoIs, and ensure future changes don't break PoIs, as PoIs are loaded at runtime and the compiler can't catch errors. // When adding a new PoI, please add it to this list. #if MAP_TEST // #define "your_map_here.dmm" diff --git a/maps/submaps/space_submaps/space.dm b/maps/submaps/space_submaps/space.dm index 0bd12a3c71..374f046f51 100644 --- a/maps/submaps/space_submaps/space.dm +++ b/maps/submaps/space_submaps/space.dm @@ -1,5 +1,5 @@ // This causes PoI maps to get 'checked' and compiled, when undergoing a unit test. -// This is so Travis can validate PoIs, and ensure future changes don't break PoIs, as PoIs are loaded at runtime and the compiler can't catch errors. +// This is so CI can validate PoIs, and ensure future changes don't break PoIs, as PoIs are loaded at runtime and the compiler can't catch errors. // When adding a new PoI, please add it to this list. #if MAP_TEST // #define "your_map_here.dmm" diff --git a/maps/submaps/surface_submaps/mountains/mountains.dm b/maps/submaps/surface_submaps/mountains/mountains.dm index 83447b714c..a7ac3cc3bb 100644 --- a/maps/submaps/surface_submaps/mountains/mountains.dm +++ b/maps/submaps/surface_submaps/mountains/mountains.dm @@ -1,5 +1,5 @@ // This causes PoI maps to get 'checked' and compiled, when undergoing a unit test. -// This is so Travis can validate PoIs, and ensure future changes don't break PoIs, as PoIs are loaded at runtime and the compiler can't catch errors. +// This is so CI can validate PoIs, and ensure future changes don't break PoIs, as PoIs are loaded at runtime and the compiler can't catch errors. // When adding a new PoI, please add it to this list. #if MAP_TEST #include "deadBeacon.dmm" diff --git a/maps/submaps/surface_submaps/plains/plains.dm b/maps/submaps/surface_submaps/plains/plains.dm index f29a686091..bb11158727 100644 --- a/maps/submaps/surface_submaps/plains/plains.dm +++ b/maps/submaps/surface_submaps/plains/plains.dm @@ -1,5 +1,5 @@ // This causes PoI maps to get 'checked' and compiled, when undergoing a unit test. -// This is so Travis can validate PoIs, and ensure future changes don't break PoIs, as PoIs are loaded at runtime and the compiler can't catch errors. +// This is so CI can validate PoIs, and ensure future changes don't break PoIs, as PoIs are loaded at runtime and the compiler can't catch errors. // When adding a new PoI, please add it to this list. #if MAP_TEST #include "farm1.dmm" diff --git a/maps/submaps/surface_submaps/wilderness/wilderness.dm b/maps/submaps/surface_submaps/wilderness/wilderness.dm index 41d3d2b63b..b8e8bb4daf 100644 --- a/maps/submaps/surface_submaps/wilderness/wilderness.dm +++ b/maps/submaps/surface_submaps/wilderness/wilderness.dm @@ -1,5 +1,5 @@ // This causes PoI maps to get 'checked' and compiled, when undergoing a unit test. -// This is so Travis can validate PoIs, and ensure future changes don't break PoIs, as PoIs are loaded at runtime and the compiler can't catch errors. +// This is so CI can validate PoIs, and ensure future changes don't break PoIs, as PoIs are loaded at runtime and the compiler can't catch errors. // When adding a new PoI, please add it to this list. #if MAP_TEST #include "spider1.dmm" diff --git a/maps/tether/submaps/_tether_submaps.dm b/maps/tether/submaps/_tether_submaps.dm index c8b07908cf..be56a41c6e 100644 --- a/maps/tether/submaps/_tether_submaps.dm +++ b/maps/tether/submaps/_tether_submaps.dm @@ -1,5 +1,5 @@ // This causes tether submap maps to get 'checked' and compiled, when undergoing a unit test. -// This is so Travis can validate PoIs, and ensure future changes don't break PoIs, as PoIs are loaded at runtime and the compiler can't catch errors. +// This is so CI can validate PoIs, and ensure future changes don't break PoIs, as PoIs are loaded at runtime and the compiler can't catch errors. ////////////////////////////////////////////////////////////////////////////// /// Static Load diff --git a/maps/~map_system/maps.dm b/maps/~map_system/maps.dm index 26890785b0..c1d5fd7388 100644 --- a/maps/~map_system/maps.dm +++ b/maps/~map_system/maps.dm @@ -124,7 +124,7 @@ var/list/all_maps = list() var/id_hud_icons = 'icons/mob/hud.dmi' // Used by the ID HUD (primarily sechud) overlay. - // Some maps include areas for that map only and don't exist when not compiled, so Travis needs this to learn of new areas that are specific to a map. + // Some maps include areas for that map only and don't exist when not compiled, so CI needs this to learn of new areas that are specific to a map. var/list/unit_test_exempt_areas = list() var/list/unit_test_exempt_from_atmos = list() var/list/unit_test_exempt_from_apc = list() diff --git a/tools/TagMatcher/tag-matcher.py b/tools/TagMatcher/tag-matcher.py index 78797a4d93..ddbe9cbc20 100644 --- a/tools/TagMatcher/tag-matcher.py +++ b/tools/TagMatcher/tag-matcher.py @@ -111,7 +111,7 @@ for file, mismatches_by_tag in mismatches_by_file.iteritems(): for mismatch_line in sorted(set(mismatch_list)): print('\t\tLine {0}'.format(abs(mismatch_line))) -# Simply prints the total number of mismatches found and if so returns 1 to, for example, fail Travis builds. +# Simply prints the total number of mismatches found and if so returns 1 to, for example, fail CI builds. if(total_mismatches == 0): print('No mismatches found.') else: diff --git a/tools/travis/build_tgui.sh b/tools/ci/build_tgui.sh similarity index 100% rename from tools/travis/build_tgui.sh rename to tools/ci/build_tgui.sh diff --git a/tools/travis/compile_and_run.sh b/tools/ci/compile_and_run.sh similarity index 100% rename from tools/travis/compile_and_run.sh rename to tools/ci/compile_and_run.sh diff --git a/tools/travis/install_build_deps.sh b/tools/ci/install_build_deps.sh similarity index 89% rename from tools/travis/install_build_deps.sh rename to tools/ci/install_build_deps.sh index eab4e85201..70812babb1 100644 --- a/tools/travis/install_build_deps.sh +++ b/tools/ci/install_build_deps.sh @@ -10,5 +10,3 @@ npm install --global yarn pip install --user PyYaml -q pip install --user beautifulsoup4 -q - -phpenv global $PHP_VERSION \ No newline at end of file diff --git a/tools/travis/install_byond.sh b/tools/ci/install_byond.sh similarity index 100% rename from tools/travis/install_byond.sh rename to tools/ci/install_byond.sh diff --git a/tools/travis/validate_files.sh b/tools/ci/validate_files.sh similarity index 89% rename from tools/travis/validate_files.sh rename to tools/ci/validate_files.sh index aad451c868..990535b4e4 100644 --- a/tools/travis/validate_files.sh +++ b/tools/ci/validate_files.sh @@ -22,14 +22,6 @@ if [ $retVal -ne 0 ]; then FAILED=1 fi -#Checking for duplicate nanoui templates -(! find nano/templates/ -type f -exec md5sum {} + | sort | uniq -D -w 32 | grep nano) -retVal=$? -if [ $retVal -ne 0 ]; then - echo -e "${RED}There are identical nanoui template files present.${NC}" - FAILED=1 -fi - #Checking for broken HTML tags (didn't close the quote for class) (! grep -En "<\s*span\s+class\s*=\s*('[^'>]+|[^'>]+')\s*>" **/*.dm) retVal=$?