Skip to content

Commit

Permalink
Add macos runner for GH Actions PR checks (#433)
Browse files Browse the repository at this point in the history
* Add macos runner for GH Actions PR checks
* remove ignore conditions to allow PRs against README.md
* account for macos in CanHandleDeepNestingWithoutStackOverflow
  • Loading branch information
lahma authored Jan 31, 2024
1 parent 144ed66 commit 7e9b19d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
21 changes: 18 additions & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:

pull_request:
branches: [ main, release/1.x, release/2.x ]
paths-ignore:
- 'doc/**'
- '*.md'

jobs:

Expand Down Expand Up @@ -43,3 +40,21 @@ jobs:

- name: Test
run: dotnet test --configuration Release --logger GitHubActions

macos:
runs-on: macos-14
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: 1

steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Generate test cases
working-directory: ./test/Esprima.Tests.Test262
run: dotnet tool restore && dotnet test262 generate && dotnet run -c Release -- --update-allow-list

- name: Test
run: dotnet test --configuration Release --logger GitHubActions

6 changes: 6 additions & 0 deletions test/Esprima.Tests/JavaScriptParserTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ public class JavaScriptParserTests
[Fact]
public void CanHandleDeepNestingWithoutStackOverflow()
{
if (OperatingSystem.IsMacOS())
{
// stack limit differ quite a lot
return;
}

var parser = new JavaScriptParser(new ParserOptions { MaxAssignmentDepth = 1000 });
#if DEBUG
const int Depth = 205;
Expand Down

0 comments on commit 7e9b19d

Please sign in to comment.