diff --git a/.github/workflows/byond.yml b/.github/workflows/byond.yml index 3ea9a11e64a..d4744593ad1 100644 --- a/.github/workflows/byond.yml +++ b/.github/workflows/byond.yml @@ -1,6 +1,7 @@ name: CI Suite on: + workflow_dispatch: merge_group: branches: - master @@ -15,6 +16,8 @@ env: MACRO_COUNT: 0 GENDER_COUNT: 6 TO_WORLD_COUNT: 186 + + #These variables are filled from dependencies.sh inside the steps, DO NOT SET THEM HERE BYOND_MAJOR: "" BYOND_MINOR: "" RUST_G_VERSION: "" @@ -24,28 +27,209 @@ env: NODE_VERSION_PRECISE: "" PYTHON_VERSION: "" + #If we want the runner to open an SSH shell for us to inspect it, fairly nieche, don't touch if you don't know what you're doing + RUNNER_DEBUG_SHELL: false + + #This is used to know what triggered the jobs for running + CI_TRIGGER_REASON: ${{ github.event_name }} + #The maximum number of retries the unit tests (excluding linters) can make, if appropriate for them to + CI_MAX_RETRIES: 3 + jobs: - lint: - if: ${{ !(contains(github.event.head_commit.message, '[ci skip]')) }} + +########################################### +################# BASH/AWK ################ +########################################### + validate-structure: + name: Validate Structure runs-on: ubuntu-22.04 - name: Run Linters + if: ${{ !(contains(github.event.head_commit.message, '[ci skip]')) }} + concurrency: - group: run_linters-${{ github.head_ref || github.run_id }} + group: validate-structure-${{ github.head_ref || github.run_id }} cancel-in-progress: true + steps: - # Clone Repo - - uses: actions/checkout@v3 - # Restore Caches + + #Checkout the repository + - name: Checkout repository + uses: actions/checkout@v4 + + #Initialize the environment variables + - name: Set ENV variables + run: bash dependencies.sh + + #Validate that we have everything to run, structure-wise: files, changelog, grep and indentation + - name: "Validate repository structure" + run: | + bash tools/ci/check_filedirs.sh aurorastation.dme + bash tools/ci/check_changelogs.sh + bash tools/ci/check_grep.sh $PWD + awk -f tools/indentation.awk **/*.dm + + +########################################### +############### EditorConfig ############## +########################################### + megalinter: + name: Validate EditorConfig Compliance + runs-on: ubuntu-22.04 + if: ${{ !(contains(github.event.head_commit.message, '[ci skip]')) }} + + concurrency: + group: megalinter-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + + env: + APPLY_FIXES: EDITORCONFIG + APPLY_FIXES_EVENT: all + APPLY_FIXES_MODE: commit + + steps: + + #Checkout the repository + - name: Checkout repository + uses: actions/checkout@v4 + + #Initialize the environment variables + - name: Set ENV variables + run: bash dependencies.sh + + # We use megalinter for this because it's fairly well updated and used + # https://megalinter.io/latest/ + - name: Check EditorConfig Compliance + id: ml + uses: oxsecurity/megalinter/flavors/python@v7.3.0 + # Env config options outlined in https://megalinter.io/configuration/ + env: + PRINT_ALPACA: false + VALIDATE_ALL_CODEBASE: false + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ENABLE: EDITORCONFIG + EXCLUDED_DIRECTORIES: tools/bootstrap/.cache/ + FILTER_REGEX_INCLUDE: (.*\.dm$|.*\.dme$|.*\.sql$) + + # Upload MegaLinter artifacts + - name: Upload Megalinter Artifacts + if: failure() + uses: actions/upload-artifact@v3 + with: + name: MegaLinter reports + path: | + megalinter-reports + mega-linter.log + retention-days: 5 + + +########################################### +############### SPACEMANDMM ############### +########################################### + lint-spacemandmm: + name: Lint SpacemanDMM + runs-on: ubuntu-22.04 + if: ${{ !(contains(github.event.head_commit.message, '[ci skip]')) }} + needs: validate-structure + + concurrency: + group: lint-spacemandmm-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + + steps: + + #Checkout the repository + - name: Checkout repository + uses: actions/checkout@v4 + + #Initialize the environment variables + - name: Set ENV variables + run: bash dependencies.sh + + #Restores SpacemanDMM from the cache repository - name: Restore SpacemanDMM cache uses: actions/cache@v3 with: path: ~/SpacemanDMM key: ${{ runner.os }}-spacemandmm-${{ env.SPACEMAN_DMM_VERSION }} + + - name: Install SpacemanDMM + run: | + bash tools/ci/install_spaceman_dmm.sh dreamchecker + + #Run SpacemanDMM + - name: Run Dreamchecker + run: | + ~/dreamchecker > ${GITHUB_WORKSPACE}/output-annotations.txt 2>&1 + + #Annotate findings in the PR + - name: Annotate Lints + uses: yogstation13/DreamAnnotate@v2 + if: success() || failure() + with: + outputFile: output-annotations.txt + + +########################################### +################ OPENDREAM ################ +########################################### + lint-opendream: + name: Lint OpenDream + runs-on: ubuntu-22.04 + if: ${{ !(contains(github.event.head_commit.message, '[ci skip]')) }} + needs: validate-structure + + concurrency: + group: lint-opendream-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + + steps: + + #Checkout the repository + - name: Checkout repository + uses: actions/checkout@v4 + + #Initialize the environment variables + - name: Set ENV variables + run: bash dependencies.sh + + #Restores SpacemanDMM from the cache repository - name: Restore OpenDream cache uses: actions/cache@v3 with: path: ~/OpenDream/* key: ${{ runner.os }}-opendream + + - name: Install OpenDream + run: | + bash tools/ci/install_od.sh + + - name: Run OpenDream + run: | + tools/ci/run_od.sh + +########################################### +############### TGUI LINTING ############## +########################################### + lint-tgui: + name: Lint TGUI + runs-on: ubuntu-22.04 + if: ${{ !(contains(github.event.head_commit.message, '[ci skip]')) }} + needs: validate-structure + + concurrency: + group: lint-tgui-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + + steps: + + #Checkout the repository + - name: Checkout repository + uses: actions/checkout@v4 + + #Initialize the environment variables + - name: Set ENV variables + run: bash dependencies.sh + + #Restore YARN (Node packages) cache - name: Restore Yarn cache uses: actions/cache@v3 with: @@ -54,80 +238,83 @@ jobs: restore-keys: | ${{ runner.os }}-build- ${{ runner.os }}- - # Install Dependencies - - name: "Set ENV variables" - run: bash dependencies.sh - - name: Restore Python Cache - uses: actions/setup-python@v4 - with: - python-version: ${{ env.PYTHON_VERSION }} - cache: 'pip' + + #Setup NodeJS using YARN as cache - name: Setup Node uses: actions/setup-node@v3 with: cache-dependency-path: tgui/yarn.lock node-version: ${{ env.NODE_VERSION_PRECISE }} cache: 'yarn' - - name: Install Python Packages - run: | - pip install -r tools/requirements.txt - - name: Install Tools - run: | - pip3 install setuptools - bash tools/ci/install_spaceman_dmm.sh dreamchecker - bash tools/ci/install_od.sh - - name: Check Filedirs - run: | - bash tools/ci/check_filedirs.sh aurorastation.dme - - name: Check ChangeLogs - run: | - bash tools/ci/check_changelogs.sh - - name: Check Greps - run: | - bash tools/ci/check_grep.sh $PWD - - name: Check Validate DME - run: | - tools/bootstrap/python tools/validate_dme.py ${GITHUB_WORKSPACE}/output-annotations.txt 2>&1 -# bash tools/ci/check_misc.sh -# tools/bootstrap/python -m tools.maplint.source --github - - name: Annotate Lints - uses: yogstation13/DreamAnnotate@v2 - if: success() || failure() - with: - outputFile: output-annotations.txt - unit-test-linux: - if: ${{ !(contains(github.event.head_commit.message, '[ci skip]')) }} - strategy: - matrix: - map: [runtime, aurora, sccv_horizon, away_sites_testing, exoplanet_testing] - fail-fast: false +########################################### +############## GENERIC TESTS ############## +########################################### + generic-tests: + name: Generic Tests runs-on: ubuntu-22.04 - concurrency: - group: unit-test-linux-${{ github.head_ref || github.run_id }}-${{ matrix.map }} - cancel-in-progress: true - needs: lint + + if: ${{ !(contains(github.event.head_commit.message, '[ci skip]')) && !(contains(github.event.head_commit.message, '[ut skip]'))}} + needs: [validate-structure, lint-spacemandmm, lint-opendream, lint-tgui, lint-misc] + services: mariadb: image: mariadb:10.4 @@ -138,10 +325,36 @@ jobs: MYSQL_PASSWORD: build MYSQL_DATABASE: game MYSQL_ROOT_PASSWORD: root + + concurrency: + group: unit-tests-generic-tests-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + + strategy: + matrix: + map: [away_sites_testing] + pod: [generic] + fail-fast: false + steps: - - uses: actions/checkout@v3 - - name: "Set ENV variables" - run: source dependencies.sh + + #This allows us to SSH into the pod, and it's only enabled if we're running in debug mode + - name: Setup TMATE session (Debug only) + uses: mxschmitt/action-tmate@v3 + if: ${{ env.RUNNER_DEBUG_SHELL == true }} + with: + detached: true + timeout-minutes: 5 + + #Checkout the repository + - name: Checkout repository + uses: actions/checkout@v4 + + #Initialize the environment variables + - name: Set ENV variables + run: bash dependencies.sh + + #Restores BYOND cache - name: Restore BYOND cache uses: actions/cache@v3 with: @@ -153,50 +366,436 @@ jobs: with: path: ~/flyway key: ${{ runner.os }}-flyway-${{ env.FLYWAY_BUILD }} + + #Add the x86 architecture and update apt-get's local indexes - name: Prepare OS Environtment run: | sudo dpkg --add-architecture i386 sudo apt-get update + + #Installs the packages we need, from a cache - name: Install OS Packages uses: awalsh128/cache-apt-pkgs-action@latest with: packages: gcc-multilib zlib1g-dev:i386 libssl-dev:i386 libgcc-s1:i386 libc6:i386 version: 1.1 + + #And natively, the packages that break from a cache - name: Install OS Packages (Native) run: | sudo apt-get install libgcc-s1:i386 libssl-dev:i386 - - name: Install BYOND + + #Install flyway + - name: Install Flyway + run: | + tools/ci/install_flyway.sh + + #Apply the database migration + - name: Apply Database Migrations (FlyWay) + env: + PORT: ${{ job.services.mariadb.ports[3306] }} + run: | + $HOME/flyway/flyway-$FLYWAY_BUILD/flyway migrate -user=root -password=root -url="jdbc:mariadb://localhost:$PORT/game" -validateMigrationNaming="true" + + - name: Install BYOND & rust_g run: | source dependencies.sh bash tools/ci/install_byond.sh source $HOME/BYOND/byond/bin/byondsetup bash tools/ci/install_rust_g.sh - - name: Install Flyway - run: | - tools/ci/install_flyway.sh - - name: Migrate database + + - name: Configure pod, build and run env: PORT: ${{ job.services.mariadb.ports[3306] }} - run: | - $HOME/flyway/flyway-$FLYWAY_BUILD/flyway migrate -user=root -password=root -url="jdbc:mariadb://localhost:$PORT/game" -validateMigrationNaming="true" - - name: Build + POD: ${{ matrix.pod }} run: | export LD_LIBRARY_PATH=./:$PWD:$HOME/BYOND/byond/bin:/usr/local/lib:$LD_LIBRARY_PATH scripts/dm.sh -DUNIT_TEST -M${{ matrix.map }} aurorastation.dme grep "0 warnings" build_log.txt - - name: Run tests - env: - PORT: ${{ job.services.mariadb.ports[3306] }} - run: | - export LD_LIBRARY_PATH=./:$PWD:$HOME/BYOND/byond/bin:/usr/local/lib:$LD_LIBRARY_PATH + echo -n "$POD" > config/unit_test/identifier.txt + cp config/example/* config/ && cp config/ut/config-db.txt config/config.txt && cp config/ut/dbconfig.txt config/dbconfig.txt echo "PORT $PORT" >> config/dbconfig.txt $HOME/BYOND/byond/bin/DreamDaemon aurorastation.dmb -invisible -trusted -core 2>&1 | tee log.txt grep "All Unit Tests Passed" log.txt (! grep "runtime error:" log.txt) + - name: Upload Condensed UT Log uses: actions/upload-artifact@v3 + if: failure() || ${{ runner.debug }} with: - name: condensed-${{ matrix.map }}.log + name: condensed-${{ matrix.map }}-${{ matrix.pod }}.log + path: ./data/logs/**/condensed.log + retention-days: 5 + +########################################### +########### CREATE AND DESTROY ############ +########################################### + create-and-destroy: + name: Create and Destroy Test + runs-on: ubuntu-22.04 + + if: ${{ !(contains(github.event.head_commit.message, '[ci skip]')) && !(contains(github.event.head_commit.message, '[ut skip]'))}} + needs: [validate-structure, lint-spacemandmm, lint-opendream, lint-tgui, lint-misc] + + services: + mariadb: + image: mariadb:10.4 + ports: + - 3306 + env: + MYSQL_USER: build + MYSQL_PASSWORD: build + MYSQL_DATABASE: game + MYSQL_ROOT_PASSWORD: root + + concurrency: + group: unit-tests-create-and-destroy-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + + strategy: + matrix: + map: [away_sites_testing] + pod: [create_and_destroy] + fail-fast: false + + steps: + + #This allows us to SSH into the pod, and it's only enabled if we're running in debug mode + - name: Setup TMATE session (Debug only) + uses: mxschmitt/action-tmate@v3 + if: ${{ env.RUNNER_DEBUG_SHELL == true }} + with: + detached: true + timeout-minutes: 5 + + #Checkout the repository + - name: Checkout repository + uses: actions/checkout@v4 + + #Initialize the environment variables + - name: Set ENV variables + run: bash dependencies.sh + + #Restores BYOND cache + - name: Restore BYOND cache + uses: actions/cache@v3 + with: + path: ~/BYOND/* + key: ${{ runner.os }}-byond-${{ env.BYOND_MAJOR }}-${{ env.BYOND_MINOR }} + + - name: Restore FlyWay cache + uses: actions/cache@v3 + with: + path: ~/flyway + key: ${{ runner.os }}-flyway-${{ env.FLYWAY_BUILD }} + + #Add the x86 architecture and update apt-get's local indexes + - name: Prepare OS Environtment + run: | + sudo dpkg --add-architecture i386 + sudo apt-get update + + #Installs the packages we need, from a cache + - name: Install OS Packages + uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: gcc-multilib zlib1g-dev:i386 libssl-dev:i386 libgcc-s1:i386 libc6:i386 + version: 1.1 + + #And natively, the packages that break from a cache + - name: Install OS Packages (Native) + run: | + sudo apt-get install libgcc-s1:i386 libssl-dev:i386 + + #Install flyway + - name: Install Flyway + run: | + tools/ci/install_flyway.sh + + #Apply the database migration + - name: Apply Database Migrations (FlyWay) + env: + PORT: ${{ job.services.mariadb.ports[3306] }} + run: | + $HOME/flyway/flyway-$FLYWAY_BUILD/flyway migrate -user=root -password=root -url="jdbc:mariadb://localhost:$PORT/game" -validateMigrationNaming="true" + + - name: Install BYOND & rust_g + run: | + source dependencies.sh + bash tools/ci/install_byond.sh + source $HOME/BYOND/byond/bin/byondsetup + bash tools/ci/install_rust_g.sh + + - name: Configure pod, build and run + env: + PORT: ${{ job.services.mariadb.ports[3306] }} + POD: ${{ matrix.pod }} + run: | + export LD_LIBRARY_PATH=./:$PWD:$HOME/BYOND/byond/bin:/usr/local/lib:$LD_LIBRARY_PATH + scripts/dm.sh -DUNIT_TEST -M${{ matrix.map }} aurorastation.dme + grep "0 warnings" build_log.txt + echo -n "$POD" > config/unit_test/identifier.txt + + cp config/example/* config/ && cp config/ut/config-db.txt config/config.txt && cp config/ut/dbconfig.txt config/dbconfig.txt + echo "PORT $PORT" >> config/dbconfig.txt + $HOME/BYOND/byond/bin/DreamDaemon aurorastation.dmb -invisible -trusted -core 2>&1 | tee log.txt + grep "All Unit Tests Passed" log.txt + (! grep "runtime error:" log.txt) + + - name: Upload Condensed UT Log + uses: actions/upload-artifact@v3 + if: failure() || ${{ runner.debug }} + with: + name: condensed-${{ matrix.map }}-${{ matrix.pod }}.log + path: ./data/logs/**/condensed.log + retention-days: 5 + + + +########################################### +################ TEST MAPS ################ +########################################### + map-tests: + name: Run Map Tests + runs-on: ubuntu-22.04 + + if: ${{ !(contains(github.event.head_commit.message, '[ci skip]')) && !(contains(github.event.head_commit.message, '[ut skip]'))}} + needs: [validate-structure, lint-spacemandmm, lint-opendream, lint-tgui, lint-misc] + + services: + mariadb: + image: mariadb:10.4 + ports: + - 3306 + env: + MYSQL_USER: build + MYSQL_PASSWORD: build + MYSQL_DATABASE: game + MYSQL_ROOT_PASSWORD: root + + concurrency: + group: unit-tests-map-tests-${{ matrix.map }}-${{ matrix.pod }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + + strategy: + matrix: + map: [runtime, aurora, sccv_horizon, exoplanet_testing] + pod: [maptest] + fail-fast: false + + steps: + + #This allows us to SSH into the pod, and it's only enabled if we're running in debug mode + - name: Setup TMATE session (Debug only) + uses: mxschmitt/action-tmate@v3 + if: ${{ env.RUNNER_DEBUG_SHELL == true }} + with: + detached: true + timeout-minutes: 5 + + #Checkout the repository + - name: Checkout repository + uses: actions/checkout@v4 + + #Initialize the environment variables + - name: Set ENV variables + run: bash dependencies.sh + + #Restores BYOND cache + - name: Restore BYOND cache + uses: actions/cache@v3 + with: + path: ~/BYOND/* + key: ${{ runner.os }}-byond-${{ env.BYOND_MAJOR }}-${{ env.BYOND_MINOR }} + + - name: Restore FlyWay cache + uses: actions/cache@v3 + with: + path: ~/flyway + key: ${{ runner.os }}-flyway-${{ env.FLYWAY_BUILD }} + + #Add the x86 architecture and update apt-get's local indexes + - name: Prepare OS Environtment + run: | + sudo dpkg --add-architecture i386 + sudo apt-get update + + #Installs the packages we need, from a cache + - name: Install OS Packages + uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: gcc-multilib zlib1g-dev:i386 libssl-dev:i386 libgcc-s1:i386 libc6:i386 + version: 1.1 + + #And natively, the packages that break from a cache + - name: Install OS Packages (Native) + run: | + sudo apt-get install libgcc-s1:i386 libssl-dev:i386 + + #Install flyway + - name: Install Flyway + run: | + tools/ci/install_flyway.sh + + #Apply the database migration + - name: Apply Database Migrations (FlyWay) + env: + PORT: ${{ job.services.mariadb.ports[3306] }} + run: | + $HOME/flyway/flyway-$FLYWAY_BUILD/flyway migrate -user=root -password=root -url="jdbc:mariadb://localhost:$PORT/game" -validateMigrationNaming="true" + + - name: Install BYOND & rust_g + run: | + source dependencies.sh + bash tools/ci/install_byond.sh + source $HOME/BYOND/byond/bin/byondsetup + bash tools/ci/install_rust_g.sh + + - name: Configure pod, build and run + env: + PORT: ${{ job.services.mariadb.ports[3306] }} + POD: ${{ matrix.pod }} + run: | + export LD_LIBRARY_PATH=./:$PWD:$HOME/BYOND/byond/bin:/usr/local/lib:$LD_LIBRARY_PATH + scripts/dm.sh -DUNIT_TEST -M${{ matrix.map }} aurorastation.dme + grep "0 warnings" build_log.txt + echo -n "$POD" > config/unit_test/identifier.txt + + cp config/example/* config/ && cp config/ut/config-db.txt config/config.txt && cp config/ut/dbconfig.txt config/dbconfig.txt + echo "PORT $PORT" >> config/dbconfig.txt + $HOME/BYOND/byond/bin/DreamDaemon aurorastation.dmb -invisible -trusted -core 2>&1 | tee log.txt + grep "All Unit Tests Passed" log.txt + (! grep "runtime error:" log.txt) + + - name: Upload Condensed UT Log + uses: actions/upload-artifact@v3 + if: failure() || ${{ runner.debug }} + with: + name: condensed-${{ matrix.map }}-${{ matrix.pod }}.log + path: ./data/logs/**/condensed.log + retention-days: 5 + + +########################################### +############# TEST AWAY SITES ############# +########################################### + away-sites-tests: + name: Run Map Tests + runs-on: ubuntu-22.04 + + if: ${{ !(contains(github.event.head_commit.message, '[ci skip]')) && !(contains(github.event.head_commit.message, '[ut skip]'))}} + needs: [validate-structure, lint-spacemandmm, lint-opendream, lint-tgui, lint-misc] + + services: + mariadb: + image: mariadb:10.4 + ports: + - 3306 + env: + MYSQL_USER: build + MYSQL_PASSWORD: build + MYSQL_DATABASE: game + MYSQL_ROOT_PASSWORD: root + + concurrency: + group: unit-tests-away-sites-tests-${{ matrix.map }}-${{ matrix.pod }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + + strategy: + matrix: + map: [away_sites_testing] + pod: [awaysites-1, awaysites-2, awaysites-3] + fail-fast: false + + steps: + + #This allows us to SSH into the pod, and it's only enabled if we're running in debug mode + - name: Setup TMATE session (Debug only) + uses: mxschmitt/action-tmate@v3 + if: ${{ env.RUNNER_DEBUG_SHELL == true }} + with: + detached: true + timeout-minutes: 5 + + #Checkout the repository + - name: Checkout repository + uses: actions/checkout@v4 + + #Initialize the environment variables + - name: Set ENV variables + run: bash dependencies.sh + + #Restores BYOND cache + - name: Restore BYOND cache + uses: actions/cache@v3 + with: + path: ~/BYOND/* + key: ${{ runner.os }}-byond-${{ env.BYOND_MAJOR }}-${{ env.BYOND_MINOR }} + + - name: Restore FlyWay cache + uses: actions/cache@v3 + with: + path: ~/flyway + key: ${{ runner.os }}-flyway-${{ env.FLYWAY_BUILD }} + + #Add the x86 architecture and update apt-get's local indexes + - name: Prepare OS Environtment + run: | + sudo dpkg --add-architecture i386 + sudo apt-get update + + #Installs the packages we need, from a cache + - name: Install OS Packages + uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: gcc-multilib zlib1g-dev:i386 libssl-dev:i386 libgcc-s1:i386 libc6:i386 + version: 1.1 + + #And natively, the packages that break from a cache + - name: Install OS Packages (Native) + run: | + sudo apt-get install libgcc-s1:i386 libssl-dev:i386 + + #Install flyway + - name: Install Flyway + run: | + tools/ci/install_flyway.sh + + #Apply the database migration + - name: Apply Database Migrations (FlyWay) + env: + PORT: ${{ job.services.mariadb.ports[3306] }} + run: | + $HOME/flyway/flyway-$FLYWAY_BUILD/flyway migrate -user=root -password=root -url="jdbc:mariadb://localhost:$PORT/game" -validateMigrationNaming="true" + + - name: Install BYOND & rust_g + run: | + source dependencies.sh + bash tools/ci/install_byond.sh + source $HOME/BYOND/byond/bin/byondsetup + bash tools/ci/install_rust_g.sh + + - name: Configure pod, build and run + env: + PORT: ${{ job.services.mariadb.ports[3306] }} + POD: ${{ matrix.pod }} + run: | + export LD_LIBRARY_PATH=./:$PWD:$HOME/BYOND/byond/bin:/usr/local/lib:$LD_LIBRARY_PATH + scripts/dm.sh -DUNIT_TEST -M${{ matrix.map }} aurorastation.dme + grep "0 warnings" build_log.txt + echo -n "$POD" > config/unit_test/identifier.txt + + cp config/example/* config/ && cp config/ut/config-db.txt config/config.txt && cp config/ut/dbconfig.txt config/dbconfig.txt + echo "PORT $PORT" >> config/dbconfig.txt + $HOME/BYOND/byond/bin/DreamDaemon aurorastation.dmb -invisible -trusted -core 2>&1 | tee log.txt + grep "All Unit Tests Passed" log.txt + (! grep "runtime error:" log.txt) + + - name: Upload Condensed UT Log + uses: actions/upload-artifact@v3 + if: failure() || ${{ runner.debug }} + with: + name: condensed-${{ matrix.map }}-${{ matrix.pod }}.log path: ./data/logs/**/condensed.log retention-days: 5 diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 2ac1eae3367..d4efca12139 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -8,8 +8,13 @@ jobs: contents: read pull-requests: write runs-on: ubuntu-latest + steps: - - uses: actions/labeler@v4 - with: - sync-labels: true - dot: true + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set labels for PR + uses: actions/labeler@v4 + with: + sync-labels: true + dot: true diff --git a/code/controllers/subsystems/initialization/misc_late.dm b/code/controllers/subsystems/initialization/misc_late.dm index 80f2b193a2d..41be824becf 100644 --- a/code/controllers/subsystems/initialization/misc_late.dm +++ b/code/controllers/subsystems/initialization/misc_late.dm @@ -14,7 +14,7 @@ SUBSYSTEM_DEF(misc_late) if (area_turfs.len) // Check the area is mapped ghostteleportlocs += AR.name ghostteleportlocs[AR.name] = AR - if(current_map.use_overmap) + if(current_map.use_overmap && map_overmap) ghostteleportlocs[map_overmap.name] = map_overmap sortTim(ghostteleportlocs, GLOBAL_PROC_REF(cmp_text_asc)) diff --git a/code/modules/maps/map_template.dm b/code/modules/maps/map_template.dm index e99b6fe46d2..2c85278269b 100644 --- a/code/modules/maps/map_template.dm +++ b/code/modules/maps/map_template.dm @@ -12,6 +12,10 @@ var/accessibility_weight = 0 var/template_flags = TEMPLATE_FLAG_ALLOW_DUPLICATES + ///A list of groups, as strings, that this template belongs to. When adding new map templates, try to keep this balanced on the CI execution time, or consider adding a new one + ///ONLY IF IT'S THE LONGEST RUNNING CI POD AND THEY ARE ALREADY BALANCED + var/list/unit_test_groups = list() + /datum/map_template/New(var/list/paths = null, rename = null) if(paths && !islist(paths)) crash_with("Non-list paths passed into map template constructor.") diff --git a/code/unit_tests/chemistry_tests.dm b/code/unit_tests/chemistry_tests.dm index 4116c0b70c6..2a71b59bb5b 100644 --- a/code/unit_tests/chemistry_tests.dm +++ b/code/unit_tests/chemistry_tests.dm @@ -7,6 +7,7 @@ /datum/unit_test/specific_heat name = "Chemistry Test - Specific Heat" + groups = list("generic", "chemistry") /datum/unit_test/specific_heat/start_test() diff --git a/code/unit_tests/cooking_tests.dm b/code/unit_tests/cooking_tests.dm index 870b0988003..4866fd1d49c 100644 --- a/code/unit_tests/cooking_tests.dm +++ b/code/unit_tests/cooking_tests.dm @@ -7,6 +7,7 @@ */ /datum/unit_test/cooking_recipes_fruits name = "COOKING: Check recipe fruit tags" + groups = list("generic", "cooking") // In case you want to see all the unused tags. Disabled by default because holy shit so many. var/print_all_unused_tags = FALSE diff --git a/code/unit_tests/create_and_destroy.dm b/code/unit_tests/create_and_destroy.dm index 0902a0e5eaf..c7e2d117475 100644 --- a/code/unit_tests/create_and_destroy.dm +++ b/code/unit_tests/create_and_destroy.dm @@ -1,6 +1,7 @@ ///Delete one of every type, sleep a while, then check to see if anything has gone fucky /datum/unit_test/create_and_destroy name = "Create and Destroy Test" + groups = list("create and destroy") var/result = null // var/datum/running_create_and_destroy = FALSE diff --git a/code/unit_tests/equipment_tests.dm b/code/unit_tests/equipment_tests.dm index 81983eb4a02..ea1115a271a 100644 --- a/code/unit_tests/equipment_tests.dm +++ b/code/unit_tests/equipment_tests.dm @@ -4,6 +4,9 @@ /datum/unit_test/vision_glasses/ name = "EQUIPMENT: Vision Template" + groups = list("generic", "vision") + + var/mob/living/carbon/human/H = null var/expectation = SEE_INVISIBLE_NOLIGHTING var/glasses_type = null diff --git a/code/unit_tests/foundation_tests.dm b/code/unit_tests/foundation_tests.dm index 094805ba193..d118694ea62 100644 --- a/code/unit_tests/foundation_tests.dm +++ b/code/unit_tests/foundation_tests.dm @@ -3,6 +3,8 @@ */ /datum/unit_test/foundation name = "FOUNDATION template" + groups = list("generic") + async = 0 /datum/unit_test/foundation/step_shall_return_true_on_success diff --git a/code/unit_tests/gamemode_tests.dm b/code/unit_tests/gamemode_tests.dm index 74f83c7e875..46e9449252b 100644 --- a/code/unit_tests/gamemode_tests.dm +++ b/code/unit_tests/gamemode_tests.dm @@ -1,5 +1,6 @@ /datum/unit_test/gamemode name = "GAMEMODE template" + groups = list("generic") /datum/unit_test/gamemode/required_enemies_check name = "GAMEMODE: All modes shall have required_players and required_enemies greater than the required number of players for their antagonist types." diff --git a/code/unit_tests/icon_tests.dm b/code/unit_tests/icon_tests.dm index a847f14e398..6192963df90 100644 --- a/code/unit_tests/icon_tests.dm +++ b/code/unit_tests/icon_tests.dm @@ -1,5 +1,6 @@ /datum/unit_test/icon_test name = "ICON STATE template" + groups = list("graphic") /datum/unit_test/icon_test/closets name = "CLOSET template" diff --git a/code/unit_tests/language_test.dm b/code/unit_tests/language_test.dm index e70d125e668..186d2b01151 100644 --- a/code/unit_tests/language_test.dm +++ b/code/unit_tests/language_test.dm @@ -1,5 +1,6 @@ /datum/unit_test/language_test name = "Language Test - Repeated Keys" + groups = list("generic", "language") /datum/unit_test/language_test/start_test() var/list/used_keys = list() diff --git a/code/unit_tests/map_tests.dm b/code/unit_tests/map_tests.dm index 0c8cc3c7a07..c72d66f809f 100644 --- a/code/unit_tests/map_tests.dm +++ b/code/unit_tests/map_tests.dm @@ -11,6 +11,7 @@ /datum/unit_test/map_test name = "MAP TEST template" + groups = list("map") /datum/unit_test/map_test/apc_area_test name = "MAP: Area Test APC / Scrubbers / Vents / Alarms (Station)" diff --git a/code/unit_tests/mob_tests.dm b/code/unit_tests/mob_tests.dm index 02ab44ecbdd..22d636dff39 100644 --- a/code/unit_tests/mob_tests.dm +++ b/code/unit_tests/mob_tests.dm @@ -26,6 +26,8 @@ /datum/unit_test/mob_hear name = "MOB: Living mobs test for mob's speech" + groups = list("mob") + var/mob_type = /mob/living/test @@ -83,6 +85,8 @@ /datum/unit_test/human_breath name = "MOB: Human Suffocates in Space" + groups = list("mob") + var/starting_oxyloss = null var/ending_oxyloss = null var/mob/living/carbon/human/H @@ -189,6 +193,8 @@ /datum/unit_test/mob_damage name = "MOB: Template for mob damage" + groups = list("mob") + var/mob/living/carbon/human/testmob = null var/damagetype = DAMAGE_BRUTE var/mob_type = /mob/living/carbon/human @@ -517,6 +523,8 @@ /datum/unit_test/robot_module_icons name = "MOB: Robot module icon check" + groups = list("mob") + var/icon_file = 'icons/mob/screen/robot.dmi' /datum/unit_test/robot_module_icons/start_test() diff --git a/code/unit_tests/object_tests.dm b/code/unit_tests/object_tests.dm index 6c2f3b15d0b..1a453abb6c8 100644 --- a/code/unit_tests/object_tests.dm +++ b/code/unit_tests/object_tests.dm @@ -7,6 +7,7 @@ */ /datum/unit_test/machinery_global_test name = "OBJECTS: Machinery Global List Test" + groups = list("map") /datum/unit_test/machinery_global_test/start_test() var/list/all_types = list() @@ -37,6 +38,7 @@ */ /datum/unit_test/flooring_build_type_conflicts name = "OBJECTS: All flooring shall have a unique build type" + groups = list("map") /datum/unit_test/flooring_build_type_conflicts/start_test() var/list/known_types = list() @@ -62,6 +64,7 @@ /datum/unit_test/check_vending_products name = "OBJECTS: All vending products shall be /obj subtypes" + groups = list("machinery") /datum/unit_test/check_vending_products/start_test() var/list/vending_products = list() diff --git a/code/unit_tests/observation_tests.dm b/code/unit_tests/observation_tests.dm index ab2e6384c5f..08822ab2943 100644 --- a/code/unit_tests/observation_tests.dm +++ b/code/unit_tests/observation_tests.dm @@ -3,10 +3,13 @@ /datum/unit_test/observation name = "OBSERVATION template" + groups = list("generic") + async = 0 /datum/unit_test/observation/moved_observer_shall_register_on_follow name = "OBSERVATION: Moved - Observer Shall Register on Follow" + groups = list("generic") /datum/unit_test/observation/moved_observer_shall_register_on_follow/start_test() var/turf/T = locate(20,20,1) @@ -25,6 +28,7 @@ /datum/unit_test/observation/moved_observer_shall_unregister_on_nofollow name = "OBSERVATION: Moved - Observer Shall Unregister on NoFollow" + groups = list("generic") /datum/unit_test/observation/moved_observer_shall_unregister_on_nofollow/start_test() var/turf/T = locate(20,20,1) @@ -44,6 +48,7 @@ /datum/unit_test/observation/moved_shall_registers_recursively_on_new_listener name = "OBSERVATION: Moved - Shall Register Recursively on New Listener" + groups = list("generic") /datum/unit_test/observation/moved_shall_registers_recursively_on_new_listener/start_test() var/turf/T = locate(20,20,1) @@ -67,6 +72,7 @@ /datum/unit_test/observation/moved_shall_registers_recursively_with_existing_listener name = "OBSERVATION: Moved - Shall Register Recursively with Existing Listener" + groups = list("generic") /datum/unit_test/observation/moved_shall_registers_recursively_with_existing_listener/start_test() var/turf/T = locate(20,20,1) diff --git a/code/unit_tests/origins_tests.dm b/code/unit_tests/origins_tests.dm index 8ed66e2b948..502e54a1429 100644 --- a/code/unit_tests/origins_tests.dm +++ b/code/unit_tests/origins_tests.dm @@ -1,5 +1,6 @@ /datum/unit_test/cultures name = "Cultures Test - All cultures shall be filled out" + groups = list("generic") /datum/unit_test/cultures/start_test() var/failures = 0 @@ -25,6 +26,7 @@ /datum/unit_test/origins name = "Origins Test - All origins shall be filled out" + groups = list("generic") /datum/unit_test/origins/start_test() var/failures = 0 @@ -50,6 +52,7 @@ /datum/unit_test/accent_tags name = "All accent tags shall have a text tag" + groups = list("generic") /datum/unit_test/accent_tags/start_test() var/failures = 0 diff --git a/code/unit_tests/overmap_tests.dm b/code/unit_tests/overmap_tests.dm index 5258afb4f1b..04a4b6e4f53 100644 --- a/code/unit_tests/overmap_tests.dm +++ b/code/unit_tests/overmap_tests.dm @@ -1,6 +1,7 @@ // 513 does not allow white or no color as a filter color /datum/unit_test/overmap_effects_shall_have_non_white_color name = "OVERMAP: Shall have non-white color" + groups = list("map", "overmap") /datum/unit_test/overmap_effects_shall_have_non_white_color/start_test() var/list/invalid_overmap_types = list() @@ -19,6 +20,7 @@ /datum/unit_test/overmap_ships_shall_have_entrypoints name = "OVERMAP: Ships shall have at least four valid entry points" + groups = list("map", "overmap") /datum/unit_test/overmap_ships_shall_have_entrypoints/start_test() for(var/obj/effect/overmap/visitable/ship/S in SSshuttle.initialized_sectors) @@ -30,6 +32,7 @@ /datum/unit_test/overmap_ships_shall_have_class name = "OVERMAP: Ships shall have class and designation" + groups = list("map", "overmap") /datum/unit_test/overmap_ships_shall_have_class/start_test() var/failures = 0 diff --git a/code/unit_tests/power_tests.dm b/code/unit_tests/power_tests.dm index 6165816e66f..7546b4e900f 100644 --- a/code/unit_tests/power_tests.dm +++ b/code/unit_tests/power_tests.dm @@ -1,5 +1,6 @@ /datum/unit_test/roundstart_cable_connectivity name = "POWER: Roundstart Cables that are Connected Share Powernets" + groups = list("map") /datum/unit_test/roundstart_cable_connectivity/proc/find_connected_neighbours(var/obj/structure/cable/C) . = list() @@ -51,6 +52,7 @@ /datum/unit_test/areas_apc_uniqueness name = "POWER: Each area should have at most one APC." + groups = list("map") /datum/unit_test/areas_apc_uniqueness/start_test() var/failed = 0 @@ -71,6 +73,7 @@ /datum/unit_test/area_power_tally_accuracy name = "POWER: All areas must have accurate power use values." + groups = list("map") /datum/unit_test/area_power_tally_accuracy/start_test() var/failed = FALSE diff --git a/code/unit_tests/recipe_tests.dm b/code/unit_tests/recipe_tests.dm index 5f26c832e71..b5cd09122b2 100755 --- a/code/unit_tests/recipe_tests.dm +++ b/code/unit_tests/recipe_tests.dm @@ -5,6 +5,7 @@ /datum/unit_test/research_design_cost name = "RECIPES: Design Cost" + groups = list("generic", "research") /datum/unit_test/research_design_cost/start_test() var/tested_count = 0 @@ -35,6 +36,7 @@ /datum/unit_test/stack_recipe_cost name = "RECIPES: Stack Recipes" + groups = list("generic") /datum/unit_test/stack_recipe_cost/start_test() var/tested_count = 0 diff --git a/code/unit_tests/shuttle_tests.dm b/code/unit_tests/shuttle_tests.dm index 160113d1753..4608b85b926 100644 --- a/code/unit_tests/shuttle_tests.dm +++ b/code/unit_tests/shuttle_tests.dm @@ -1,5 +1,6 @@ /datum/unit_test/shuttle_landmarks_shall_exist name = "SHUTTLE: Defined shuttle landmarks shall exist." + groups = list("map") /datum/unit_test/shuttle_landmarks_shall_exist/start_test() var/failed = 0 diff --git a/code/unit_tests/smart_token_bucket.dm b/code/unit_tests/smart_token_bucket.dm index a26ce6b2ef2..0601e26c046 100644 --- a/code/unit_tests/smart_token_bucket.dm +++ b/code/unit_tests/smart_token_bucket.dm @@ -6,6 +6,8 @@ /datum/unit_test/smart_token_bucket name = "Smart Token Bucket Unit Test" + groups = list("generic") + var/datum/smart_token_bucket/stb var/datum/smart_token_bucket/stb2 var/expiration_count = 0 diff --git a/code/unit_tests/spawner_tests.dm b/code/unit_tests/spawner_tests.dm index 15885d683f3..571d2cc678f 100644 --- a/code/unit_tests/spawner_tests.dm +++ b/code/unit_tests/spawner_tests.dm @@ -7,6 +7,7 @@ /datum/unit_test/template name = "Ghost Spawner Tests" // If it's a template leave the word "template" in it's name so it's not ran. + groups = list("generic") /datum/unit_test/template/start_test() var/list/ignore_spawners = list( diff --git a/code/unit_tests/species_tests.dm b/code/unit_tests/species_tests.dm index 6fb6fe030a3..2719680d29b 100644 --- a/code/unit_tests/species_tests.dm +++ b/code/unit_tests/species_tests.dm @@ -1,5 +1,6 @@ /datum/unit_test/species name = "SPECIES template" + groups = list("generic") /datum/unit_test/species/injection_mod name = "SPECIES: All species shall have a valid injection_mod" diff --git a/code/unit_tests/sql_tests.dm b/code/unit_tests/sql_tests.dm index fa0ef8e9d24..888b73fe91f 100644 --- a/code/unit_tests/sql_tests.dm +++ b/code/unit_tests/sql_tests.dm @@ -1,5 +1,6 @@ /datum/unit_test/sql_preferences_columns name = "SQL: Preferences Columns" + groups = list("generic") /datum/unit_test/sql_preferences_columns/start_test() if(!config.sql_enabled) @@ -97,6 +98,7 @@ /datum/unit_test/sql_preferences_vars name = "SQL: Preferences Variables" + groups = list("generic") /datum/unit_test/sql_preferences_vars/start_test() var/faults = 0 diff --git a/code/unit_tests/ss_test.dm b/code/unit_tests/ss_test.dm index 028f94deab4..6bca6ac7e95 100644 --- a/code/unit_tests/ss_test.dm +++ b/code/unit_tests/ss_test.dm @@ -8,6 +8,107 @@ */ #ifdef UNIT_TEST +/* + The Unit Tests Configuration subsystem +*/ + +var/datum/controller/subsystem/unit_tests_config/SSunit_tests_config = new +/datum/controller/subsystem/unit_tests_config + name = "Unit Test Config" + init_order = SS_INIT_PERSISTENT_CONFIG + flags = SS_NO_FIRE + + var/datum/unit_test/UT = new // Logging/output + + ///What is our identifier, what pod are we, and hence what are we supposed to run + var/identifier = null + + ///The configuration, decoded from `config/unit_test/ut_pods_configuration.json`, specific for our identifier + var/list/config = list() + + ///Boolean, if the tests should fast fail (Anything fails = the pod shuts down) + var/fail_fast = FALSE + + ///How many times can the pod retries before the unit test is considered failed + var/retries = 0 + +/datum/controller/subsystem/unit_tests_config/New() + . = ..() + + world.fps = 10 + + //Acquire our identifier, or enter Hopper mode if failing to do so + try + src.identifier = rustg_file_read("config/unit_test/identifier.txt") + + if(isnull(src.identifier)) + UT.fail("**** This UT is being run without an identifier! Aborting... ****") + del world + catch() + UT.fail("**** Exception encountered while trying to acquire an identifier for this UT! ***") + del world + + + + ASSERT(!isnull(src.identifier)) + + //Try to acquire our configuration + try + + src.config = json_decode(rustg_file_read("config/unit_test/ut_pods_configuration.json")) + + UT.debug("Pods configuration file read as: [json_encode(src.config)]") + UT.debug("Will extract the pod configuration for pod with identifier: [src.identifier]") + + for(var/k in src.config) + UT.debug("The following pod configuration is defined: [k]") + + src.config = src.config[src.identifier] + + UT.debug("Pods configuration extrapolated as: [json_encode(src.config)]") + + if(isnull(src.config)) + UT.fail("**** This UT is being run without a config, it's null! Aborting... ****") + del world + + if(!src.config.len) + UT.fail("**** This UT is being run without a config! Aborting... ****") + del world + + catch(var/exception/e) + UT.fail("**** Exception encountered while trying to acquire the config for this UT! Identifier: [identifier] ***") + UT.fail("**** Exception encountered: [e] ***") + . = ..(e) + del world + + refresh_retries(FALSE) + refresh_fail_fast() + + +/** + * Refresh the `retries` variable from the environment variables + * + * * decrement - A boolean, if `TRUE` it decrements the environment variable that holds the retries left + */ +/datum/controller/subsystem/unit_tests_config/proc/refresh_retries(decrement = FALSE) + src.retries = text2num(world.GetConfig("env", "CI_MAX_RETRIES")) + + if(decrement && src.retries) + world.SetConfig("env", "CI_MAX_RETRIES", num2text((src.retries - 1))) + +/** + * Refresh the `fail_fast` variable depending on the CI trigger reason + */ +/datum/controller/subsystem/unit_tests_config/proc/refresh_fail_fast() + + //Off by default, so only need to flip it on when we wish it to + if(world.GetConfig("env", "CI_TRIGGER_REASON") == "merge_group") + src.fail_fast = TRUE + + +/* + The Unit Tests subsystem +*/ /datum/controller/subsystem/unit_tests name = "Unit Tests" var/datum/unit_test/UT = new // Use this to log things from outside where a specific unit_test is defined @@ -19,6 +120,7 @@ wait = 2 SECONDS runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY | RUNLEVEL_INIT + /datum/controller/subsystem/unit_tests/Initialize(timeofday) UT.notice("Initializing Unit Testing", __FILE__, __LINE__) @@ -26,13 +128,21 @@ //Start the Round. // - for (var/thing in subtypesof(/datum/unit_test) - typecacheof(current_map.excluded_test_types)) + for(var/thing in subtypesof(/datum/unit_test) - typecacheof(current_map.excluded_test_types)) var/datum/unit_test/D = new thing + if(findtext(D.name, "template")) qdel(D) continue - queue += D + if(!length(D.groups)) + UT.fail("**** Unit Test has no group assigned! [D.name] ****") + del world + + for(var/group in D.groups) + if((group in SSunit_tests_config.config["unit_test_groups"]) || (SSunit_tests_config.config["unit_test_groups"][1] == "*")) + queue += D + break UT.notice("[queue.len] unit tests loaded.", __FILE__, __LINE__) ..() @@ -75,9 +185,15 @@ total_unit_tests++ + if(unit_tests_failures && SSunit_tests_config.fail_fast) + UT.fail("**** Fail fast is enabled and an unit test failed! Aborting... ****", __FILE__, __LINE__) + handle_tests_ending(TRUE) + break + if (MC_TICK_CHECK) return + if (!curr.len) stage++ @@ -119,8 +235,16 @@ if (4) // Finalization. if(all_unit_tests_passed) UT.pass("**** All Unit Tests Passed \[[total_unit_tests]\] ****", __FILE__, __LINE__) + handle_tests_ending(FALSE) else UT.fail("**** \[[unit_tests_failures]\] Errors Encountered! Read the logs above! ****", __FILE__, __LINE__) - del world + handle_tests_ending(TRUE) + +/datum/controller/subsystem/unit_tests/proc/handle_tests_ending(is_failure = FALSE) + if(is_failure && SSunit_tests_config.retries) + SSunit_tests_config.refresh_retries(TRUE) + world.Reboot("Restarting for another UT try, remaining tries: [SSunit_tests_config.retries]", TRUE) + else + del world #endif diff --git a/code/unit_tests/subsystem_init.dm b/code/unit_tests/subsystem_init.dm index 1670ccd0752..d28fe16b30f 100644 --- a/code/unit_tests/subsystem_init.dm +++ b/code/unit_tests/subsystem_init.dm @@ -1,6 +1,7 @@ /// Tests that all subsystems that need to properly initialize. /datum/unit_test/subsystem_init name = "Controller Subsystem Init" + groups = list("generic") /datum/unit_test/subsystem_init/start_test() for(var/datum/controller/subsystem/subsystem as anything in Master.subsystems) diff --git a/code/unit_tests/timer_sanity.dm b/code/unit_tests/timer_sanity.dm index 213e455b7f9..fad98c3351a 100644 --- a/code/unit_tests/timer_sanity.dm +++ b/code/unit_tests/timer_sanity.dm @@ -1,5 +1,6 @@ /datum/unit_test/timer_sanity name = "SStimer Sanity (no negative count) Test" + groups = list("generic") /datum/unit_test/timer_sanity/start_test() TEST_ASSERT(SStimer.bucket_count >= 0, diff --git a/code/unit_tests/unit_test.dm b/code/unit_tests/unit_test.dm index 578c7cd366a..3da8d0bb4a8 100644 --- a/code/unit_tests/unit_test.dm +++ b/code/unit_tests/unit_test.dm @@ -49,8 +49,11 @@ var/ascii_reset = "[ascii_esc]\[0m" var/why_disabled = "No reason set." // If we disable a unit test we will display why so it reminds us to check back on it later. var/map_path // This should be the same as the path var on /datum/map - The unit test will only run for that map + ///A list of strings, each of which represents a group which this UT belongs to, the UT pods will only run UTs that are in their list + var/list/groups = list() -/** + +/* * Log levels used to prettify correctly, only defined in this file (aka undef'd at the end) * Build unit test messages as per https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions, or for console output */ diff --git a/code/unit_tests/zas_tests.dm b/code/unit_tests/zas_tests.dm index b0006f2cd0f..601e2065ac3 100644 --- a/code/unit_tests/zas_tests.dm +++ b/code/unit_tests/zas_tests.dm @@ -20,6 +20,8 @@ /datum/unit_test/zas_area_test name = "ZAS: Area Test Template" + groups = list("map") + var/area_path = null // Put the area you are testing here. var/expectation = UT_NORMAL // See defines above. @@ -133,6 +135,8 @@ /datum/unit_test/zas_supply_shuttle_moved name = "ZAS: Supply Shuttle (When Moved)" + groups = list("map") + async = TRUE // We're moving the shuttle using built in procs. var/datum/shuttle/autodock/ferry/supply/shuttle = null @@ -192,6 +196,7 @@ /datum/unit_test/zas_active_edges name = "ZAS: Roundstart Active Edges" + groups = list("map") /datum/unit_test/zas_active_edges/start_test() diff --git a/config/unit_test/identifier.txt b/config/unit_test/identifier.txt new file mode 100644 index 00000000000..e69de29bb2d diff --git a/config/unit_test/ut_pods_configuration.json b/config/unit_test/ut_pods_configuration.json new file mode 100644 index 00000000000..b7f3100d52a --- /dev/null +++ b/config/unit_test/ut_pods_configuration.json @@ -0,0 +1,31 @@ +{ + "generic":{ + "unit_test_groups":["generic", "mob", "machinery"], + "map_template_unit_test_groups":[false] + }, + + "create_and_destroy":{ + "unit_test_groups":["create and destroy"], + "map_template_unit_test_groups":[false] + }, + + "maptest":{ + "unit_test_groups":["map"], + "map_template_unit_test_groups":["*"] + }, + + "awaysites-1":{ + "unit_test_groups":["map"], + "map_template_unit_test_groups":[1] + }, + + "awaysites-2":{ + "unit_test_groups":["map"], + "map_template_unit_test_groups":[2] + }, + + "awaysites-3":{ + "unit_test_groups":["map"], + "map_template_unit_test_groups":[3] + } +} diff --git a/html/changelogs/fluffyghost-cibetter.yml b/html/changelogs/fluffyghost-cibetter.yml new file mode 100644 index 00000000000..096251f561f --- /dev/null +++ b/html/changelogs/fluffyghost-cibetter.yml @@ -0,0 +1,53 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: FluffyGhost + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - backend: "The CI now uses multiple pods to load-balance the tests in parallel." + - backend: "Pods configuration is loaded from config/unit_test/ut_pods_configuration.json with a personalized ID (set by the CI) that instructs SSunit_test on what to do." + - backend: "Labeler now downloads the PR, which I hope would help with the changelog required label." + - backend: "Away sites now have a tag that indicates in what CI pod they should be tested, for load balancing. The tag is mandatory." + - backend: "Unit tests now have tags, which are used to select which pods run which unit tests, using the 'has any tag in' logic." + - backend: "The CI now supports fail fast when running inside a merge queue." + - backend: "The CI now supports retrying a pod run up to N times, when running inside a merge queue." + - backend: "After the fixing of all the bad formatting of the code in a previous PR, megalinter is reintroduced, now it's only your code that's wrongly formatted." + - backend: "The CI now only uploads artifacts with the logs on test failure, saving space." + - backend: "The CI now sets the environment variables before any other step is done, so they are set correctly across the steps." + - backend: "The linters now run in parallel." + - backend: "Added the ability (off by default) to SSH into the unit test pods to diagnose issues." + - backend: "Introduced SSunit_tests_config, to store and manage the unit tests config." diff --git a/maps/away/away_site/abandoned_industrial/abandoned_industrial_station.dm b/maps/away/away_site/abandoned_industrial/abandoned_industrial_station.dm index 92bfed894d0..837e118a30f 100644 --- a/maps/away/away_site/abandoned_industrial/abandoned_industrial_station.dm +++ b/maps/away/away_site/abandoned_industrial/abandoned_industrial_station.dm @@ -1,6 +1,7 @@ /datum/map_template/ruin/away_site/abandoned_industrial_station name = "Abandoned Industrial Station"//Not a visible thing ingame, but this should be unique for visibility purposes description = "Abandoned Industrial Station."//Not visible ingame + unit_test_groups = list(1) id = "abandoned_industrial_station"//Arbitrary tag to make things work. This should be lowercase and unique spawn_cost = 1 diff --git a/maps/away/away_site/abandoned_industrial/abandoned_industrial_station.dmm b/maps/away/away_site/abandoned_industrial/abandoned_industrial_station.dmm index 1399549bb23..0a975eac91e 100644 --- a/maps/away/away_site/abandoned_industrial/abandoned_industrial_station.dmm +++ b/maps/away/away_site/abandoned_industrial/abandoned_industrial_station.dmm @@ -198,20 +198,6 @@ /obj/effect/map_effect/window_spawner/full/reinforced/grille/firedoor, /turf/simulated/floor/airless, /area/abandoned_industrial_station/docks_a2) -"aI" = ( -/obj/effect/decal/fake_object{ - desc = "That looks like it doesn't close easily."; - icon = 'icons/obj/doors/rapid_pdoor.dmi'; - icon_state = "pdoor0"; - name = "blast door"; - dir = 4 - }, -/obj/random/dirt_75, -/obj/random/dirt_75, -/obj/random/dirt_75, -/obj/effect/decal/cleanable/floor_damage/random_broken, -/turf/simulated/floor/airless, -/area/abandoned_industrial_station/engineering) "aJ" = ( /obj/effect/floor_decal/industrial/outline/security, /obj/structure/closet/crate/medical, @@ -442,8 +428,7 @@ pixel_y = 4 }, /obj/machinery/light/colored/red{ - dir = 4; - pixel_y = 0 + dir = 4 }, /turf/simulated/floor/tiled/dark, /area/abandoned_industrial_station/bridge) @@ -750,8 +735,7 @@ }, /obj/random/dirt_75, /obj/effect/decal/cleanable/generic{ - pixel_x = -6; - pixel_y = 0 + pixel_x = -6 }, /turf/simulated/floor/tiled, /area/abandoned_industrial_station/bridge) @@ -1073,8 +1057,7 @@ /area/abandoned_industrial_station/docks_a2) "dp" = ( /obj/effect/floor_decal/industrial/warning{ - dir = 1; - icon_state = "warning" + dir = 1 }, /obj/random/dirt_75, /turf/simulated/floor/airless, @@ -1245,9 +1228,7 @@ pixel_x = 4; pixel_y = -5 }, -/obj/machinery/light/broken{ - dir = 2 - }, +/obj/machinery/light/broken, /obj/random/dirt_75, /obj/random/dirt_75, /obj/random/dirt_75, @@ -1537,8 +1518,7 @@ pixel_y = 1 }, /obj/machinery/papershredder{ - pixel_x = -6; - pixel_y = 0 + pixel_x = -6 }, /obj/effect/decal/cleanable/floor_damage/random_wood_broken, /turf/simulated/floor/wood, @@ -1641,8 +1621,7 @@ /area/abandoned_industrial_station/atmos) "fn" = ( /obj/effect/floor_decal/industrial/warning{ - dir = 1; - icon_state = "warning" + dir = 1 }, /obj/item/stack/cable_coil/green{ pixel_x = -5; @@ -1875,8 +1854,7 @@ /obj/effect/decal/cleanable/dirt, /obj/effect/decal/cleanable/dirt, /obj/effect/decal/cleanable/generic{ - pixel_x = -6; - pixel_y = 0 + pixel_x = -6 }, /obj/effect/decal/cleanable/blood/gibs/limb, /obj/item/ammo_casing/shotgun/pellet/used{ @@ -1913,8 +1891,7 @@ "ge" = ( /obj/effect/floor_decal/industrial/outline/medical, /obj/random/junk{ - pixel_x = 11; - pixel_y = 0 + pixel_x = 11 }, /obj/random/dirt_75, /turf/simulated/floor/tiled/white, @@ -1947,7 +1924,6 @@ /area/space) "gk" = ( /obj/structure/sign/directions/dock{ - dir = 2; name = "\improper DOCKS A2 sign"; pixel_y = 25 }, @@ -2170,8 +2146,7 @@ pixel_y = 8 }, /obj/item/material/stool/chair/folding{ - pixel_x = -10; - pixel_y = 0 + pixel_x = -10 }, /obj/random/dirt_75, /obj/random/dirt_75, @@ -2424,8 +2399,7 @@ /area/abandoned_industrial_station/operations) "hJ" = ( /obj/random/junk{ - pixel_x = -13; - pixel_y = 0 + pixel_x = -13 }, /turf/simulated/floor/tiled, /area/abandoned_industrial_station/hallways) @@ -2957,8 +2931,7 @@ pixel_x = -3 }, /obj/item/reagent_containers/food/drinks/bottle/vodka/mushroom{ - pixel_x = 6; - pixel_y = 0 + pixel_x = 6 }, /obj/random/dirt_75, /turf/simulated/floor, @@ -3214,7 +3187,6 @@ pixel_y = 41 }, /obj/structure/sign/directions/dock{ - dir = 2; name = "\improper DOCKS A1 sign"; pixel_y = 25 }, @@ -3878,7 +3850,6 @@ pixel_y = 41 }, /obj/structure/sign/directions/dock{ - dir = 2; name = "\improper DOCKS A1 sign"; pixel_y = 25 }, @@ -3918,7 +3889,6 @@ pixel_y = 25 }, /obj/structure/sign/directions/civ{ - dir = 2; pixel_y = 33 }, /obj/structure/sign/directions/evac{ @@ -4222,9 +4192,7 @@ /area/abandoned_industrial_station/atmos) "ny" = ( /obj/random/junk, -/obj/machinery/light/broken{ - dir = 2 - }, +/obj/machinery/light/broken, /obj/random/dirt_75, /turf/simulated/floor, /area/abandoned_industrial_station/maint_a1) @@ -4314,9 +4282,7 @@ /obj/effect/floor_decal/corner/dark_green{ dir = 6 }, -/obj/structure/barricade/wooden{ - pixel_y = 0 - }, +/obj/structure/barricade/wooden, /obj/machinery/light/colored/decayed{ dir = 4 }, @@ -4551,8 +4517,7 @@ /area/abandoned_industrial_station/docks_a1) "ow" = ( /obj/effect/floor_decal/industrial/warning{ - dir = 1; - icon_state = "warning" + dir = 1 }, /obj/structure/cable/green{ d2 = 2; @@ -4796,8 +4761,7 @@ /area/abandoned_industrial_station/docks_a2) "pm" = ( /obj/effect/floor_decal/industrial/warning{ - dir = 1; - icon_state = "warning" + dir = 1 }, /obj/structure/cable/green{ d2 = 2; @@ -5283,8 +5247,7 @@ /area/abandoned_industrial_station/docks_a2) "qK" = ( /obj/random/junk{ - pixel_x = -13; - pixel_y = 0 + pixel_x = -13 }, /obj/random/dirt_75, /turf/simulated/floor/tiled, @@ -5659,8 +5622,7 @@ /area/abandoned_industrial_station/maint_a1) "rW" = ( /obj/effect/floor_decal/industrial/warning{ - dir = 1; - icon_state = "warning" + dir = 1 }, /obj/structure/railing/mapped{ dir = 1 @@ -6252,8 +6214,7 @@ /area/abandoned_industrial_station/hallways) "tM" = ( /obj/random/junk{ - pixel_x = 11; - pixel_y = 0 + pixel_x = 11 }, /obj/random/dirt_75, /obj/random/dirt_75, @@ -6760,12 +6721,10 @@ pixel_y = 41 }, /obj/structure/sign/directions/dock{ - dir = 2; name = "\improper DOCKS A1 sign"; pixel_y = 25 }, /obj/structure/sign/directions/medical{ - dir = 2; name = "\improper MEDBAY sign"; pixel_y = 33 }, @@ -6777,8 +6736,7 @@ /area/abandoned_industrial_station/hallways) "vy" = ( /obj/random/junk{ - pixel_x = 11; - pixel_y = 0 + pixel_x = 11 }, /turf/simulated/floor, /area/abandoned_industrial_station/maint_central) @@ -7103,8 +7061,7 @@ /area/abandoned_industrial_station/quarters) "wC" = ( /obj/item/clothing/head/helmet/space/emergency{ - pixel_x = -8; - pixel_y = 0 + pixel_x = -8 }, /obj/random/dirt_75, /obj/random/dirt_75, @@ -7698,8 +7655,7 @@ /obj/structure/bed/padded, /obj/item/bedsheet/random, /obj/random/junk{ - pixel_x = 11; - pixel_y = 0 + pixel_x = 11 }, /obj/random/dirt_75, /turf/simulated/floor/tiled, @@ -8009,9 +7965,7 @@ /turf/simulated/floor, /area/abandoned_industrial_station/maint_a2) "zf" = ( -/obj/machinery/light/broken{ - dir = 2 - }, +/obj/machinery/light/broken, /obj/random/dirt_75, /obj/random/dirt_75, /turf/simulated/floor/tiled, @@ -8048,9 +8002,7 @@ /obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{ dir = 4 }, -/obj/machinery/light/broken{ - dir = 2 - }, +/obj/machinery/light/broken, /obj/random/dirt_75, /turf/simulated/floor, /area/abandoned_industrial_station/maint_a1) @@ -8104,8 +8056,7 @@ /area/abandoned_industrial_station/maint_central) "zF" = ( /obj/effect/floor_decal/industrial/warning{ - dir = 1; - icon_state = "warning" + dir = 1 }, /obj/random/dirt_75, /obj/effect/decal/cleanable/floor_damage/random_tiled_burned, @@ -8412,9 +8363,7 @@ /obj/structure/cable{ icon_state = "4-8" }, -/obj/machinery/light/broken{ - dir = 2 - }, +/obj/machinery/light/broken, /obj/random/dirt_75, /turf/simulated/floor, /area/abandoned_industrial_station/maint_central) @@ -8462,9 +8411,7 @@ /turf/simulated/floor/tiled, /area/abandoned_industrial_station/engineering) "AJ" = ( -/obj/machinery/door/airlock/multi_tile/glass{ - dir = 4 - }, +/obj/machinery/door/airlock/multi_tile/glass, /obj/machinery/door/firedoor/noid, /obj/effect/floor_decal/industrial/hatch/yellow, /obj/random/dirt_75, @@ -8513,9 +8460,7 @@ /obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{ dir = 4 }, -/obj/machinery/light/broken{ - dir = 2 - }, +/obj/machinery/light/broken, /obj/random/dirt_75, /turf/simulated/floor, /area/abandoned_industrial_station/maint_a1) @@ -8734,8 +8679,7 @@ /area/abandoned_industrial_station/medical) "Bo" = ( /obj/effect/floor_decal/industrial/warning{ - dir = 1; - icon_state = "warning" + dir = 1 }, /obj/machinery/power/solar, /obj/structure/cable/green{ @@ -9533,8 +9477,7 @@ /area/abandoned_industrial_station/service) "DD" = ( /obj/effect/floor_decal/industrial/warning{ - dir = 1; - icon_state = "warning" + dir = 1 }, /obj/structure/cable/green{ d2 = 2; @@ -10075,9 +10018,7 @@ /obj/structure/bed/stool/chair/padded/black{ dir = 4 }, -/obj/effect/floor_decal/corner/orange/full{ - dir = 2 - }, +/obj/effect/floor_decal/corner/orange/full, /obj/random/dirt_75, /turf/simulated/floor/tiled, /area/abandoned_industrial_station/operations) @@ -10608,8 +10549,7 @@ pixel_y = 10 }, /obj/effect/decal/cleanable/molten_item{ - pixel_x = -2; - pixel_y = 0 + pixel_x = -2 }, /obj/random/dirt_75, /turf/simulated/floor/tiled/dark/full, @@ -10699,9 +10639,7 @@ /obj/effect/floor_decal/corner{ dir = 8 }, -/obj/item/toy/plushie/spider{ - pixel_y = 0 - }, +/obj/item/toy/plushie/spider, /obj/random/dirt_75, /turf/simulated/floor/tiled/dark, /area/abandoned_industrial_station/hallways) @@ -10937,8 +10875,7 @@ /area/abandoned_industrial_station/hallways) "Ir" = ( /obj/random/junk{ - pixel_x = 11; - pixel_y = 0 + pixel_x = 11 }, /obj/random/dirt_75, /turf/simulated/floor, @@ -11081,9 +11018,7 @@ /obj/structure/cable{ icon_state = "4-8" }, -/obj/machinery/light/broken{ - dir = 2 - }, +/obj/machinery/light/broken, /obj/random/dirt_75, /turf/simulated/floor, /area/abandoned_industrial_station/maint_central) @@ -11196,8 +11131,7 @@ dir = 1 }, /obj/random/junk{ - pixel_x = 11; - pixel_y = 0 + pixel_x = 11 }, /obj/random/dirt_75, /turf/simulated/floor, @@ -11641,8 +11575,7 @@ dir = 1 }, /obj/item/pen/blue{ - pixel_x = 8; - pixel_y = 0 + pixel_x = 8 }, /obj/random/dirt_75, /turf/simulated/floor/tiled, @@ -12275,9 +12208,7 @@ /turf/simulated/floor/airless, /area/abandoned_industrial_station/docks_a1) "Mm" = ( -/obj/machinery/door/airlock/multi_tile/glass{ - dir = 4 - }, +/obj/machinery/door/airlock/multi_tile/glass, /obj/machinery/door/firedoor/noid, /obj/effect/floor_decal/industrial/hatch/yellow, /turf/simulated/floor, @@ -12707,8 +12638,7 @@ /area/abandoned_industrial_station/atmos) "NL" = ( /obj/effect/floor_decal/industrial/warning{ - dir = 1; - icon_state = "warning" + dir = 1 }, /obj/random/dirt_75, /obj/effect/decal/cleanable/floor_damage/random_broken, @@ -12946,8 +12876,7 @@ dir = 9 }, /obj/item/ammo_magazine/c45m/empty{ - pixel_x = -5; - pixel_y = 0 + pixel_x = -5 }, /obj/random/dirt_75, /turf/simulated/floor/tiled, @@ -13551,9 +13480,7 @@ /turf/simulated/floor/tiled, /area/abandoned_industrial_station/operations) "QO" = ( -/obj/machinery/door/airlock/multi_tile/glass{ - dir = 4 - }, +/obj/machinery/door/airlock/multi_tile/glass, /obj/machinery/door/firedoor/noid, /obj/effect/floor_decal/industrial/hatch/yellow, /obj/random/dirt_75, @@ -13684,8 +13611,7 @@ /area/abandoned_industrial_station/quarters) "Rf" = ( /obj/effect/floor_decal/industrial/warning{ - dir = 1; - icon_state = "warning" + dir = 1 }, /obj/random/dirt_75, /obj/effect/decal/cleanable/floor_damage/random_carpet_broken, @@ -13855,8 +13781,7 @@ /area/abandoned_industrial_station/maint_central) "RN" = ( /obj/effect/floor_decal/industrial/warning{ - dir = 1; - icon_state = "warning" + dir = 1 }, /obj/structure/cable/green{ d2 = 2; @@ -14650,8 +14575,7 @@ pixel_y = 2 }, /obj/item/pipe{ - pixel_x = 22; - pixel_y = 0 + pixel_x = 22 }, /obj/random/dirt_75, /turf/simulated/floor, @@ -14945,8 +14869,7 @@ dead = 1; icon_state = "plant-dead"; name = "dead plant"; - pixel_x = -4; - pixel_y = 0 + pixel_x = -4 }, /obj/random/dirt_75, /turf/simulated/floor/tiled, @@ -15582,7 +15505,6 @@ pixel_y = 25 }, /obj/structure/sign/directions/civ{ - dir = 2; pixel_y = 33 }, /obj/structure/sign/directions/evac{ @@ -15720,8 +15642,7 @@ /area/abandoned_industrial_station/atmos) "XR" = ( /obj/effect/floor_decal/industrial/warning{ - dir = 1; - icon_state = "warning" + dir = 1 }, /obj/random/dirt_75, /obj/effect/decal/cleanable/floor_damage/random_tiled_broken, @@ -16031,8 +15952,7 @@ dir = 4 }, /obj/random/tech_supply{ - pixel_x = 5; - pixel_y = 0 + pixel_x = 5 }, /turf/simulated/floor/carpet/rubber, /area/abandoned_industrial_station/hangar) @@ -16120,8 +16040,7 @@ }, /obj/machinery/light/colored/decayed, /obj/item/ammo_casing/pistol/used{ - pixel_x = 9; - pixel_y = 0 + pixel_x = 9 }, /obj/random/dirt_75, /turf/simulated/floor/tiled, @@ -50029,7 +49948,7 @@ Zi Zi Zi Zi -aI +eq Uj CX af diff --git a/maps/away/away_site/abandoned_mining/cursed.dm b/maps/away/away_site/abandoned_mining/cursed.dm index 0f867a299e8..68152e4b419 100644 --- a/maps/away/away_site/abandoned_mining/cursed.dm +++ b/maps/away/away_site/abandoned_mining/cursed.dm @@ -7,6 +7,8 @@ spawn_cost = 1 id = "cursed" + unit_test_groups = list(1) + /singleton/submap_archetype/cursed map = "lone asteroid" descriptor = "A lone asteroid with a hangar. Latest data from this sector shows it was a Hephaestus mining station, two years ago." diff --git a/maps/away/away_site/big_derelict/bigderelict.dm b/maps/away/away_site/big_derelict/bigderelict.dm index c1922e0c403..97bff1dcbc4 100644 --- a/maps/away/away_site/big_derelict/bigderelict.dm +++ b/maps/away/away_site/big_derelict/bigderelict.dm @@ -7,6 +7,8 @@ spawn_cost = 2 id = "big_derelict" + unit_test_groups = list(1) + /singleton/submap_archetype/big_derelict map = "large derelict" descriptor = "A very large derelict station. According to the starmap, it shouldn't exist." diff --git a/maps/away/away_site/blueriver/blueriver.dm b/maps/away/away_site/blueriver/blueriver.dm index 8738262f824..a3975425f15 100644 --- a/maps/away/away_site/blueriver/blueriver.dm +++ b/maps/away/away_site/blueriver/blueriver.dm @@ -8,6 +8,8 @@ generate_mining_by_z = 2 sectors = list(SECTOR_ROMANOVICH, SECTOR_CORP_ZONE, SECTOR_VALLEY_HALE, SECTOR_BADLANDS, ALL_COALITION_SECTORS) + unit_test_groups = list(1) + /singleton/submap_archetype/blueriver map = "bluespace river" descriptor = "An arctic planet and an alien underground surface." diff --git a/maps/away/away_site/civ_station/civilian_station.dm b/maps/away/away_site/civ_station/civilian_station.dm new file mode 100644 index 00000000000..e69de29bb2d diff --git a/maps/away/away_site/crashed_elyran_tanker/crashed_elyran_tanker.dm b/maps/away/away_site/crashed_elyran_tanker/crashed_elyran_tanker.dm index f44747271de..cfe6621d315 100644 --- a/maps/away/away_site/crashed_elyran_tanker/crashed_elyran_tanker.dm +++ b/maps/away/away_site/crashed_elyran_tanker/crashed_elyran_tanker.dm @@ -9,6 +9,8 @@ spawn_cost = 1 id = "crashed_elyran_tanker" + unit_test_groups = list(1) + /singleton/submap_archetype/crashed_elyran_tanker map = "crashed_elyran_tanker" descriptor = "A small tanker, emitting a very faint IFF signal of civilian vessels registered in Elyra. It seems to be partially embedded into a small asteroid, and appears to be completely cold." diff --git a/maps/away/away_site/first_aurora/first_aurora.dm b/maps/away/away_site/first_aurora/first_aurora.dm index 677e6fd4198..d112cadad19 100644 --- a/maps/away/away_site/first_aurora/first_aurora.dm +++ b/maps/away/away_site/first_aurora/first_aurora.dm @@ -7,6 +7,8 @@ spawn_cost = 2 id = "first_aurora" + unit_test_groups = list(1) + /singleton/submap_archetype/first_aurora map = "space station derelict" descriptor = "A space derelict." diff --git a/maps/away/away_site/hivebot_hub/hivebot_hub.dm b/maps/away/away_site/hivebot_hub/hivebot_hub.dm index 23e0cb81e38..f3a6ed03db3 100644 --- a/maps/away/away_site/hivebot_hub/hivebot_hub.dm +++ b/maps/away/away_site/hivebot_hub/hivebot_hub.dm @@ -7,6 +7,8 @@ spawn_cost = 1 id = "hivebot_hub" + unit_test_groups = list(1) + /singleton/submap_archetype/hivebot_hub map = "derelict supply hub" descriptor = "A derelict supply hub." diff --git a/maps/away/away_site/konyang/point_verdant/point_verdant.dm b/maps/away/away_site/konyang/point_verdant/point_verdant.dm index dd0668c2469..0a50627ea07 100644 --- a/maps/away/away_site/konyang/point_verdant/point_verdant.dm +++ b/maps/away/away_site/konyang/point_verdant/point_verdant.dm @@ -8,6 +8,8 @@ spawn_cost = 1 template_flags = TEMPLATE_FLAG_SPAWN_GUARANTEED + unit_test_groups = list(2) + /singleton/submap_archetype/point_verdant map = "point_verdant" descriptor = "A landing zone within Point Verdant city limits." diff --git a/maps/away/away_site/magshield/magshield.dm b/maps/away/away_site/magshield/magshield.dm index 47aae85fdde..b4d3fe9eee3 100644 --- a/maps/away/away_site/magshield/magshield.dm +++ b/maps/away/away_site/magshield/magshield.dm @@ -7,6 +7,8 @@ spawn_weight = 1 spawn_cost = 1 + unit_test_groups = list(1) + /singleton/submap_archetype/magshield map = "magshield" descriptor = "It's an orbital shield station." diff --git a/maps/away/away_site/overgrown_mining_station/overgrown_mining_station.dm b/maps/away/away_site/overgrown_mining_station/overgrown_mining_station.dm index 7c7682fcd59..2ae4ee1338b 100644 --- a/maps/away/away_site/overgrown_mining_station/overgrown_mining_station.dm +++ b/maps/away/away_site/overgrown_mining_station/overgrown_mining_station.dm @@ -7,6 +7,8 @@ spawn_cost = 2 id = "overgrown_mining_station" + unit_test_groups = list(1) + /singleton/submap_archetype/overgrown_mining_station map = "overgrown_mining_station" descriptor = "A derelict mining station." @@ -21,4 +23,4 @@ icon_state = "overgrown_mining_station" requires_power = FALSE base_turf = /turf/space - no_light_control = TRUE \ No newline at end of file + no_light_control = TRUE diff --git a/maps/away/away_site/racers/racers.dm b/maps/away/away_site/racers/racers.dm index 29109026283..53f327bb84d 100644 --- a/maps/away/away_site/racers/racers.dm +++ b/maps/away/away_site/racers/racers.dm @@ -7,6 +7,8 @@ spawn_cost = 2 id = "racers" + unit_test_groups = list(1) + /singleton/submap_archetype/racers map = "unregistered station" descriptor = "A unregistered station." diff --git a/maps/away/away_site/romanovich/grand_romanovich.dm b/maps/away/away_site/romanovich/grand_romanovich.dm index 023bbdeee5a..0949f24b9e1 100644 --- a/maps/away/away_site/romanovich/grand_romanovich.dm +++ b/maps/away/away_site/romanovich/grand_romanovich.dm @@ -7,6 +7,8 @@ ship_cost = 2 id = "grand_romanovich" + unit_test_groups = list(2) + /singleton/submap_archetype/grand_romanovich map = "Grand Romanovich Casino" descriptor = "An adhomian style casino in Tau Ceti's space." diff --git a/maps/away/away_site/sensor_relay/sensor_relay.dm b/maps/away/away_site/sensor_relay/sensor_relay.dm index c38a708b54d..0d7ccc7fc74 100644 --- a/maps/away/away_site/sensor_relay/sensor_relay.dm +++ b/maps/away/away_site/sensor_relay/sensor_relay.dm @@ -6,6 +6,8 @@ id = "sensor_relay" template_flags = TEMPLATE_FLAG_SPAWN_GUARANTEED + unit_test_groups = list(1) + /singleton/submap_archetype/sensor_relay map = "sensor_relay" descriptor = "A sensor relay." diff --git a/maps/away/away_site/shady/shady.dm b/maps/away/away_site/shady/shady.dm index 89343780e5c..20272f1cad2 100644 --- a/maps/away/away_site/shady/shady.dm +++ b/maps/away/away_site/shady/shady.dm @@ -7,6 +7,8 @@ spawn_cost = 1 id = "shady" + unit_test_groups = list(1) + /singleton/submap_archetype/shady map = "shady asteroid" descriptor = "An asteroid with a hangar carved out inside it. Scans detect an unregistered structure within, with multiple lifeforms present." diff --git a/maps/away/away_site/sol_bunker/bunker.dm b/maps/away/away_site/sol_bunker/bunker.dm index a9bcbdf3cce..63d30302986 100644 --- a/maps/away/away_site/sol_bunker/bunker.dm +++ b/maps/away/away_site/sol_bunker/bunker.dm @@ -7,6 +7,8 @@ spawn_cost = 1 id = "abandoned_bunker" + unit_test_groups = list(2) + /singleton/submap_archetype/abandoned_bunker map = "lone asteroid" descriptor = "A lone asteroid. Strange signals are coming from this one." diff --git a/maps/away/away_site/space_bar/space_bar.dm b/maps/away/away_site/space_bar/space_bar.dm new file mode 100644 index 00000000000..e69de29bb2d diff --git a/maps/away/away_site/tajara/mining_jack/mining_jack.dm b/maps/away/away_site/tajara/mining_jack/mining_jack.dm index 0e13a8231e8..e522f2b4535 100644 --- a/maps/away/away_site/tajara/mining_jack/mining_jack.dm +++ b/maps/away/away_site/tajara/mining_jack/mining_jack.dm @@ -8,6 +8,8 @@ id = "tajara_mining_jack" shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/tajara_mining_jack) + unit_test_groups = list(2) + /singleton/submap_archetype/tajara_mining_jack map = "adhomian mining outpost" descriptor = "An outpost used by the crew of mining jacks." diff --git a/maps/away/away_site/tajara/peoples_station/peoples_station.dm b/maps/away/away_site/tajara/peoples_station/peoples_station.dm index e383f8869a2..78bcfbc8e69 100644 --- a/maps/away/away_site/tajara/peoples_station/peoples_station.dm +++ b/maps/away/away_site/tajara/peoples_station/peoples_station.dm @@ -8,6 +8,8 @@ id = "peoples_station" shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/peoples_station_fang) + unit_test_groups = list(1) + /singleton/submap_archetype/peoples_station map = "People's Space Station" descriptor = "Built in the interwar period, the People's Space Station bears the prestige of being the first space installation designed, constructed, and manned by Tajara." diff --git a/maps/away/away_site/tajara/pra_satellite/pra_satellite.dm b/maps/away/away_site/tajara/pra_satellite/pra_satellite.dm index 02e95d7d105..d4430d192e0 100644 --- a/maps/away/away_site/tajara/pra_satellite/pra_satellite.dm +++ b/maps/away/away_site/tajara/pra_satellite/pra_satellite.dm @@ -7,6 +7,8 @@ spawn_cost = 1 id = "pra_satellite" + unit_test_groups = list(2) + /singleton/submap_archetype/pra_satellite map = "hadiist satellite" descriptor = "A People's Republic of Adhomai satellite used to survey the system." diff --git a/maps/away/away_site/tajara/saniorios_smuggler/saniorios_smuggler.dm b/maps/away/away_site/tajara/saniorios_smuggler/saniorios_smuggler.dm index 0a9fec099c1..e3998c1ad17 100644 --- a/maps/away/away_site/tajara/saniorios_smuggler/saniorios_smuggler.dm +++ b/maps/away/away_site/tajara/saniorios_smuggler/saniorios_smuggler.dm @@ -7,6 +7,8 @@ spawn_cost = 2 id = "saniorios_smuggler" + unit_test_groups = list(1) + /singleton/submap_archetype/saniorios_smuggler map = "Sani'Orios" descriptor = "A gas giant composed of ammonia. Its planetary ring is home to several spaceship wrecks and hidden smuggler bases." @@ -47,4 +49,4 @@ dynamic_lighting = TRUE no_light_control = FALSE base_turf = /turf/space - flags = RAD_SHIELDED \ No newline at end of file + flags = RAD_SHIELDED diff --git a/maps/away/away_site/tajara/scrapper/scrapper.dm b/maps/away/away_site/tajara/scrapper/scrapper.dm index 1a8d900c578..087eae853de 100644 --- a/maps/away/away_site/tajara/scrapper/scrapper.dm +++ b/maps/away/away_site/tajara/scrapper/scrapper.dm @@ -8,6 +8,8 @@ id = "tajara_scrapper" shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/tajara_scrapper) + unit_test_groups = list(2) + /singleton/submap_archetype/tajara_scrapper map = "adhomian scrapper outpost" descriptor = "An outpost used by Tajaran scrapper. It offers repair and scrapping services." diff --git a/maps/away/away_site/tajara/taj_safehouse/tajara_safehouse.dm b/maps/away/away_site/tajara/taj_safehouse/tajara_safehouse.dm index e81f65b2d7d..4c8e0db4e19 100644 --- a/maps/away/away_site/tajara/taj_safehouse/tajara_safehouse.dm +++ b/maps/away/away_site/tajara/taj_safehouse/tajara_safehouse.dm @@ -8,6 +8,8 @@ id = "tajara_safehouse" shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/tajara_safehouse_shuttle) + unit_test_groups = list(1) + /singleton/submap_archetype/tajara_safehouse map = "abandoned outpost" descriptor = "A derelict space outpost." diff --git a/maps/away/away_site/unathi_pirate/izharshan/unathi_pirate_izharshan.dm b/maps/away/away_site/unathi_pirate/izharshan/unathi_pirate_izharshan.dm index 6e32ec63fe6..9083fdb6f51 100644 --- a/maps/away/away_site/unathi_pirate/izharshan/unathi_pirate_izharshan.dm +++ b/maps/away/away_site/unathi_pirate/izharshan/unathi_pirate_izharshan.dm @@ -8,6 +8,8 @@ shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/unathi_pirate_izharshan) sectors = list(SECTOR_NRRAHRAHUL, SECTOR_BADLANDS, SECTOR_GAKAL, SECTOR_UUEOAESA) + unit_test_groups = list(1) + /singleton/submap_archetype/unathi_pirate_izharshan map = "empty sector" descriptor = "An empty sector." diff --git a/maps/away/away_site/unathi_pirate/tarwa/unathi_pirate_tarwa.dm b/maps/away/away_site/unathi_pirate/tarwa/unathi_pirate_tarwa.dm index 141ca258dfd..83091e15bbb 100644 --- a/maps/away/away_site/unathi_pirate/tarwa/unathi_pirate_tarwa.dm +++ b/maps/away/away_site/unathi_pirate/tarwa/unathi_pirate_tarwa.dm @@ -8,6 +8,8 @@ shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/tarwa_shuttle) id = "tarwa_conglomerate" + unit_test_groups = list(2) + /singleton/submap_archetype/tramp_freighter map = "Tarwa Conglomerate Ship" descriptor = "Ship with pirate lizards, pirate plants" diff --git a/maps/away/away_site/wrecked_nt_ship/wrecked_nt_ship.dm b/maps/away/away_site/wrecked_nt_ship/wrecked_nt_ship.dm index 3b345d657e3..d4ea503cb38 100644 --- a/maps/away/away_site/wrecked_nt_ship/wrecked_nt_ship.dm +++ b/maps/away/away_site/wrecked_nt_ship/wrecked_nt_ship.dm @@ -7,6 +7,8 @@ spawn_cost = 2 id = "wrecked_nt_ship" + unit_test_groups = list(1) + /singleton/submap_archetype/wrecked_nt_ship map = "wrecked_nt_ship" descriptor = "A wrecked ship once owned by NanoTrasen." diff --git a/maps/away/ships/casino/casino.dm b/maps/away/ships/casino/casino.dm index 2d2b6036fa5..5684dceecd6 100644 --- a/maps/away/ships/casino/casino.dm +++ b/maps/away/ships/casino/casino.dm @@ -8,6 +8,8 @@ id = "awaysite_casino" shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/casino_cutter) + unit_test_groups = list(2) + /singleton/submap_archetype/casino map = "Casino" descriptor = "A casino ship!" diff --git a/maps/away/ships/coc/coc_ranger/coc_ship.dm b/maps/away/ships/coc/coc_ranger/coc_ship.dm index 61ae9d1501a..b66bdc78da9 100644 --- a/maps/away/ships/coc/coc_ranger/coc_ship.dm +++ b/maps/away/ships/coc/coc_ranger/coc_ship.dm @@ -8,6 +8,8 @@ id = "ranger_corvette" shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/ranger_shuttle) + unit_test_groups = list(2) + /singleton/submap_archetype/ranger_corvette map = "Ranger Gunboat" descriptor = "The Xansan-class is not, in fact, a distinct design in of itself. It is instead Xanu Prime’s variant of the Lagos-class gunboat, a Solarian light attack ship design. While the Lagos-class has been out of service with the Alliance’s navy for centuries, the blueprints were captured during the Interstellar war by Xanu Prime militiamen from a regional naval shipyard during the opening stages of the conflict, and were immediately used to construct ships of the class for use by Xanu Prime’s burgeoning military. While the Xansan-class has been retired from Xanu service, the leftover ships were donated en masse to the Frontier Marshal Bureau, and the Rangers make use of the craft to this day, in spite of their advanced age." diff --git a/maps/away/ships/coc/coc_surveyor/coc_surveyor.dm b/maps/away/ships/coc/coc_surveyor/coc_surveyor.dm index 0905db025be..31f1f9eaa12 100644 --- a/maps/away/ships/coc/coc_surveyor/coc_surveyor.dm +++ b/maps/away/ships/coc/coc_surveyor/coc_surveyor.dm @@ -8,6 +8,8 @@ id = "coc_surveyor" shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/coc_survey_shuttle) + unit_test_groups = list(1) + /singleton/submap_archetype/coc_surveyor map = "COC Survey Ship" descriptor = "Coalition science ship." diff --git a/maps/away/ships/dionae/diona_rokz_ship/diona_rokz_ship.dm b/maps/away/ships/dionae/diona_rokz_ship/diona_rokz_ship.dm index 3ac869b29d1..46d2649dd5b 100644 --- a/maps/away/ships/dionae/diona_rokz_ship/diona_rokz_ship.dm +++ b/maps/away/ships/dionae/diona_rokz_ship/diona_rokz_ship.dm @@ -8,6 +8,8 @@ id = "diona_rokz" shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/diona_rokz_ship_shuttle) + unit_test_groups = list(1) + /singleton/submap_archetype/diona_rokz_ship map = "Rokz Clan Ship" descriptor = "A ship belonging to the Rokz voidtamer clan, a group of dionae who specialize in selling space fauna." diff --git a/maps/away/ships/dionae/diona_serz_ship/diona_serz_ship.dm b/maps/away/ships/dionae/diona_serz_ship/diona_serz_ship.dm index 9e5e545338b..567557f3af9 100644 --- a/maps/away/ships/dionae/diona_serz_ship/diona_serz_ship.dm +++ b/maps/away/ships/dionae/diona_serz_ship/diona_serz_ship.dm @@ -8,6 +8,8 @@ id = "diona_serz" shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/diona_serz_ship_shuttle) + unit_test_groups = list(2) + /singleton/submap_archetype/diona_serz_ship map = "Serz Clan Ship" descriptor = "A ship belonging to the Serz voidtamer clan, a group of dionae who specialize in selling space fauna." diff --git a/maps/away/ships/dominia/dominian_corvette.dm b/maps/away/ships/dominia/dominian_corvette.dm index 1939be1f133..f6ff09c5f59 100644 --- a/maps/away/ships/dominia/dominian_corvette.dm +++ b/maps/away/ships/dominia/dominian_corvette.dm @@ -8,6 +8,8 @@ id = "dominian_corvette" shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/dominian_shuttle) + unit_test_groups = list(2) + /singleton/submap_archetype/dominian_corvette map = "Dominian Corvette" descriptor = "One of the most common ships in the Imperial Fleet, Lammergeier-class corvettes are often used as the vanguard of battlefleets entering a system marked for annexation into the glorious Empire as it is tasked to find and scout routes for the larger fleet. Though intended for scouting and screening work the Lammergeier is, like its larger counterparts, quite heavily armed and armored for a typical corvette. Any frontier savages who attempt to meet one with force of arms will soon find themselves staring down the barrels of Zhurong’s finest weaponry, and the Fleet-trained Ma’zals entrusted to operate it. The heavy armament and sensors of the Lammergeier-class come at a cost: it lacks a shield generator and is much larger than a typical Solarian corvette, thus requiring a larger crew. Lammergeier-class captains are generally loyal Ma’zals, such as the citizens of Novi Jadran, and are authorized to take whatever measures are necessary to ensure their crew remains loyal to both Empire and Goddess. This one’s transponder marks it as belonging to the Empire’s First Battlefleet – a battle-hardened formation responsible for patrolling the region of the northern Sparring Sea between the Empire, Hegemony, and Republic of dominia." diff --git a/maps/away/ships/dpra/hailstorm/hailstorm_ship.dm b/maps/away/ships/dpra/hailstorm/hailstorm_ship.dm index 40715fe6db0..f0934d86e48 100644 --- a/maps/away/ships/dpra/hailstorm/hailstorm_ship.dm +++ b/maps/away/ships/dpra/hailstorm/hailstorm_ship.dm @@ -8,6 +8,8 @@ shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/hailstorm_shuttle) sectors = list(SECTOR_BADLANDS, SECTOR_SRANDMARR, SECTOR_GAKAL) + unit_test_groups = list(1) + /singleton/submap_archetype/hailstorm_ship map = "Hailstorm Ship" descriptor = "A skipjack armed with multiple mass-driver weapons designed for patrolling and brief engagements. When used for patrols, the Hailstorm is loaded with supplies to last weeks on its own; its crew is specifically trained to be as frugal as possible while aboard." diff --git a/maps/away/ships/einstein/ee_spy_ship.dm b/maps/away/ships/einstein/ee_spy_ship.dm index 74739080489..45c67932539 100644 --- a/maps/away/ships/einstein/ee_spy_ship.dm +++ b/maps/away/ships/einstein/ee_spy_ship.dm @@ -8,6 +8,8 @@ id = "ee_spy_ship" shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/ee_shuttle) + unit_test_groups = list(2) + /singleton/submap_archetype/ee_spy_ship map = "Einstein Engines Research Ship" descriptor = "A research ship belonging to Einstein Engines, the Stellar Corporate Conglomerate's main competitor." diff --git a/maps/away/ships/elyra/elyra_strike_craft.dm b/maps/away/ships/elyra/elyra_strike_craft.dm index 0c3e1a79719..89b2caef593 100644 --- a/maps/away/ships/elyra/elyra_strike_craft.dm +++ b/maps/away/ships/elyra/elyra_strike_craft.dm @@ -8,6 +8,8 @@ id = "elyran_strike_craft" shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/elyran_shuttle) + unit_test_groups = list(1) + /singleton/submap_archetype/elyran_strike_craft map = "Elyran Naval Strike Craft" descriptor = "The Aslan-class Strike Craft is among the oldest designs in the Elyran naval arsenal, and is one of the ship classes slated to be retired in the ongoing Elyran military modernization plan. Not an independent vessel in of itself, it is instead an oversized attack craft designed to be launched from the General Abd Al-Hamid-class Carrier, a type of Elyran capital ship, named after the Republic's foremost national hero. As such, it has limited crew facilities and life support capabilities, and is instead reliant on its mothership for long-term operation. This ship is an interdiction variant, with its torpedo bay and railgun hardpoint replaced by a hangar and a boarding pod launch room, respectively." diff --git a/maps/away/ships/freebooter/freebooter_ship.dm b/maps/away/ships/freebooter/freebooter_ship.dm index 86ab88c3a00..72f6706991f 100644 --- a/maps/away/ships/freebooter/freebooter_ship.dm +++ b/maps/away/ships/freebooter/freebooter_ship.dm @@ -8,6 +8,8 @@ id = "freebooter_ship" shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/freebooter_shuttle) + unit_test_groups = list(2) + /singleton/submap_archetype/freebooter_ship map = "Freebooter Ship" descriptor = "One of the most common sights in the Orion Spur, even outside of human space, is the Hephaestus-produced Ox-class freighter. Designed to haul significant amounts of cargo on well-charted routes between civilized systems, the Ox-class is the backbone of many interstellar markets outside of the United Syndicates of Himeo. Repurposed Ox-class freighters are often used by pirates throughout the Spur thanks to their large size and ease of maintenance – and modification." diff --git a/maps/away/ships/golden_deep/golden_deep.dm b/maps/away/ships/golden_deep/golden_deep.dm index 04039b97189..e26cdfe2037 100644 --- a/maps/away/ships/golden_deep/golden_deep.dm +++ b/maps/away/ships/golden_deep/golden_deep.dm @@ -9,6 +9,8 @@ shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/golden_deep) sectors = list(SECTOR_HANEUNIM, ALL_TAU_CETI_SECTORS, ALL_COALITION_SECTORS) + unit_test_groups = list(1) + /singleton/submap_archetype/golden_deep map = "Golden Deep Merchant Vessel" descriptor = "A mercantile transport vessel, registered to the Golden Deep." diff --git a/maps/away/ships/hegemony/hegemony_corvette/hegemony_corvette.dm b/maps/away/ships/hegemony/hegemony_corvette/hegemony_corvette.dm index 1b7f546f97c..5939189a812 100644 --- a/maps/away/ships/hegemony/hegemony_corvette/hegemony_corvette.dm +++ b/maps/away/ships/hegemony/hegemony_corvette/hegemony_corvette.dm @@ -8,6 +8,8 @@ id = "hegemony_corvette" shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/hegemony_shuttle) + unit_test_groups = list(2) + /singleton/submap_archetype/hegemony_corvette map = "Hegemony Corvette" descriptor = "Ship with lizards." diff --git a/maps/away/ships/hegemony/merchants_guild/merchant_freighter.dm b/maps/away/ships/hegemony/merchants_guild/merchant_freighter.dm index 47232d30bf2..a43614910af 100644 --- a/maps/away/ships/hegemony/merchants_guild/merchant_freighter.dm +++ b/maps/away/ships/hegemony/merchants_guild/merchant_freighter.dm @@ -9,6 +9,8 @@ shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/merchants_guild) sectors = list(SECTOR_BADLANDS, SECTOR_UUEOAESA, SECTOR_VALLEY_HALE, SECTOR_CORP_ZONE, SECTOR_TAU_CETI) + unit_test_groups = list(2) + /singleton/submap_archetype/merchants_guild map = "Merchants' Guild Freighter" descriptor = "A freighter flying under the banner of the Izweski Hegemony Merchants' Guild." diff --git a/maps/away/ships/hegemony/miners_guild/miners_guild_station.dm b/maps/away/ships/hegemony/miners_guild/miners_guild_station.dm index 6b8656f6ef8..6c54bcea0bf 100644 --- a/maps/away/ships/hegemony/miners_guild/miners_guild_station.dm +++ b/maps/away/ships/hegemony/miners_guild/miners_guild_station.dm @@ -8,6 +8,8 @@ id = "miners_guild_station" shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/miners_guild) + unit_test_groups = list(1) + /singleton/submap_archetype/miners_guild_station map = "Miners' Guild Outpost" descriptor = "A station constructed by the Unathi Miners' Guild" diff --git a/maps/away/ships/heph/cyclops/cyclops_mining_ship.dm b/maps/away/ships/heph/cyclops/cyclops_mining_ship.dm index 7088aadbe56..5a23f18ca6a 100644 --- a/maps/away/ships/heph/cyclops/cyclops_mining_ship.dm +++ b/maps/away/ships/heph/cyclops/cyclops_mining_ship.dm @@ -8,6 +8,8 @@ id = "Cyclops Mining Vessel" shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/cyclops_shuttle) + unit_test_groups = list(2) + /singleton/submap_archetype/cyclops_mining map = "Cyclops Mining Vessel" descriptor = "This bulky vessel is designed and operated by Hephaestus Industries. From asteroid cracking to planetary operations, this ship can do it all. " diff --git a/maps/away/ships/iac/iac_rescue_ship.dm b/maps/away/ships/iac/iac_rescue_ship.dm index a1bcfcc38b4..2a6a8519a20 100644 --- a/maps/away/ships/iac/iac_rescue_ship.dm +++ b/maps/away/ships/iac/iac_rescue_ship.dm @@ -8,6 +8,8 @@ id = "iac_rescue_ship" shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/iac_shuttle) + unit_test_groups = list(3) + /singleton/submap_archetype/iac_rescue_ship map = "IAC Rescue Ship" diff --git a/maps/away/ships/kataphracts/kataphract_ship.dm b/maps/away/ships/kataphracts/kataphract_ship.dm index 697ae20722a..39db044fc71 100644 --- a/maps/away/ships/kataphracts/kataphract_ship.dm +++ b/maps/away/ships/kataphracts/kataphract_ship.dm @@ -8,6 +8,8 @@ shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/kataphract_transport) sectors = list(SECTOR_ROMANOVICH, SECTOR_TAU_CETI, SECTOR_CORP_ZONE, SECTOR_VALLEY_HALE, SECTOR_BADLANDS, SECTOR_UUEOAESA, SECTOR_WEEPING_STARS) + unit_test_groups = list(3) + /obj/effect/overmap/visitable/ship/kataphract_ship name = "kataphract chapter ship" desc = "A large corvette manufactured by a Hephaestus sponsored Hegemonic Guild. This is a heavily armoured Kataphract Chapter ship of the venerable 'Voidbreaker' class, a relative of the more common 'Foundation' \ diff --git a/maps/away/ships/konyang/einstein_shuttle/einstein_shuttle.dm b/maps/away/ships/konyang/einstein_shuttle/einstein_shuttle.dm index 8369f78f5d0..8459969b900 100644 --- a/maps/away/ships/konyang/einstein_shuttle/einstein_shuttle.dm +++ b/maps/away/ships/konyang/einstein_shuttle/einstein_shuttle.dm @@ -8,6 +8,8 @@ shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/einstein_shuttle) sectors = list(SECTOR_HANEUNIM) + unit_test_groups = list(3) + /singleton/submap_archetype/einstein_shuttle map = "clear sector" descriptor = "An empty sector." diff --git a/maps/away/ships/konyang/water_barge/water_barge.dm b/maps/away/ships/konyang/water_barge/water_barge.dm index 98edcbc1b65..bdd1d707d7f 100644 --- a/maps/away/ships/konyang/water_barge/water_barge.dm +++ b/maps/away/ships/konyang/water_barge/water_barge.dm @@ -8,6 +8,8 @@ id = "water_barge" shuttles_to_initialise = list() + unit_test_groups = list(3) + /singleton/submap_archetype/water_barge map = "Water Barge" descriptor = "A PACHROM transport barge, exporting water." diff --git a/maps/away/ships/nka/nka_merchant/nka_merchant.dm b/maps/away/ships/nka/nka_merchant/nka_merchant.dm index 0d9545db27a..67b159e5f58 100644 --- a/maps/away/ships/nka/nka_merchant/nka_merchant.dm +++ b/maps/away/ships/nka/nka_merchant/nka_merchant.dm @@ -8,6 +8,8 @@ shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/nka_merchant_shuttle) sectors = list(SECTOR_BADLANDS, SECTOR_SRANDMARR, SECTOR_VALLEY_HALE, SECTOR_CORP_ZONE, SECTOR_TAU_CETI) + unit_test_groups = list(3) + /singleton/submap_archetype/nka_merchant map = "Her Majesty's Mercantile Flotilla Ship" descriptor = "The Hma'trra class is a modified version of the corporate freighter sold by the SCC to the New Kingdom. It is simple model adapted to the long journey between Adhomai and Tau Ceti." diff --git a/maps/away/ships/orion/orion_express_ship.dm b/maps/away/ships/orion/orion_express_ship.dm index a1ef99a13e9..3d9ba057dc5 100644 --- a/maps/away/ships/orion/orion_express_ship.dm +++ b/maps/away/ships/orion/orion_express_ship.dm @@ -8,6 +8,8 @@ id = "orion_express_ship" shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/orion_express_shuttle) + unit_test_groups = list(3) + /singleton/submap_archetype/orion_express_ship map = "Orion Express Mobile Station" descriptor = "The Traveler-class mobile station is a relatively old design, but nonetheless venerable and one of the building blocks of interstellar commerce. While relatively small, is a treasured asset in the Orion Express corporation's fleet, and has been referred to as “the gas station of the stars”, offering food, supplies, and fuel to anyone who may need it." diff --git a/maps/away/ships/pra/database_freighter/database_freighter.dm b/maps/away/ships/pra/database_freighter/database_freighter.dm index acdc4b292dc..58960308263 100644 --- a/maps/away/ships/pra/database_freighter/database_freighter.dm +++ b/maps/away/ships/pra/database_freighter/database_freighter.dm @@ -8,6 +8,8 @@ shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/database_freighter_shuttle) sectors = list(SECTOR_BADLANDS, SECTOR_SRANDMARR, SECTOR_NRRAHRAHUL) + unit_test_groups = list(3) + /singleton/submap_archetype/database_freighter map = "Database Freighter" descriptor = "Made from adapted designs of the first freighter Tajara ever worked upon, Database freighters are PRA vessels made specially for gathering information on star systems and what passes through them." diff --git a/maps/away/ships/pra/headmaster/headmaster_ship.dm b/maps/away/ships/pra/headmaster/headmaster_ship.dm index 27243d3f522..44abeea4e09 100644 --- a/maps/away/ships/pra/headmaster/headmaster_ship.dm +++ b/maps/away/ships/pra/headmaster/headmaster_ship.dm @@ -8,6 +8,8 @@ shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/headmaster_shuttle) sectors = list(SECTOR_BADLANDS, SECTOR_SRANDMARR, SECTOR_NRRAHRAHUL) + unit_test_groups = list(3) + /singleton/submap_archetype/headmaster_ship map = "Headmaster Ship" descriptor = "The second heaviest ship created by the People's Republic of Adhomai. As of now, it's the lightest heavy ship ever designed, barely staying above the classification of a cruiser." diff --git a/maps/away/ships/skrell_smuggler/tirakqi_freighter.dm b/maps/away/ships/skrell_smuggler/tirakqi_freighter.dm index 853568bc309..94a627f0bb8 100644 --- a/maps/away/ships/skrell_smuggler/tirakqi_freighter.dm +++ b/maps/away/ships/skrell_smuggler/tirakqi_freighter.dm @@ -8,6 +8,8 @@ id = "tirakqi_freighter" shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/tirakqi_shuttle) + unit_test_groups = list(3) + /singleton/submap_archetype/tirakqi_freighter map = "Ti'Rakqi Freighter" descriptor = "A large skrellian freighter often seen skulking around space near the borders of the Traverse. This model has a large cargo hold, swift engines, and a deceptively large fuel reserve. Perfect for any smuggler on the go. This one's transponder identifies it as belonging to an independent freighter." diff --git a/maps/away/ships/sol_merc/fsf_patrol_ship.dm b/maps/away/ships/sol_merc/fsf_patrol_ship.dm index 11300ca1c25..90dff9392c3 100644 --- a/maps/away/ships/sol_merc/fsf_patrol_ship.dm +++ b/maps/away/ships/sol_merc/fsf_patrol_ship.dm @@ -8,6 +8,8 @@ id = "fsf_patrol_ship" shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/fsf_shuttle) + unit_test_groups = list(3) + /singleton/submap_archetype/fsf_patrol_ship map = "FSF Corvette" descriptor = "A small corvette manufactured for the Solarian Navy by Hephaestus, the Montevideo-class is an anti-piracy vessel through and through - with a shuttle bay that takes up a third of the ship and only a single weapon hardpoint located in one arm of the ship, the Montevideo is designed for long-term, self-sufficient operations in inhabited space against small-time pirate vessels that would be unable to overcome the ship's lackluster armaments. Generous automation and streamlined equipment allows it to function with a very small crew." diff --git a/maps/away/ships/sol_pirate/sfa_patrol_ship.dm b/maps/away/ships/sol_pirate/sfa_patrol_ship.dm index ca218df068d..fddb0cce7a7 100644 --- a/maps/away/ships/sol_pirate/sfa_patrol_ship.dm +++ b/maps/away/ships/sol_pirate/sfa_patrol_ship.dm @@ -8,6 +8,8 @@ id = "sfa_patrol_ship" shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/sfa_shuttle) + unit_test_groups = list(3) + /singleton/submap_archetype/sfa_patrol_ship map = "SFA Corvette" descriptor = "A small ship that appears to be, at its core, a Montevideo-class corvette, a Solarian anti-piracy and patrol corvette designed with ample automation and streamlined equipment which allows for it to be manned by a small crew. This one, however, seems to have been host to a myriad of haphazard and radical modifications, and is scarcely identifiable as the original craft. Beyond the changes made to the ship itself, it also appears to have suffered extensive damage and wear, and seems to be near-derelict" diff --git a/maps/away/ships/sol_ssmd/ssmd_ship.dm b/maps/away/ships/sol_ssmd/ssmd_ship.dm index 4a63e36a5f2..871bae89a9e 100644 --- a/maps/away/ships/sol_ssmd/ssmd_ship.dm +++ b/maps/away/ships/sol_ssmd/ssmd_ship.dm @@ -9,6 +9,8 @@ id = "ssmd_corvette" shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/ssmd_shuttle) + unit_test_groups = list(3) + /singleton/submap_archetype/ssmd_corvette map = "SSMD Corvette" descriptor = "A long-range reconnaissance corvette design in use by the Solarian Navy, the Uhlan-class is a relatively costly and somewhat uncommon ship to be seen in the Alliance's fleets, and is typically reserved for more elite (or at least better equipped and trained) units. Designed to operate alone or as part of a small task force with minimal support in unfriendly space, it is most commonly seen assigned to probing, surveillance, harassment, and strike operations. \ diff --git a/maps/away/ships/tajara/circus/adhomian_circus.dm b/maps/away/ships/tajara/circus/adhomian_circus.dm index 36fbd38c156..c1b49c81877 100644 --- a/maps/away/ships/tajara/circus/adhomian_circus.dm +++ b/maps/away/ships/tajara/circus/adhomian_circus.dm @@ -8,6 +8,8 @@ id = "adhomian_circus_ship" shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/adhomian_circus_shuttle) + unit_test_groups = list(3) + /singleton/submap_archetype/adhomian_circus map = "Adhomian Traveling Circus" descriptor = "The N'hanzafu class is a bulky Adhomian freighter designed with a large crew and cargo in mind. This one is painted in bright colors." @@ -115,4 +117,4 @@ /obj/effect/shuttle_landmark/adhomian_circus_shuttle/transit name = "In transit" landmark_tag = "nav_transit_adhomian_circus_shuttle" - base_turf = /turf/space/transit/north \ No newline at end of file + base_turf = /turf/space/transit/north diff --git a/maps/away/ships/tajara/taj_smuggler/tajaran_smuggler.dm b/maps/away/ships/tajara/taj_smuggler/tajaran_smuggler.dm index e35210c8aa9..2fb47fc0fb7 100644 --- a/maps/away/ships/tajara/taj_smuggler/tajaran_smuggler.dm +++ b/maps/away/ships/tajara/taj_smuggler/tajaran_smuggler.dm @@ -8,6 +8,8 @@ id = "tajaran_smuggler" shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/tajaran_smuggler_shuttle, /datum/shuttle/autodock/overmap/tajaran_smuggler_cargo) + unit_test_groups = list(3) + /singleton/submap_archetype/tajaran_smuggler map = "Adhomian Freighter" descriptor = "Built with reliability in mind, the Zhsram Freighter is one of the most common Adhomian designs. This vessel is cheap and has a sizeable cargo hold. It is commonly used by Tajaran traders and smugglers." diff --git a/maps/away/ships/tcfl_patrol/tcfl_peacekeeper_ship.dm b/maps/away/ships/tcfl_patrol/tcfl_peacekeeper_ship.dm index 3efe81a6781..5844a287939 100644 --- a/maps/away/ships/tcfl_patrol/tcfl_peacekeeper_ship.dm +++ b/maps/away/ships/tcfl_patrol/tcfl_peacekeeper_ship.dm @@ -8,6 +8,8 @@ id = "tcfl_peacekeeper_ship" shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/tcfl_shuttle) + unit_test_groups = list(3) + /singleton/submap_archetype/tcfl_peacekeeper_ship map = "TCFL Corvette" descriptor = "Serving as the very foundation of the SCC's (And more specifically, NanoTrasen's) fleet of asset protection vessels, the Cetus-class is versatile and durable, but also clumsy and somewhat underpowered in regards to its engine and propulsion. It features small weapon hardpoints in its thruster arms, and a massive hangar host to the design's interdiction counterpart - the Hydrus-class shuttle. This one appears to be a Decanus-class, the Tau Ceti Foreign Legion variation of the design." diff --git a/maps/away/ships/tramp_freighter/tramp_freighter.dm b/maps/away/ships/tramp_freighter/tramp_freighter.dm index 23a4b172ca9..acacf1bccd1 100644 --- a/maps/away/ships/tramp_freighter/tramp_freighter.dm +++ b/maps/away/ships/tramp_freighter/tramp_freighter.dm @@ -8,6 +8,8 @@ id = "tramp_freighter" shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/freighter_shuttle) + unit_test_groups = list(3) + /singleton/submap_archetype/tramp_freighter map = "Tramp Freighter" descriptor = "A freighter of mixed repute, the Catspaw-class is a rare independent design, and a favorite of small-scale freight businesses. It has a shielded cargo bay and an internal hangar, capable of accommodating a small shuttle. Its other features, however, are lacking - with cramped crew amenities and no defenses to speak of, the Catspaw is risky to operate in unpoliced space." diff --git a/maps/away/ships/wildlands_militia/militia_ship.dm b/maps/away/ships/wildlands_militia/militia_ship.dm index 94899932332..9aad0b2ac9b 100644 --- a/maps/away/ships/wildlands_militia/militia_ship.dm +++ b/maps/away/ships/wildlands_militia/militia_ship.dm @@ -8,6 +8,8 @@ id = "militia_ship" shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/militia_shuttle) + unit_test_groups = list(3) + /singleton/submap_archetype/militia_ship map = "Militia Ship" descriptor = "An unarmed and extremely prolific design of large, self-sufficient shuttle, prized for its modularity. Found all throughout the spur, the Yak-class shuttle can be configured to conceivably serve in any role, though it is only rarely armed with ship-to-ship weapons. Manufactured by Hephaestus." diff --git a/maps/away/ships/yacht/yacht.dm b/maps/away/ships/yacht/yacht.dm index 74f312a8f4e..bdf13bb6cb3 100644 --- a/maps/away/ships/yacht/yacht.dm +++ b/maps/away/ships/yacht/yacht.dm @@ -7,6 +7,8 @@ spawn_weight = 0.5 sectors = list(SECTOR_ROMANOVICH, SECTOR_TAU_CETI, SECTOR_CORP_ZONE, SECTOR_VALLEY_HALE, SECTOR_BADLANDS, ALL_COALITION_SECTORS, SECTOR_NEW_ANKARA, SECTOR_AEMAQ, SECTOR_SRANDMARR, SECTOR_NRRAHRAHUL, SECTOR_GAKAL, SECTOR_UUEOAESA) + unit_test_groups = list(3) + /obj/effect/overmap/visitable/ship/yacht name = "private yacht" desc = "Sensor array is detecting a private pleasure yacht with unknown lifeforms dectected within. The design appears to be from the Idris Incorporated 'Starfarer' line." diff --git a/maps/away_sites_testing/away_sites_testing.dm b/maps/away_sites_testing/away_sites_testing.dm index a0dceb4c48c..9085d817d53 100644 --- a/maps/away_sites_testing/away_sites_testing.dm +++ b/maps/away_sites_testing/away_sites_testing.dm @@ -27,7 +27,31 @@ base = TRUE /datum/map/away_sites_testing/build_away_sites() +#ifdef UNIT_TEST + //Build a list of away sites to spawn, based on the group + var/list/away_sites_to_spawn = list() + + for (var/map in SSmapping.away_sites_templates) + var/datum/map_template/ruin/away_site/A = SSmapping.away_sites_templates[map] + + if(!length(A.unit_test_groups)) + SSunit_tests_config.UT.fail("**** The away site --> [A.name] - [A.type] <-- does not have any unit test group set! ****", __FILE__, __LINE__) + + //Check if the group is in the configuration of this pod, if so, add it to the list of away sites to spawn + for(var/unit_test_group in A.unit_test_groups) + if((unit_test_group in SSunit_tests_config.config["map_template_unit_test_groups"]) || (SSunit_tests_config.config["map_template_unit_test_groups"][1] == "*")) + away_sites_to_spawn += A + break + + //Spawn the away sites selected in the previous step + for(var/datum/map_template/ruin/away_site/away_site in away_sites_to_spawn) + away_site.load_new_z() + testing("[ascii_green]LOADING AWAY SITE:[ascii_reset] Spawning [away_site] on Z [english_list(GetConnectedZlevels(world.maxz))]") + +#else + for (var/map in SSmapping.away_sites_templates) var/datum/map_template/ruin/away_site/A = SSmapping.away_sites_templates[map] A.load_new_z() testing("[ascii_green]LOADING AWAY SITE:[ascii_reset] Spawning [A] on Z [english_list(GetConnectedZlevels(world.maxz))]") +#endif