Skip to content

Commit dcff179

Browse files
committed
feat(tests): run in parallel
1 parent 5b8ddba commit dcff179

File tree

9 files changed

+28
-1
lines changed

9 files changed

+28
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
- Migrate from `Paket` to `Directory.Packages.props` #722 [@xperiandri]
1010
- Migrate to .NET `9.0.201` and FCS `43.9.201` #722 [@xperiandri]
1111
- Write test logs to test context output #722 [@xperiandri]
12+
- Run tests in parallel #728 [@xperiandri]
1213

1314
## [0.24.2] - 2024-02-29
1415

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace FSharpLint.Console.Tests
2+
3+
open NUnit.Framework
4+
5+
[<assembly: Parallelizable(ParallelScope.Fixtures)>]
6+
7+
do ()

tests/FSharpLint.Console.Tests/FSharpLint.Console.Tests.fsproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
<ItemGroup>
99
<Compile Include="TestApp.fs" />
10+
<Compile Include="Attributes.fs" />
1011
</ItemGroup>
1112

1213
<ItemGroup>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace FSharpLint.Core.Tests
2+
3+
open NUnit.Framework
4+
5+
[<assembly: Parallelizable(ParallelScope.All)>]
6+
[<assembly: FixtureLifeCycle(LifeCycle.InstancePerTestCase)>]
7+
8+
do ()

tests/FSharpLint.Core.Tests/FSharpLint.Core.Tests.fsproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
<Compile Include="Framework\TestAbstractSyntaxArray.fs" />
9393
<Compile Include="Framework\TestExpressionUtilities.fs" />
9494
<Compile Include="Framework\TestSuppression.fs" />
95+
<Compile Include="Attributes.fs" />
9596
</ItemGroup>
9697

9798
<ItemGroup>

tests/FSharpLint.Core.Tests/Rules/Conventions/CyclomaticComplexity.fs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ let private matchBang len =
106106
|> makeProgram "a"
107107

108108
/// Tests for the cyclomatic complexity rule.
109+
[<SingleThreaded>]
109110
type TestConventionsCyclomaticComplexity() =
110111
inherit TestAstNodeRuleBase.TestAstNodeRuleBase(rule { Config.MaxComplexity = MaxComplexity; })
111112

tests/FSharpLint.Core.Tests/Rules/Hints/HintMatcher.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ type Assert with
1111
else
1212
raise (NUnit.Framework.AssertionException($"No errors were expected, but there were some errors. Errors were:\n{this.ErrorMsg}"))
1313

14-
[<TestFixture>]
14+
[<TestFixture; SingleThreaded>]
1515
type TestHintMatcher() =
1616
inherit TestHintMatcherBase.TestHintMatcherBase()
1717

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace FSharpLint.FunctionalTest
2+
3+
open NUnit.Framework
4+
5+
[<assembly: Parallelizable(ParallelScope.Fixtures)>]
6+
7+
do ()

tests/FSharpLint.FunctionalTest/FSharpLint.FunctionalTest.fsproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<ItemGroup>
99
<Compile Include="TestConsoleApplication.fs" />
1010
<Compile Include="TestApi.fs" />
11+
<Compile Include="Attributes.fs" />
1112
</ItemGroup>
1213

1314
<ItemGroup>

0 commit comments

Comments
 (0)