diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 919f0c7..3813336 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,7 +25,7 @@ jobs: run: dotnet build -c Release - name: Test - run: dotnet test -p:ParallelizeTestCollections=false + run: dotnet test --no-build - name: Pack run: dotnet pack CocoCrawler/CocoCrawler.csproj -o nuget-release -c Release --no-build diff --git a/CocoCrawler/Builders/PageCrawlJobBuilder.cs b/CocoCrawler/Builders/PageCrawlJobBuilder.cs index 23f8d28..5a00b82 100644 --- a/CocoCrawler/Builders/PageCrawlJobBuilder.cs +++ b/CocoCrawler/Builders/PageCrawlJobBuilder.cs @@ -1,6 +1,4 @@ -using AngleSharp.Css; -using AngleSharp.Css.Parser; -using CocoCrawler.CrawlOutputs; +using CocoCrawler.CrawlOutputs; using CocoCrawler.Exceptions; using CocoCrawler.Job; using CocoCrawler.Job.PageBrowserActions; diff --git a/Tests/CocoCrawler.IntegrationTests/BrowserCollection.cs b/Tests/CocoCrawler.IntegrationTests/BrowserCollection.cs new file mode 100644 index 0000000..0bdc70b --- /dev/null +++ b/Tests/CocoCrawler.IntegrationTests/BrowserCollection.cs @@ -0,0 +1,6 @@ +namespace CocoCrawler.IntegrationTests; + +[CollectionDefinition(nameof(BrowserCollection))] +public class BrowserCollection +{ +} diff --git a/Tests/CocoCrawler.IntegrationTests/ConfigureEngine/CookiesTest.cs b/Tests/CocoCrawler.IntegrationTests/ConfigureEngine/CookiesTest.cs index 034bb08..5242a4b 100644 --- a/Tests/CocoCrawler.IntegrationTests/ConfigureEngine/CookiesTest.cs +++ b/Tests/CocoCrawler.IntegrationTests/ConfigureEngine/CookiesTest.cs @@ -7,6 +7,7 @@ namespace CocoCrawler.IntegrationTests.Engine; +[Collection(nameof(BrowserCollection))] public class CookiesTest { private readonly WireMockServer _wireMockServer = WireMockServer.Start(); diff --git a/Tests/CocoCrawler.IntegrationTests/ConfigureEngine/ThrowOnBuilderExceptions.cs b/Tests/CocoCrawler.IntegrationTests/ConfigureEngine/ThrowOnBuilderExceptions.cs index 6410647..b0dfd95 100644 --- a/Tests/CocoCrawler.IntegrationTests/ConfigureEngine/ThrowOnBuilderExceptions.cs +++ b/Tests/CocoCrawler.IntegrationTests/ConfigureEngine/ThrowOnBuilderExceptions.cs @@ -1,11 +1,11 @@ using CocoCrawler.Builders; using CocoCrawler.Exceptions; -using CocoCrawler.Scheduler; using FluentAssertions; using WireMock.Server; namespace CocoCrawler.IntegrationTests.Engine; +[Collection(nameof(BrowserCollection))] public class ThrowOnBuilderExceptions { private readonly WireMockServer _wireMockServer = WireMockServer.Start(); diff --git a/Tests/CocoCrawler.IntegrationTests/ConfigureEngine/UserAgentTests.cs b/Tests/CocoCrawler.IntegrationTests/ConfigureEngine/UserAgentTests.cs index 2d46b22..70686df 100644 --- a/Tests/CocoCrawler.IntegrationTests/ConfigureEngine/UserAgentTests.cs +++ b/Tests/CocoCrawler.IntegrationTests/ConfigureEngine/UserAgentTests.cs @@ -7,6 +7,7 @@ namespace CocoCrawler.IntegrationTests.Engine; +[Collection(nameof(BrowserCollection))] public class UserAgentTests { private readonly WireMockServer _wireMockServer = WireMockServer.Start(); diff --git a/Tests/CocoCrawler.IntegrationTests/ExtractListAndPaginate/ExtractListAndPaginateTests.cs b/Tests/CocoCrawler.IntegrationTests/ExtractListAndPaginate/ExtractListAndPaginateTests.cs index e10717c..ca823a2 100644 --- a/Tests/CocoCrawler.IntegrationTests/ExtractListAndPaginate/ExtractListAndPaginateTests.cs +++ b/Tests/CocoCrawler.IntegrationTests/ExtractListAndPaginate/ExtractListAndPaginateTests.cs @@ -6,6 +6,7 @@ namespace CocoCrawler.IntegrationTests.ExtractListAndPaginate; +[Collection(nameof(BrowserCollection))] public class ExtractObjectAndPaginateTests { private readonly WireMockServer _wireMockServer = WireMockServer.Start(port: 9090); diff --git a/Tests/CocoCrawler.IntegrationTests/OpenLinksExtractObjectAndPaginate/OpenLinksExtractObjectAndPaginate.cs b/Tests/CocoCrawler.IntegrationTests/OpenLinksExtractObjectAndPaginate/OpenLinksExtractObjectAndPaginate.cs index bc75b5a..ac346ce 100644 --- a/Tests/CocoCrawler.IntegrationTests/OpenLinksExtractObjectAndPaginate/OpenLinksExtractObjectAndPaginate.cs +++ b/Tests/CocoCrawler.IntegrationTests/OpenLinksExtractObjectAndPaginate/OpenLinksExtractObjectAndPaginate.cs @@ -7,6 +7,7 @@ namespace CocoCrawler.IntegrationTests.ExtractListAndPaginate; +[Collection(nameof(BrowserCollection))] public class OpenLinksExtractObjectAndPaginate { private readonly WireMockServer _wireMockServer = WireMockServer.Start(port: 9010);