From 512f8717ea3f844033f8e419a500dd147d0dcf7c Mon Sep 17 00:00:00 2001 From: Nomads_Reach <144523850+NomadsReach@users.noreply.github.com> Date: Sun, 16 Aug 2026 02:58:01 -0400 Subject: [PATCH] Run legacy runtime guard on every push and PR --- .github/workflows/csharp-server.yml | 41 ++++++++++------------------- 1 file changed, 14 insertions(+), 27 deletions(-) diff --git a/.github/workflows/csharp-server.yml b/.github/workflows/csharp-server.yml index 034d2da..4a9222d 100644 --- a/.github/workflows/csharp-server.yml +++ b/.github/workflows/csharp-server.yml @@ -2,39 +2,24 @@ name: CSharp Server Gate on: push: - branches: - - rewrite/csharp-server - paths: - - "server/**" - - "src/ServerProcess.*" - - "CMakeLists.txt" - - "cmake/stage_server.cmake" - - "build.bat" - - "deploy.bat" - - "check-setup.bat" - - ".github/workflows/csharp-server.yml" + pull_request: workflow_dispatch: jobs: + runtime-policy: + name: Repository runtime policy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Enforce runtime policy + run: bash server/scripts/verify-no-legacy-runtime.sh + build-and-test: + name: C# build and test runs-on: [self-hosted, Linux, X64] steps: - uses: actions/checkout@v4 - - name: Reject Python files - shell: bash - run: | - if find . -type f -name '*.py' -print -quit | grep -q .; then - echo "Python files are not allowed in CO-SERVER" - find . -type f -name '*.py' -print - exit 1 - fi - if find server -maxdepth 1 -type f -name 'requirements*.txt' -print -quit | grep -q .; then - echo "Python requirements files are not allowed in CO-SERVER" - find server -maxdepth 1 -type f -name 'requirements*.txt' -print - exit 1 - fi - - uses: actions/setup-dotnet@v4 with: dotnet-version: "8.0.x" @@ -47,13 +32,15 @@ jobs: working-directory: server run: dotnet run --project tests/CommonwealthOnline.Server.Tests.csproj -c Release - - name: Check Linux scripts + - name: Check Linux scripts and repository policy working-directory: server run: | - chmod +x start.sh fix-port.sh scripts/linux_compat_checks.sh + chmod +x start.sh fix-port.sh scripts/linux_compat_checks.sh scripts/verify-no-legacy-runtime.sh bash -n start.sh bash -n fix-port.sh bash -n scripts/linux_compat_checks.sh + bash -n scripts/verify-no-legacy-runtime.sh + bash scripts/verify-no-legacy-runtime.sh - name: Publish Linux server working-directory: server