Skip to content

Commit

Permalink
Setup tgstation-server CI (OpenDreamProject#1536)
Browse files Browse the repository at this point in the history
Run a test in TGS tailored to test exclusively OpenDream functionality against the trigger commit
  • Loading branch information
Cyberboss authored Nov 20, 2023
1 parent 0d00d8b commit 50807ad
Showing 1 changed file with 77 additions and 0 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/test-tgs.yml
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

0 comments on commit 50807ad

Please sign in to comment.