-
-
Notifications
You must be signed in to change notification settings - Fork 681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The Testening: Ports improved unit tests from TG, New mapping tests, Refactors of existing tests to improve code quality #11364
Merged
Crossedfall
merged 268 commits into
BeeStation:master
from
PowerfulBacon:ports-improved-testing
Sep 8, 2024
Merged
Changes from all commits
Commits
Show all changes
268 commits
Select commit
Hold shift + click to select a range
afa2435
Fixes redefined defines
PowerfulBacon a13d834
Adds trait validity
PowerfulBacon 7a6776f
Adds ticked file enforcement
PowerfulBacon 765b1a5
Fixes references to TGstation isntead of Beestation
PowerfulBacon 85e3e15
Create max_required_byond_client.txt
PowerfulBacon 7bdf368
Fixes qdel in optimisation
PowerfulBacon 5552886
I don't think we need mariaDB anymore
PowerfulBacon df66c35
Update run_server.sh
PowerfulBacon 151aa08
Updates check_grep to include the new
PowerfulBacon 1652a80
Adds mapping tests
PowerfulBacon f6e2d39
Adds some mapping testers
PowerfulBacon b29c69c
Disables create and destroy
PowerfulBacon a1b8724
Update run_server.sh
PowerfulBacon b7b3f4a
Fixes compilation
PowerfulBacon 4e0fab2
Fixes compilation issues
PowerfulBacon 1de3831
Corrects the DME target
PowerfulBacon 23ec4ba
Removes auxmos temporarilly
PowerfulBacon 8987cf9
Revert "Removes auxmos temporarilly"
PowerfulBacon 7d86f96
Disables restore_atmos
PowerfulBacon b8279f9
Re-enables atmos reset
PowerfulBacon cbe64d0
Fixes crashing issues
PowerfulBacon ceaa78c
Fixes issue with disposal unit test check
PowerfulBacon 22bd55c
Another correction in disposal tests
PowerfulBacon 39687c3
Fixes infinite loop check
PowerfulBacon 0baba21
Correctly return when we encounter an error
PowerfulBacon dcd74c1
Fixes failures not being properly
PowerfulBacon 38f6160
Fixes disposal loop bug
PowerfulBacon 2b8ead5
Account for the complete shitcode of disposals
PowerfulBacon e6cbe8c
Update check_disposals.dm
PowerfulBacon 5e2d5ea
Fixes
PowerfulBacon 0232dba
Debug info
PowerfulBacon 9c2a1b1
Update check_disposals.dm
PowerfulBacon 14cfe23
Fixes the stupidity of sort codes
PowerfulBacon c03ddca
Corrects a mistake
PowerfulBacon 6d8380f
Makes run ID properly unique
PowerfulBacon 54658e6
Update check_disposals.dm
PowerfulBacon 16e0645
Update check_disposals.dm
PowerfulBacon 1e0855a
Fixes some areas interacting wtih APC checks
PowerfulBacon 6dda8f9
Random rooms will delete any directional things not placed on walls, …
PowerfulBacon d0bb4f3
Adds a somewhat hacky check to fix random maint room spawning
PowerfulBacon 8d70cf0
Update check_disposals.dm
PowerfulBacon 24ef5df
Fixes ending in a null location
PowerfulBacon 956745f
Fixes disposals detecting loops when there are none
PowerfulBacon ec7b9fb
Adds more information to the failure
PowerfulBacon 4166df2
Fixes an issue with the disposals check
PowerfulBacon cb57999
Update check_disposals.dm
PowerfulBacon 097647b
Update check_disposals.dm
PowerfulBacon a2ee0a2
/area/medical/apothecary is valid for the output of chemistry
PowerfulBacon a388120
Fixes the issue with virology and finally resolves issues with the di…
PowerfulBacon c22944f
Adds a check for multiple objects on the same turf
PowerfulBacon 652ea9c
Fixes the multiple object check
PowerfulBacon 96f15c5
Update check_multiple_objects.dm
PowerfulBacon 47691d1
Update check_multiple_objects.dm
PowerfulBacon fb63293
Update check_multiple_objects.dm
PowerfulBacon fac3b2d
Fixes list messages
PowerfulBacon 7247a5c
Assume that things with different pixel offsets are intended to be di…
PowerfulBacon 361d5c3
Corrects some issues with the map tests
PowerfulBacon 6a29a5a
How about we just disable random maints on unit testing
PowerfulBacon afba4a8
Update check_wallthing_attachment.dm
PowerfulBacon da34bc1
warnings fix
PowerfulBacon 781afc1
Allows disposals to end in delivery office
PowerfulBacon f70e74c
Squashed commit of the following:
PowerfulBacon 950f3ea
Properly disables random maint rooms if unit tests are not defined
PowerfulBacon 0d50662
Removes wallthing attachment, we will tackle this in the future
PowerfulBacon 2c1b9db
Update beestation.dme
PowerfulBacon c5b595a
Update _unit_tests.dm
PowerfulBacon 4dbd94d
Update check_grep.sh
PowerfulBacon 88d6946
Ports define sanity
PowerfulBacon 609b710
[TEST]: Fixes room spawner clearing outside of its bounds
PowerfulBacon e525e85
Fixes APC checks
PowerfulBacon ed03659
Allow CI building to have 515 for OD compilation
PowerfulBacon 3f4ca83
Removes some unused files
PowerfulBacon 850af2b
Fixes metastation's invalid bag
PowerfulBacon 784f3c3
Fixes Nanotrasen misspellings
PowerfulBacon 591851e
Pipes are now hashed by their pipe layer
PowerfulBacon a898d2d
Compilation fix
PowerfulBacon 9753538
Not all areas require power
PowerfulBacon 6d75cb8
Resets changelog
PowerfulBacon cb25a65
Screenshot tests only if they actually exist
PowerfulBacon 361dcfd
Update run_server.sh
PowerfulBacon ab88a36
Attempt to fix OD lints
PowerfulBacon f49ae0a
Fixes some space indentation issues
PowerfulBacon 0e0742d
Creation test ignore turf_decal
PowerfulBacon b1da5ae
Test including create and destroy tests
PowerfulBacon 4e1448e
This will be far too much work to fix right now
PowerfulBacon 20d2ce0
Fixes beestation.dme file ordering
PowerfulBacon ff144e6
Fixes some missing undefs
PowerfulBacon 5d76140
Allow _DEFINES to be declared anywhere, allow components to declare t…
PowerfulBacon c608ba8
Fixes define sanity linter
PowerfulBacon 3a8496b
Fixes 03- src as trait source
PowerfulBacon 31237e6
Adds in the LOWER_TEXT define
PowerfulBacon 37b0d29
Fixes the remaining tab/space indentation issues, and allows 2 spaces…
PowerfulBacon d4e86c3
Fixes the comment things
PowerfulBacon 9f8e925
Ports maplint
PowerfulBacon fa606a1
Removes this test as we currently do docking ports manually
PowerfulBacon ed1d465
Updates the defines for the component module
PowerfulBacon d5cb14c
we need to scan subdirectories of unit tests now
PowerfulBacon c92eb32
Merge remote-tracking branch 'upstream/master' into ports-improved-te…
PowerfulBacon 6b4f9ab
Fixes mixed indentation issues
PowerfulBacon f0773ea
Fixes inconsistent human
PowerfulBacon 9fd9632
Ensures proper lowertext usage
PowerfulBacon ae9bef1
Corrects NanoTrasen to Nanotrasen
PowerfulBacon 52ca49c
Fixes recieved spelling mistakes
PowerfulBacon 732056f
Fixes update path files, allows tg_ before the name
PowerfulBacon 70616a4
Fixes to_chat issues
PowerfulBacon 94839f5
Corrects IMER_OVERRIDE used without TIMER_UNIQUE
PowerfulBacon 9d40b11
Fixes trailing newlines
PowerfulBacon a28ae45
Fixes improper Initialize() arguments
PowerfulBacon b066279
Allow for recursive directory travel
PowerfulBacon 04e3b2e
Fixes some common spelling mistakes
PowerfulBacon 8e3848e
Fixes shuttles with objects outside of their shuttle boundaries
PowerfulBacon 135fef0
Fixes ticked file enforcement
PowerfulBacon cdc0d35
Corrects a ticked file that shouldn't have been
PowerfulBacon b057f5c
Organises the trait defines
PowerfulBacon 03bc3bf
Fixes consistent human compilation and test compilation
PowerfulBacon ac7aeae
Fixes 2 final grep issues
PowerfulBacon a462ef7
Update unit_tests.json
PowerfulBacon b7e9c5a
Update declarations.dm
PowerfulBacon 9aa9ef2
Adds the traits file to global vars
PowerfulBacon 0749689
Update armour_checks.dm
PowerfulBacon aa2f233
Fordbid the inclusion of anything in the unit tests subdirectories
PowerfulBacon e20fcec
Should fix OD's unhapiness
PowerfulBacon 678a762
I guess that didn't allow the base directory...
PowerfulBacon efeea66
Corrects OD lint issues
PowerfulBacon 461ed6e
Corrects ticked_file_enforcement to always work no matter the circums…
PowerfulBacon 7471fa4
Adds the ability to disable certain maplints
PowerfulBacon 93484ab
Replace / with \\ inside dme files
PowerfulBacon b9f1114
Very confusied right now
PowerfulBacon e276d61
Skip the warning when we are building CI
PowerfulBacon d5f2fb9
Removes the layer var from being used in maps
PowerfulBacon d7d24ff
Adds begin and end include to _unit_tests.dm
PowerfulBacon f0882bc
Fixes a few mapping lint issues
PowerfulBacon 869dc17
Fixes missing unit tests
PowerfulBacon 0b98987
Update _component.dm
PowerfulBacon 2796aa5
Compilation fix
PowerfulBacon 8aa1ec4
Fixes ticked file enforcement
PowerfulBacon 84f7a1a
Update ticked_file_enforcement.py
PowerfulBacon bbfeb7e
Update _unit_tests.dm
PowerfulBacon 4c10190
Fixes the ordering
PowerfulBacon ddbfd6e
Update _unit_tests.dm
PowerfulBacon fa51c7a
Update _unit_tests.dm
PowerfulBacon 357ec18
We don't have nearly as many traits as TG does
PowerfulBacon 5c91803
We don't need check changelogs
PowerfulBacon 01ed11f
Updates the build script and adds icon generation tools
PowerfulBacon 32f29ed
Supports 514-515 dual compilation with JukeBuild
PowerfulBacon 90b5c2c
Update _unit_tests.dm
PowerfulBacon 965a14b
Fixes the missing trait declarations
PowerfulBacon 4725825
Update _traits.dm
PowerfulBacon 68699ba
Update _traits.dm
PowerfulBacon 2321875
Update _traits.dm
PowerfulBacon c067932
Update _traits.dm
PowerfulBacon 052aa5b
Switches back to using the spacestation13 repo
PowerfulBacon 651cf9e
Merge remote-tracking branch 'upstream/master' into ports-improved-te…
PowerfulBacon e479c1a
Door Names
PowerfulBacon 95e2388
mapping changes
BriggsIDP ce568cf
We don't use smart cables
PowerfulBacon 9400c3b
Update undergroundoutpost45.dmm
PowerfulBacon aa7a646
Changes the formatting of the error to make it easier to search over
PowerfulBacon d57eb64
Echostation merge conflict markers
PowerfulBacon 2b7a820
Obsolete var removal
PowerfulBacon 175ff1d
Update undergroundoutpost45.dmm
PowerfulBacon cc9a626
Departments.dmm issues
PowerfulBacon 0f48417
Update CentCom.dmm
PowerfulBacon 36b2b74
Do not edit areas
PowerfulBacon dd9ad24
Box, Fland, Meta
PowerfulBacon 783d862
Makes fridges opaque
PowerfulBacon 21a7d1f
DeltaStation
PowerfulBacon 0f34a22
CorgStation
PowerfulBacon 96b23b4
RadStation, KiloStation
PowerfulBacon 907a7de
Various maps
PowerfulBacon dbd7b9b
Removes banned /area var-edits from Echo, Kilo and Rad
PowerfulBacon 23fc890
Fixes fridges inside walls on EchoStation
PowerfulBacon 329251b
Adds a mapping helper for the air mix
PowerfulBacon 1abb7f6
Fixes update paths
PowerfulBacon b3d52d3
Uncorrupts map files
PowerfulBacon 20483ba
UpdatePaths
PowerfulBacon 0bba30a
Banned Var Edits
PowerfulBacon d4f60be
EchoStation banned var-edits
PowerfulBacon 7ae34ca
Echostation piping layer
PowerfulBacon 3842632
Echostation piping disaster fixes
PowerfulBacon 898c4ef
KiloStation Lints
PowerfulBacon d59bc78
End of the nightmare lints
PowerfulBacon f291ec5
Lints 2
PowerfulBacon c64ef33
Adds the missing type
PowerfulBacon 30ff531
Kilo, Meta, Rad, Fixes Pipe Check
PowerfulBacon 941f9ed
Update check_multiple_objects.dm
PowerfulBacon 703bd10
Radstation
PowerfulBacon 580a2f4
Metastation lighting issues
PowerfulBacon c18811b
RadStation disposals
PowerfulBacon f481db6
KiloStation
PowerfulBacon b7febcc
Route all disposals through security on RadStation
PowerfulBacon 2caec26
Radstation mapfix v145
PowerfulBacon 1b0d5ba
Update RadStation.dmm
PowerfulBacon 2b470e5
Yea, we're a sorting network
PowerfulBacon 424ac7f
Always allow leading to an input node, because it just makes everyone…
PowerfulBacon b56aec9
BoxStation fuck ups
PowerfulBacon b5a9a1b
Fuck off
PowerfulBacon 84a8fbe
Update check_disposals.dm
PowerfulBacon f0c0e03
Echo mapping fixes -disposals
PowerfulBacon a810dd8
Update network.dm
PowerfulBacon 2e6a4f9
Update network.dm
PowerfulBacon d97e7ff
Update networks.dm
PowerfulBacon 0cae4ea
Fixes RadStation disposals
PowerfulBacon e523b37
Corgstation final fixes
PowerfulBacon 3b22dcf
CorgStation finishing touches
PowerfulBacon a3fbff2
Update KiloStation.dmm
PowerfulBacon ded57b2
For some reason it was reaching a node
PowerfulBacon 5dc3113
Accept disposals going to janitor closet for kilo
PowerfulBacon ad23cad
Flaky test shit
PowerfulBacon d21f2d2
Adds the show screenshot test results file
PowerfulBacon eddb29d
FlandStation Part 1
PowerfulBacon d9e9ee0
Fland disposal fixes
PowerfulBacon f9dd0ca
Update FlandStation.dmm
PowerfulBacon afee1d1
Fixes
PowerfulBacon f28d879
Update MetaStation.dmm
PowerfulBacon 0300c26
MetaStation disposals
PowerfulBacon 4252090
Fixes metastation area mapping
PowerfulBacon 05fae5b
Update MetaStation.dmm
PowerfulBacon 82d33bf
Fixes incomplete disposal track on MetaStation
PowerfulBacon 7255afb
Cleans up some disposals shitcode that mixed movement with direction …
PowerfulBacon 2c850d3
Fixes multiz debug APCs
PowerfulBacon f739b4d
Fixes an issue area on echo where it had no area
PowerfulBacon 7255142
Echostation disposals fixes
PowerfulBacon 0d567fc
Fixes dorms bypassing disposals filtering
PowerfulBacon f59398e
Echo disposals final touches
PowerfulBacon 4074b74
Update EchoStation.dmm
PowerfulBacon 513200b
Allow this
PowerfulBacon ebd1cab
Update EchoStation.dmm
PowerfulBacon bb16f60
Update EchoStation.dmm
PowerfulBacon e953b41
Update EchoStation.dmm
PowerfulBacon ebc9204
Send a message when you start a unit test run
PowerfulBacon f495a1e
Log it to world actually
PowerfulBacon 228c439
Update unit_test.dm
PowerfulBacon ec488d8
Should fix an issue with unit tests never running
PowerfulBacon 110cd1e
Adds screenshot tests
PowerfulBacon cfdd586
Fixes a few issues
PowerfulBacon 8ee3da8
Ports #86500
PowerfulBacon a8c8fdb
Fixes mapping helpers not being deleted
PowerfulBacon ced51f7
Removes the random boxstation door
PowerfulBacon 245b2ca
Apply suggestions from code review
PowerfulBacon 23eb298
Fixes a tab indentation, fixes a file with the wrong indentation
PowerfulBacon 7306a06
Bee: Disables the autowiki target
PowerfulBacon 1e5e6fb
Blanket removes heat capacity from usage in all maps
PowerfulBacon 0a69b6b
Removes from random z levels
PowerfulBacon e2ccbb7
Make sure we have parents too
PowerfulBacon aaf08bb
Fixes a race condition in shuttle loading
PowerfulBacon 97b54dd
Update shuttle.dm
PowerfulBacon 5804e35
Removes some unnecessary greps
PowerfulBacon 6c7ca75
Update pixel_varedits.yml
PowerfulBacon f1adb30
I guess this works
PowerfulBacon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# This file contains extra tests to run for specific BYOND versions. | ||
# This is useful for making sure we maintain compatibility with both older and newer versions, | ||
# while still having our main tests run on a guaranteed pinned version. | ||
|
||
# Format is version: map | ||
# Example: | ||
# 500.1337: runtimestation | ||
# 515.1627: runtimestation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Highest byond client version allowed to be required by the byond world. Set to 9999 to disable the check flat out. | ||
# If the compiled world requires clients use a version higher than this, ci will fail. | ||
# for instance: if this is set to 514, and a pr uses a 515 client feature, an alert will trigger | ||
# If you have to update this number for your pr, you should make it VERY CLEAR in the pr body that you did so. | ||
# (Requiring clients update to connect to the game server is not something we like to spring on them with no notice, | ||
# especially for beta builds where the pager/updater won't let them update without additional configuration.) | ||
|
||
514 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,290 @@ | ||
name: CI Suite | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- 'project/**' | ||
- 'gh-readonly-queue/master/**' | ||
- 'gh-readonly-queue/project/**' | ||
pull_request: | ||
branches: | ||
- master | ||
- 'project/**' | ||
merge_group: | ||
branches: | ||
- master | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
run_linters: | ||
if: ( !contains(github.event.head_commit.message, '[ci skip]') ) | ||
name: Run Linters | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 5 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Restore SpacemanDMM cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/SpacemanDMM | ||
key: ${{ runner.os }}-spacemandmm-${{ hashFiles('dependencies.sh') }} | ||
restore-keys: | | ||
${{ runner.os }}-spacemandmm- | ||
- name: Restore Yarn cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: tgui/.yarn/cache | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('tgui/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Restore Node cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.nvm | ||
key: ${{ runner.os }}-node-${{ hashFiles('dependencies.sh') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Restore Bootstrap cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: tools/bootstrap/.cache | ||
key: ${{ runner.os }}-bootstrap-${{ hashFiles('tools/requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-bootstrap- | ||
- name: Restore Rust cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.cargo | ||
key: ${{ runner.os }}-rust-${{ hashFiles('tools/ci/ci_dependencies.sh')}} | ||
restore-keys: | | ||
${{ runner.os }}-rust- | ||
- name: Restore Cutter cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: tools/icon_cutter/cache | ||
key: ${{ runner.os }}-cutter-${{ hashFiles('dependencies.sh') }} | ||
- name: Python setup | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
- name: Install OpenDream | ||
uses: robinraju/[email protected] | ||
with: | ||
repository: "OpenDreamProject/OpenDream" | ||
tag: "latest" | ||
fileName: "DMCompiler_linux-x64.tar.gz" | ||
extract: true | ||
- name: Install Tools | ||
run: | | ||
pip3 install setuptools | ||
bash tools/ci/install_node.sh | ||
bash tools/ci/install_spaceman_dmm.sh dreamchecker | ||
bash tools/ci/install_ripgrep.sh | ||
tools/bootstrap/python -c '' | ||
- name: Setup linters | ||
id: linter-setup | ||
run: ':' | ||
- name: Run Grep Checks | ||
if: steps.linter-setup.conclusion == 'success' && !cancelled() | ||
run: bash tools/ci/check_grep.sh | ||
- name: Ticked File Enforcement | ||
if: steps.linter-setup.conclusion == 'success' && !cancelled() | ||
run: | | ||
tools/bootstrap/python tools/ticked_file_enforcement/ticked_file_enforcement.py < tools/ticked_file_enforcement/schemas/beestation_dme.json | ||
tools/bootstrap/python tools/ticked_file_enforcement/ticked_file_enforcement.py < tools/ticked_file_enforcement/schemas/unit_tests.json | ||
- name: Check Define Sanity | ||
if: steps.linter-setup.conclusion == 'success' && !cancelled() | ||
run: tools/bootstrap/python -m define_sanity.check | ||
- name: Check Trait Validity | ||
if: steps.linter-setup.conclusion == 'success' && !cancelled() | ||
run: tools/bootstrap/python -m trait_validity.check | ||
- name: Run DreamChecker | ||
if: steps.linter-setup.conclusion == 'success' && !cancelled() | ||
shell: bash | ||
run: ~/dreamchecker 2>&1 | bash tools/ci/annotate_dm.sh | ||
- name: Run OpenDream | ||
if: steps.linter-setup.conclusion == 'success' && !cancelled() | ||
run: ./DMCompiler_linux-x64/DMCompiler beestation.dme --suppress-unimplemented --define=CIBUILDING | bash tools/ci/annotate_od.sh | ||
- name: Run Map Checks | ||
if: steps.linter-setup.conclusion == 'success' && !cancelled() | ||
run: | | ||
tools/bootstrap/python -m mapmerge2.dmm_test | ||
tools/bootstrap/python -m tools.maplint.source | ||
- name: Check Cutter | ||
if: steps.linter-setup.conclusion == 'success' && !cancelled() | ||
run: tools/bootstrap/python -m tools.icon_cutter.check | ||
- name: Run DMI Tests | ||
if: steps.linter-setup.conclusion == 'success' && !cancelled() | ||
run: tools/bootstrap/python -m dmi.test | ||
- name: Check File Directories | ||
if: steps.linter-setup.conclusion == 'success' && !cancelled() | ||
run: bash tools/ci/check_filedirs.sh beestation.dme | ||
- name: Check Miscellaneous Files | ||
if: steps.linter-setup.conclusion == 'success' && !cancelled() | ||
run: bash tools/ci/check_misc.sh | ||
- name: Run TGUI Checks | ||
if: steps.linter-setup.conclusion == 'success' && !cancelled() | ||
run: tools/build/build --ci lint tgui-test | ||
|
||
compile_all_maps: | ||
if: ( !contains(github.event.head_commit.message, '[ci skip]') ) | ||
name: Compile Maps | ||
needs: [collect_data] | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 5 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Restore BYOND cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/BYOND | ||
key: ${{ runner.os }}-byond-${{ hashFiles('dependencies.sh') }} | ||
- name: Compile All Maps | ||
run: | | ||
bash tools/ci/install_byond.sh | ||
source $HOME/BYOND/byond/bin/byondsetup | ||
tools/build/build --ci dm -DCIBUILDING -DCITESTING -DALL_MAPS | ||
- name: Check client Compatibility | ||
uses: tgstation/byond-client-compatibility-check@v3 | ||
with: | ||
dmb-location: beestation.dmb | ||
max-required-client-version: ${{needs.collect_data.outputs.max_required_byond_client}} | ||
|
||
collect_data: | ||
if: ( !contains(github.event.head_commit.message, '[ci skip]') ) | ||
name: Collect data for other tasks | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 5 | ||
outputs: | ||
maps: ${{ steps.map_finder.outputs.maps }} | ||
alternate_tests: ${{ steps.alternate_test_finder.outputs.alternate_tests }} | ||
max_required_byond_client: ${{ steps.max_required_byond_client.outputs.max_required_byond_client }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Find Maps | ||
id: map_finder | ||
run: | | ||
echo "$(ls -mw0 _maps/*.json)" > maps_output.txt | ||
sed -i -e s+_maps/+\"+g -e s+.json+\"+g maps_output.txt | ||
echo "Maps: $(cat maps_output.txt)" | ||
echo "maps={\"paths\":[$(cat maps_output.txt)]}" >> $GITHUB_OUTPUT | ||
- name: Find Alternate Tests | ||
id: alternate_test_finder | ||
run: | | ||
ALTERNATE_TESTS_JSON=$(jq -nRc '[inputs | capture("^(?<major>[0-9]+)\\.(?<minor>[0-9]+): (?<map>.+)$")]' .github/alternate_byond_versions.txt) | ||
echo "alternate_tests=$ALTERNATE_TESTS_JSON" >> $GITHUB_OUTPUT | ||
- name: Collect byond client version configuration | ||
id: max_required_byond_client | ||
#the regex here does not filter out non-numbers because error messages about no input are less helpful then error messages about bad input (which includes the bad input) | ||
run: | | ||
echo "max_required_byond_client=$(grep -Ev '^[[:blank:]]{0,}#{1,}|^[[:blank:]]{0,}$' .github/max_required_byond_client.txt | tail -n1)" >> $GITHUB_OUTPUT | ||
|
||
run_all_tests: | ||
if: ( !contains(github.event.head_commit.message, '[ci skip]') ) | ||
name: Integration Tests | ||
needs: [collect_data] | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
map: ${{ fromJSON(needs.collect_data.outputs.maps).paths }} | ||
|
||
uses: ./.github/workflows/run_integration_tests.yml | ||
with: | ||
map: ${{ matrix.map }} | ||
max_required_byond_client: ${{needs.collect_data.outputs.max_required_byond_client}} | ||
|
||
run_alternate_tests: | ||
if: ( !contains(github.event.head_commit.message, '[ci skip]') && needs.collect_data.outputs.alternate_tests != '[]' ) | ||
name: Alternate Tests | ||
needs: [collect_data] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
setup: ${{ fromJSON(needs.collect_data.outputs.alternate_tests) }} | ||
|
||
uses: ./.github/workflows/run_integration_tests.yml | ||
with: | ||
map: ${{ matrix.setup.map }} | ||
major: ${{ matrix.setup.major }} | ||
minor: ${{ matrix.setup.minor }} | ||
max_required_byond_client: ${{needs.collect_data.outputs.max_required_byond_client}} | ||
|
||
check_alternate_tests: | ||
if: ( !contains(github.event.head_commit.message, '[ci skip]') && needs.collect_data.outputs.alternate_tests != '[]' ) | ||
name: Check Alternate Tests | ||
needs: [run_alternate_tests, collect_data] | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 5 | ||
steps: | ||
- run: echo Alternate tests passed. | ||
|
||
compare_screenshots: | ||
if: ( !contains(github.event.head_commit.message, '[ci skip]') && (always() && (!failure() && !cancelled())) ) | ||
needs: [run_all_tests, run_alternate_tests] | ||
name: Compare Screenshot Tests | ||
timeout-minutes: 15 | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup directory | ||
run: mkdir -p artifacts | ||
# If we ever add more artifacts, this is going to break, but it'll be obvious. | ||
- name: Download screenshot tests | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: artifacts | ||
- name: ls -R | ||
run: ls -R artifacts | ||
- name: Setup screenshot comparison | ||
run: npm i | ||
working-directory: tools/screenshot-test-comparison | ||
- name: Run screenshot comparison | ||
run: node tools/screenshot-test-comparison/index.js artifacts code/modules/unit_tests/screenshots artifacts/screenshot_comparisons | ||
# workflow_run does not give you the PR it ran on, | ||
# even through the thing literally named "matching pull requests". | ||
# However, in GraphQL, you can check if the check suite was ran | ||
# by a specific PR, so trusting the (user controlled) action here is okay, | ||
# as long as we check it later in show_screenshot_test_results | ||
- name: Save PR ID | ||
if: failure() && github.event.pull_request | ||
run: | | ||
echo ${{ github.event.pull_request.number }} > artifacts/screenshot_comparisons/pull_request_number.txt | ||
- name: Upload bad screenshots | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: bad-screenshots | ||
path: artifacts/screenshot_comparisons | ||
|
||
test_windows: | ||
if: ( !contains(github.event.head_commit.message, '[ci skip]') ) | ||
name: Windows Build | ||
needs: [collect_data] | ||
runs-on: windows-latest | ||
timeout-minutes: 5 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Restore Yarn cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: tgui/.yarn/cache | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('tgui/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Compile | ||
run: pwsh tools/ci/build.ps1 | ||
env: | ||
DM_EXE: "C:\\byond\\bin\\dm.exe" | ||
- name: Check client Compatibility | ||
uses: tgstation/byond-client-compatibility-check@v3 | ||
with: | ||
dmb-location: beestation.dmb | ||
max-required-client-version: ${{needs.collect_data.outputs.max_required_byond_client}} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this may be a worse alternative to our current caching.. But it's a bit hard to tell without the checking being actively ran. This should be reviewed after this PR has been merged and checks have been running for a little while.