Skip to content

Commit

Permalink
Fix Ubuntu build (#2797)
Browse files Browse the repository at this point in the history
* Fix Ubuntu build

* bump System.Text.Json

* Update Page.workers test
  • Loading branch information
kblok authored Oct 17, 2024
1 parent f5ef2b1 commit 1b2dcca
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ jobs:
- name: Build
working-directory: lib
run: dotnet build PuppeteerSharp.sln
- name: Disable AppArmor
if: matrix.os == 'ubuntu-latest'
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
- name: Test (Linux)
if: matrix.os == 'ubuntu-latest'
env:
Expand Down
2 changes: 1 addition & 1 deletion lib/PuppeteerSharp.Tests/WorkerTests/PageWorkerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ await Task.WhenAll(
Page.GoToAsync(TestConstants.ServerUrl + "/worker/worker.html"));
var worker = Page.Workers[0];
Assert.That(worker.Url, Does.Contain("worker.js"));
Assert.That(await worker.EvaluateExpressionAsync<string>("self.workerFunction()"), Is.EqualTo("worker function result"));
Assert.That(await worker.EvaluateExpressionAsync<string>("globalThis.workerFunction()"), Is.EqualTo("worker function result"));

await Page.GoToAsync(TestConstants.EmptyPage);
await workerDestroyedTcs.Task.WithTimeout();
Expand Down
2 changes: 1 addition & 1 deletion lib/PuppeteerSharp/PuppeteerSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
<PackageReference Include="System.Text.Json" Version="8.0.4" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>
<ItemGroup>
<AdditionalFiles Include="..\stylecop.json" Link="stylecop.json" />
Expand Down

0 comments on commit 1b2dcca

Please sign in to comment.