mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-22 19:47:47 +01:00
Multi-Map Testing
This commit is contained in:
@@ -53,7 +53,11 @@ jobs:
|
||||
outputFile: output-annotations.txt
|
||||
|
||||
unit_tests:
|
||||
name: Integration Tests
|
||||
strategy:
|
||||
matrix:
|
||||
map: ['tether', 'stellardelight', 'groundbase']
|
||||
name: Integration Tests (${{ matrix.map }})
|
||||
needs: ['file_tests', 'dreamchecker']
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
@@ -78,6 +82,7 @@ jobs:
|
||||
env:
|
||||
TEST_DEFINE: "UNIT_TEST"
|
||||
TEST_FILE: "code/_unit_tests.dm"
|
||||
MAP: ${{ matrix.map }}
|
||||
RUN: "1"
|
||||
- name: Compile POIs (no run)
|
||||
run: |
|
||||
@@ -86,6 +91,7 @@ jobs:
|
||||
env:
|
||||
TEST_DEFINE: "MAP_TEST"
|
||||
TEST_FILE: "code/_map_tests.dm"
|
||||
MAP: ${{ matrix.map }}
|
||||
RUN: "0"
|
||||
- name: Compile away missions (no run)
|
||||
run: |
|
||||
@@ -94,4 +100,5 @@ jobs:
|
||||
env:
|
||||
TEST_DEFINE: "AWAY_MISSION_TEST"
|
||||
TEST_FILE: "code/_away_mission_tests.dm"
|
||||
MAP: ${{ matrix.map }}
|
||||
RUN: "0"
|
||||
|
||||
@@ -11,6 +11,15 @@ cp config/example/* config/
|
||||
# Define any unit test defines that need to run
|
||||
echo "#define ${TEST_DEFINE} 1" > ${TEST_FILE}
|
||||
|
||||
# Messy map compile code
|
||||
if grep -Fxq "#include \"maps\tether\tether.dm\"" $BASENAME.dme then
|
||||
sed -i "/#include \"maps\tether\tether.dm\"/c\\#include \"maps\\${MAP}\\${MAP}.dm\"" $BASENAME.dme
|
||||
elif grep -Fxq "#include \"maps\stellardelight\stellardelight.dm\"" $BASENAME.dme then
|
||||
sed -i "/#include \"maps\stellardelight\stellardelight.dm\"/c\\#include \"maps\\${MAP}\\${MAP}.dm\"" $BASENAME.dme
|
||||
elif grep -Fxq "#include \"maps\groundbase\groundbase.dm\"" $BASENAME.dme then
|
||||
sed -i "/#include \"maps\groundbase\groundbase.dm\"/c\\#include \"maps\\${MAP}\\${MAP}.dm\"" $BASENAME.dme
|
||||
fi
|
||||
|
||||
# Compile a copy of the codebase, and print errors as Github Actions annotations
|
||||
DreamMaker $BASENAME.dme > compile.log
|
||||
exitVal=$?
|
||||
|
||||
Reference in New Issue
Block a user