Skip to content

Commit 667a9db

Browse files
committed
[CI] Combine platform tests into 1 task
1 parent 97c029b commit 667a9db

File tree

1 file changed

+10
-17
lines changed

1 file changed

+10
-17
lines changed

.github/workflows/main.yml

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -94,27 +94,20 @@ jobs:
9494
- name: Build
9595
run: dotnet run --project build/Build.csproj -- --target=Default
9696

97-
- name: Test
98-
run: dotnet test Tools/MonoGame.Tools.Tests/MonoGame.Tools.Tests.csproj --blame-hang-timeout 5m -c Release --filter="TestCategory!=Audio"
97+
- name: Run Tests
98+
run: |
99+
if [ "$RUNNER_OS" == "Linux" ]; then
100+
dotnet test Tools/MonoGame.Tools.Tests/MonoGame.Tools.Tests.csproj --blame-hang-timeout 5m -c Release --filter="TestCategory!=Audio"
101+
elif [ "$RUNNER_OS" == "Windows" ]; then
102+
dotnet test Tools/MonoGame.Tools.Tests/MonoGame.Tools.Tests.csproj --blame-hang-timeout 5m -c Release
103+
else
104+
dotnet test Tools/MonoGame.Tools.Tests/MonoGame.Tools.Tests.csproj --blame-hang-timeout 5m -c Release --filter="TestCategory!=Audio"
105+
fi
99106
env:
100107
DOTNET_ROOT: ${{github.workspace}}/dotnet64
101108
MGFXC_WINE_PATH: /home/runner/.winemonogame
102109
CI: true
103-
if: runner.os == 'Linux'
104-
105-
- name: Test
106-
run: dotnet test Tools/MonoGame.Tools.Tests/MonoGame.Tools.Tests.csproj --blame-hang-timeout 5m -c Release --filter="TestCategory!=Audio"
107-
env:
108-
DOTNET_ROOT: ${{github.workspace}}/dotnet64
109-
MGFXC_WINE_PATH: /Users/runner/.winemonogame
110-
CI: true
111-
if: runner.os == 'macOS'
112-
113-
- name: Test
114-
run: dotnet test Tools/MonoGame.Tools.Tests/MonoGame.Tools.Tests.csproj --blame-hang-timeout 5m -c Release
115-
env:
116-
CI: true
117-
if: runner.os == 'Windows'
110+
shell: bash
118111

119112
- name: Expose GitHub Runtime
120113
uses: crazy-max/ghaction-github-runtime@v3

0 commit comments

Comments
 (0)