Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add GithubActionsTestLogger and use it in CI builds #1449

Merged
merged 1 commit into from
Jun 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ let license = "Apache-2.0"
// Read release notes & version info from RELEASE_NOTES.md
let release = ReleaseNotes.load "RELEASE_NOTES.md"

let isCI = Environment.GetEnvironmentVariable("CI") <> null

// --------------------------------------------------------------------------------------
// Generate assembly info files with the right version & up-to-date information

Expand Down Expand Up @@ -106,8 +108,16 @@ Target.create "Build" (fun _ ->
|> DotNet.build (fun o -> { o with Configuration = DotNet.BuildConfiguration.Release }))

Target.create "RunTests" (fun _ ->
"FSharp.Data.sln"
|> DotNet.test (fun o -> { o with Configuration = DotNet.BuildConfiguration.Release }))
let setParams (o: DotNet.TestOptions) =
{ o with
Configuration = DotNet.BuildConfiguration.Release
Logger =
if isCI then
Some "GitHubActions"
else
None }

"FSharp.Data.sln" |> DotNet.test setParams)

// --------------------------------------------------------------------------------------
// Build a NuGet package
Expand Down
1 change: 1 addition & 0 deletions paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,4 @@ group Test
nuget NUnit3TestAdapter
nuget FsUnit 4.0.4
nuget FsCheck 2.15.1
nuget GitHubActionsTestLogger
2 changes: 2 additions & 0 deletions paket.lock
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,8 @@ NUGET
FSharp.Core (>= 4.3.4)
NETStandard.Library (>= 2.0.3)
NUnit (>= 3.13 < 4.0)
GitHubActionsTestLogger (2.0)
Microsoft.TestPlatform.ObjectModel (>= 17.2)
Microsoft.CodeCoverage (17.2)
Microsoft.NET.Test.Sdk (17.2)
Microsoft.CodeCoverage (>= 17.2)
Expand Down
2 changes: 1 addition & 1 deletion tests/FSharp.Data.DesignTime.Tests/paket.references
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ group Test
NUnit
NUnit3TestAdapter
FsUnit

GitHubActionsTestLogger
3 changes: 2 additions & 1 deletion tests/FSharp.Data.Reference.Tests/paket.references
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ group Test
NUnit
NUnit3TestAdapter
FsUnit
FsCheck
FsCheck
GitHubActionsTestLogger
3 changes: 2 additions & 1 deletion tests/FSharp.Data.Tests.CSharp/paket.references
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ group Test

Microsoft.NET.Test.Sdk
NUnit
NUnit3TestAdapter
NUnit3TestAdapter
GitHubActionsTestLogger
3 changes: 2 additions & 1 deletion tests/FSharp.Data.Tests/paket.references
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ group Test
NUnit
NUnit3TestAdapter
FsUnit
FsCheck
FsCheck
GitHubActionsTestLogger