-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into CodeCoverage
- Loading branch information
Showing
125 changed files
with
3,029 additions
and
2,625 deletions.
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
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
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,77 @@ | ||
name: Test tgstation-server Integration | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
concurrency: | ||
group: "tgs-${{ github.head_ref || github.run_id }}-${{ github.event_name }}" | ||
cancel-in-progress: true | ||
|
||
env: | ||
OD_DOTNET_VERSION: 8 | ||
TGS_DOTNET_VERSION: 8 | ||
TGS_REFERENCE: dev | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ ubuntu-latest, windows-latest ] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Disable ptrace_scope | ||
if: matrix.os == 'ubuntu-latest' | ||
run: echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope | ||
|
||
- name: Install gdb | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y gdb | ||
- name: Setup dotnet | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: | | ||
${{ env.TGS_DOTNET_VERSION }}.0.x | ||
${{ env.OD_DOTNET_VERSION }}.0.x | ||
- name: Checkout OpenDream | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
fetch-tags: true | ||
submodules: true | ||
|
||
- name: Pull engine updates | ||
uses: space-wizards/[email protected] | ||
|
||
- name: Update Engine Submodules | ||
run: | | ||
cd RobustToolbox/ | ||
git submodule update --init --recursive | ||
- name: Checkout TGS | ||
run: | | ||
cd .. | ||
git clone https://github.com/tgstation/tgstation-server --depth 1 --branch ${{ env.TGS_REFERENCE }} | ||
- name: Build TGS Integration Tests | ||
run: | | ||
cd ../tgstation-server | ||
dotnet build -c ReleaseNoWindows -p:TGS_HOST_NO_WEBPANEL=true tests/Tgstation.Server.Tests/Tgstation.Server.Tests.csproj | ||
- name: Run TGS OpenDream Tests | ||
shell: bash | ||
run: | | ||
cd ../tgstation-server/tests/Tgstation.Server.Tests | ||
export TGS_TEST_OD_EXCLUSIVE=true | ||
export TGS_TEST_OD_ENGINE_VERSION=$GITHUB_SHA | ||
export TGS_TEST_OD_GIT_DIRECTORY="../../../../../../${{ github.event.repository.name }}" | ||
export TGS_TEST_DATABASE_TYPE=Sqlite | ||
export TGS_TEST_CONNECTION_STRING="Data Source=TGS.sqlite3;Mode=ReadWriteCreate" | ||
dotnet test -c ReleaseNoWindows --no-build --filter Name=TestOpenDreamExclusiveTgsOperation --logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true" --settings ../../build/ci.runsettings --results-directory ../../TestResults |
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
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
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
15 changes: 15 additions & 0 deletions
15
Content.Tests/DMProject/Tests/Statements/Switch/weird_when_clause.dm
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,15 @@ | ||
|
||
//Issue OD#996, kinda: https://github.com/OpenDreamProject/OpenDream/issues/996 | ||
|
||
/proc/RunTest() | ||
var/x = 5 | ||
switch(x) | ||
if(1) | ||
CRASH("Strange branch chosen in switch statement") | ||
if(4) | ||
CRASH("Strange branch chosen in switch statement") | ||
else if(x == 3) | ||
CRASH("Parser failed to understand 'else if' in switch block") | ||
else | ||
return | ||
CRASH("Parser failed to understand 'else if' in switch block") |
16 changes: 16 additions & 0 deletions
16
Content.Tests/DMProject/Tests/Statements/Switch/weird_when_clause_pragma.dm
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,16 @@ | ||
//COMPILE ERROR | ||
//test to make sure SuspiciousSwitchCase is working | ||
|
||
#pragma SuspiciousSwitchCase error | ||
|
||
/proc/RunTest() | ||
var/x = 5 | ||
switch(x) | ||
if(1) | ||
return | ||
if(4) | ||
return | ||
else if(x == 3) | ||
return | ||
else | ||
return |
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,6 @@ | ||
/proc/RunTest() | ||
ASSERT({"A | ||
B | ||
C"} == "A\nB\nC") | ||
|
||
ASSERT({" " "} == " \" ") |
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,4 @@ | ||
// Issue #700 | ||
|
||
/proc/RunTest() | ||
ASSERT("[ "\[" ]" == @"[") |
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,16 @@ | ||
using System; | ||
using DMCompiler.Bytecode; | ||
using NUnit.Framework; | ||
|
||
namespace Content.Tests; | ||
|
||
[TestFixture] | ||
public sealed class RuntimeTests { | ||
/// <summary> | ||
/// Validates that the opcodes in DreamProcOpcode are all unique, such that none resolve to the same byte. | ||
/// </summary> | ||
[Test] | ||
public void EnsureOpcodesUnique() { | ||
Assert.That(Enum.GetValues<DreamProcOpcode>(), Is.Unique); | ||
} | ||
} |
Oops, something went wrong.