Browse Source

Add macOS runner for PR checks (#1261)

Marko Lahma 2 years ago
parent
commit
8960e805be
2 changed files with 19 additions and 0 deletions
  1. 13 0
      .github/workflows/pr.yml
  2. 6 0
      Jint.Tests/Runtime/EngineLimitTests.cs

+ 13 - 0
.github/workflows/pr.yml

@@ -32,3 +32,16 @@ jobs:
 
 
     - name: Test
     - name: Test
       run: dotnet test --configuration Release --logger GitHubActions
       run: dotnet test --configuration Release --logger GitHubActions
+
+  macos:
+    runs-on: macos-latest
+    env:
+        DOTNET_NOLOGO: true
+        DOTNET_CLI_TELEMETRY_OPTOUT: 1
+
+    steps:
+    - name: Checkout source code
+      uses: actions/checkout@v3
+
+    - name: Test
+      run: dotnet test --configuration Release --logger GitHubActions

+ 6 - 0
Jint.Tests/Runtime/EngineLimitTests.cs

@@ -9,6 +9,12 @@ public class EngineLimitTests
     [Fact]
     [Fact]
     public void ShouldAllowReasonableCallStackDepth()
     public void ShouldAllowReasonableCallStackDepth()
     {
     {
+        if (OperatingSystem.IsMacOS())
+        {
+            // stack limit differ quite a lot
+            return;
+        }
+
 #if RELEASE
 #if RELEASE
         const int FunctionNestingCount = 960;
         const int FunctionNestingCount = 960;
 #else
 #else