diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 613ecfb..138b67d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,7 @@ jobs: test: runs-on: macos-13 env: - API_LEVEL: 23 + API_LEVEL: 15 NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages # NuGet CLI environment variables steps: diff --git a/src/MaaFramework.Binding.UnitTests/Test_GithubActions.cs b/src/MaaFramework.Binding.UnitTests/Test_GithubActions.cs new file mode 100644 index 0000000..4842879 --- /dev/null +++ b/src/MaaFramework.Binding.UnitTests/Test_GithubActions.cs @@ -0,0 +1,27 @@ +namespace MaaFramework.Binding.UnitTests; + +/// +/// +[TestClass] +public class Test_GithubActions +{ + [TestMethod] + [DataRow(AdbControllerTypes.ScreencapRawByNetcat)] + [DataRow(AdbControllerTypes.ScreencapRawWithGzip)] + [DataRow(AdbControllerTypes.ScreencapEncode)] + [DataRow(AdbControllerTypes.ScreencapEncodeToFile)] + [DataRow(AdbControllerTypes.ScreencapMinicapDirect)] + [DataRow(AdbControllerTypes.ScreencapMinicapStream)] + public void TestAction(AdbControllerTypes sc) + { + using var native = new MaaAdbController( + Common.AdbPath, + Common.Address, + AdbControllerTypes.InputPresetAdb | sc, + Common.AdbConfig, + Common.AgentPath); + + Assert.AreEqual( + MaaJobStatus.Failed, native.Screencap().Wait()); + } +}