|
| 1 | +name: Test tgstation-server Integration |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ master ] |
| 6 | + pull_request: |
| 7 | + branches: [ master ] |
| 8 | + |
| 9 | +concurrency: |
| 10 | + group: "tgs-${{ github.head_ref || github.run_id }}-${{ github.event_name }}" |
| 11 | + cancel-in-progress: true |
| 12 | + |
| 13 | +env: |
| 14 | + OD_DOTNET_VERSION: 9 |
| 15 | + TGS_DOTNET_VERSION: 8 |
| 16 | + TGS_NODE_VERSION: 20.x |
| 17 | + TGS_REFERENCE: dev |
| 18 | + TGS_TEST_GITHUB_TOKEN: ${{ github.token }} |
| 19 | + |
| 20 | +jobs: |
| 21 | + build: |
| 22 | + strategy: |
| 23 | + fail-fast: false |
| 24 | + matrix: |
| 25 | + os: [ ubuntu-latest, windows-latest ] |
| 26 | + runs-on: ${{ matrix.os }} |
| 27 | + steps: |
| 28 | + - name: Disable ptrace_scope |
| 29 | + if: matrix.os == 'ubuntu-latest' |
| 30 | + run: echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope |
| 31 | + |
| 32 | + - name: Install gdb and libgdiplus |
| 33 | + if: matrix.os == 'ubuntu-latest' |
| 34 | + run: | |
| 35 | + sudo apt-get update |
| 36 | + sudo apt-get install -y gdb libgdiplus |
| 37 | +
|
| 38 | + - name: Setup dotnet |
| 39 | + uses: actions/setup-dotnet@v4 |
| 40 | + with: |
| 41 | + dotnet-version: | |
| 42 | + ${{ env.TGS_DOTNET_VERSION }}.0.x |
| 43 | + ${{ env.OD_DOTNET_VERSION }}.0.x |
| 44 | +
|
| 45 | + - name: Setup Node.JS |
| 46 | + uses: actions/setup-node@v4 |
| 47 | + with: |
| 48 | + node-version: ${{ env.TGS_NODE_VERSION }} |
| 49 | + |
| 50 | + - name: Enable Corepack |
| 51 | + run: corepack enable |
| 52 | + |
| 53 | + - name: Checkout OpenDream |
| 54 | + uses: actions/checkout@v4 |
| 55 | + with: |
| 56 | + fetch-depth: 0 |
| 57 | + fetch-tags: true |
| 58 | + submodules: true |
| 59 | + |
| 60 | + - name: Pull engine updates |
| 61 | + uses: space-wizards/submodule-dependency@v0.1.5 |
| 62 | + |
| 63 | + - name: Update Engine Submodules |
| 64 | + run: | |
| 65 | + cd RobustToolbox/ |
| 66 | + git submodule update --init --recursive |
| 67 | + |
| 68 | + - name: Checkout TGS |
| 69 | + run: | |
| 70 | + cd .. |
| 71 | + git clone https://github.com/tgstation/tgstation-server --depth 1 --branch ${{ env.TGS_REFERENCE }} |
| 72 | +
|
| 73 | + - name: Build TGS Integration Tests |
| 74 | + env: |
| 75 | + TGS_TELEMETRY_KEY_FILE: fake.txt |
| 76 | + shell: bash |
| 77 | + run: | |
| 78 | + cd ../tgstation-server |
| 79 | + echo "fake" > src/Tgstation.Server.Host/${{ env.TGS_TELEMETRY_KEY_FILE }} |
| 80 | + dotnet build -c ReleaseNoWindows -p:TGS_HOST_NO_WEBPANEL=true tests/Tgstation.Server.Tests/Tgstation.Server.Tests.csproj |
| 81 | +
|
| 82 | + - name: Run TGS OpenDream Tests |
| 83 | + shell: bash |
| 84 | + run: | |
| 85 | + cd ../tgstation-server/tests/Tgstation.Server.Tests |
| 86 | + export TGS_TEST_OD_EXCLUSIVE=true |
| 87 | + export TGS_TEST_OD_ENGINE_VERSION=$GITHUB_SHA |
| 88 | + export TGS_TEST_OD_GIT_DIRECTORY="../../../../../../${{ github.event.repository.name }}" |
| 89 | + export TGS_TEST_DATABASE_TYPE=Sqlite |
| 90 | + export TGS_TEST_CONNECTION_STRING="Data Source=TGS.sqlite3;Mode=ReadWriteCreate" |
| 91 | + 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 commit comments