From 039e161c70c9c830209539c68415ddf3dee1d77e Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Tue, 25 Aug 2020 11:22:11 -0400 Subject: [PATCH] Don't use a Linux action on a Windows runner --- .github/workflows/ci-suite.yml | 6 ------ tests/Tgstation.Server.Tests/Instance/RepositoryTest.cs | 6 +++++- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci-suite.yml b/.github/workflows/ci-suite.yml index 0d0fab1432..a29e637995 100644 --- a/.github/workflows/ci-suite.yml +++ b/.github/workflows/ci-suite.yml @@ -191,9 +191,6 @@ jobs: - name: Set TGS4_TEST_CONNECTION_STRING run: echo "::set-env name=TGS4_TEST_CONNECTION_STRING::Server=(localdb)\MSSQLLocalDB;Integrated Security=true;Initial Catalog=TGS_${{ matrix.watchdog-type }}_${{ matrix.configuration }};Application Name=tgstation-server" - - name: Inject slug/short variables - uses: rlespinasse/github-slug-action@v2.x - - name: Checkout uses: actions/checkout@v1 @@ -328,9 +325,6 @@ jobs: if: ${{ matrix.watchdog-type == 'Basic' }} run: echo "::set-env name=General__UseBasicWatchdog::true" - - name: Inject slug/short variables - uses: rlespinasse/github-slug-action@v2.x - - name: Checkout uses: actions/checkout@v1 diff --git a/tests/Tgstation.Server.Tests/Instance/RepositoryTest.cs b/tests/Tgstation.Server.Tests/Instance/RepositoryTest.cs index bdf9ea172e..3dc54f5217 100644 --- a/tests/Tgstation.Server.Tests/Instance/RepositoryTest.cs +++ b/tests/Tgstation.Server.Tests/Instance/RepositoryTest.cs @@ -22,12 +22,13 @@ namespace Tgstation.Server.Tests.Instance public async Task RunPreWatchdog(CancellationToken cancellationToken) { + const string GitHubRef = "GITHUB_REF"; var branchSourceEnvVars = new List { "TGS4_TEST_BRANCH", "APPVEYOR_REPO_BRANCH", "TRAVIS_BRANCH", - "GITHUB_BASE_REF_SLUG" + GitHubRef }; string workingBranch = null; @@ -36,6 +37,9 @@ namespace Tgstation.Server.Tests.Instance var envVar = Environment.GetEnvironmentVariable(envVarName); if (!String.IsNullOrWhiteSpace(envVar)) { + if(envVarName == GitHubRef) + envVar = envVar.Substring("refs/heads/".Length); + workingBranch = envVar; Console.WriteLine($"TEST: Set working branch to '{workingBranch}' from env var '{envVarName}'"); break;