Merge pull request #920 from CHOMPStationBot/upstream-merge-9337

[MIRROR] Move away from Travis CI to GitHub Actions
This commit is contained in:
Razgriz
2020-11-24 12:42:51 -07:00
committed by GitHub
28 changed files with 94 additions and 37 deletions
+2 -2
View File
@@ -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.
+69
View File
@@ -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"
-2
View File
@@ -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
+2 -2
View File
@@ -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:
+1 -1
View File
@@ -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.)
+2 -2
View File
@@ -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:
+2 -2
View File
@@ -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:
+1 -1
View File
@@ -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()
+1 -1
View File
@@ -68,7 +68,7 @@ var/datum/antagonist/rogue_ai/malf
sleep(50)
to_chat(malf, "<B>MEMCHCK</B> 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, "<span class='notice'>Corrupted files deleted: sys\\core\\users.dat sys\\core\\laws.dat sys\\core\\" + "backups.dat</span>")
sleep(20)
to_chat(malf, "<span class='notice'><b>CAUTION:</b> Law database not found! User database not found! Unable to restore backups. Activating failsafe AI shutd3wn52&&$#!##</span>")
+1 -1
View File
@@ -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()
+1 -1
View File
@@ -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)"
+1 -1
View File
@@ -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()
+1 -1
View File
@@ -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:
@@ -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
@@ -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"
@@ -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"
+1 -1
View File
@@ -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"
@@ -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"
@@ -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"
@@ -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"
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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()
+1 -1
View File
@@ -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:
@@ -10,5 +10,3 @@ npm install --global yarn
pip install --user PyYaml -q
pip install --user beautifulsoup4 -q
phpenv global $PHP_VERSION
@@ -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=$?