forked from OpenDreamProject/OpenDream
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup tgstation-server CI (OpenDreamProject#1536)
Run a test in TGS tailored to test exclusively OpenDream functionality against the trigger commit
- Loading branch information
Showing
1 changed file
with
77 additions
and
0 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
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: 7 | ||
TGS_DOTNET_VERSION: 8 | ||
TGS_REFERENCE: OpenDreamTesting # This may break as branches get deleted during the TGS6 release cycle. Move it forward with the merge order: OpenDreamTesting -> V6 -> 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="../../../../../../OpenDream" | ||
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 |