Skip to content

Commit cce0ea0

Browse files
committed
Update CI to run tests on Windows and add MAUI setup
Changed the test job to use windows-latest instead of ubuntu-latest, added JDK 11 setup, MSBuild path configuration, and MAUI workload installation to support .NET MAUI test execution.
1 parent fbf237c commit cce0ea0

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

.github/workflows/publish.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444
with:
4545
fetch-depth: 0
4646
show-progress: false
47+
4748
- name: Set up JDK 11
4849
uses: actions/setup-java@v2
4950
with:
@@ -95,7 +96,7 @@ jobs:
9596
${{ env.NuGetDirectory }}/artifacts/*.snupkg
9697
9798
run_tests:
98-
runs-on: ubuntu-latest
99+
runs-on: windows-latest
99100
permissions:
100101
attestations: write
101102
contents: read
@@ -105,10 +106,26 @@ jobs:
105106
with:
106107
fetch-depth: 0
107108
show-progress: false
109+
110+
- name: Set up JDK 11
111+
uses: actions/setup-java@v2
112+
with:
113+
java-version: '11'
114+
distribution: 'adopt'
115+
116+
- name: Setup MSBuild path
117+
uses: microsoft/setup-msbuild@v2
118+
with:
119+
vs-version: 'latest'
120+
108121
- name: Setup .NET
109122
uses: actions/setup-dotnet@v5
110123
with:
111124
global-json-file: 'global.json'
125+
126+
- name: Install MAUI workloads
127+
run: dotnet workload install maui-android maui-ios maui-maccatalyst
128+
112129
- name: Run tests
113130
run: dotnet test tests/Plugin.Maui.ML.Tests/Plugin.Maui.ML.Tests.csproj --configuration Release --filter 'FullyQualifiedName!~TestBase'
114131

0 commit comments

Comments
 (0)