Skip to content

Commit

Permalink
Fix tests and remove expecto test sdk (#39)
Browse files Browse the repository at this point in the history
* Fix tests and remove expecto test sdk

* Run colima on macOS

* Separate macOS/Linux builds

* Renmove windows runner

* Install docker for macOS runner using brew

* Delete macOS runner
  • Loading branch information
sheridanchris committed Oct 24, 2022
1 parent 7a2db4b commit 7122ac3
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 43 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/dotnet-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}

steps:
Expand All @@ -24,15 +24,9 @@ jobs:
with:
global-json-file: global.json

- name: Build macOS/Linux
if: runner.os != 'Windows'
- name: Build
run: |
chmod +x ./build.sh
./build.sh
env:
CI: true
- name: Build Windows
if: runner.os == 'Windows'
run: ./build.cmd
env:
CI: true
20 changes: 5 additions & 15 deletions build/build.fs
Original file line number Diff line number Diff line change
Expand Up @@ -473,23 +473,13 @@ let fsharpAnalyzers _ =
dotnet.fsharpAnalyzer id args)

let dotnetTest ctx =
let excludeCoverage =
!!testsGlob |> Seq.map IO.Path.GetFileNameWithoutExtension |> String.concat "|"
let testDirectories = !!testsGlob |> Seq.map Path.getDirectory

let args =
[ "--no-build"
sprintf "/p:AltCover=%b" (not disableCodeCoverage)
sprintf "/p:AltCoverThreshold=%d" coverageThresholdPercent
sprintf "/p:AltCoverAssemblyExcludeFilter=%s" excludeCoverage
"/p:AltCoverLocalSource=true" ]

DotNet.test
(fun c ->
let args = [ "--no-build" ]

{ c with
Configuration = configuration (ctx.Context.AllExecutingTargets)
Common = c.Common |> DotNet.Options.withAdditionalArgs args })
sln
for testDir in testDirectories do
dotnet.run (fun options -> { options with WorkingDirectory = testDir }) (String.concat " " args)
|> failOnBadExitAndPrint

let generateCoverageReport _ =
let coverageReports = !! "tests/**/coverage*.xml" |> String.concat ";"
Expand Down
2 changes: 0 additions & 2 deletions paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ nuget Marten.PLv8
nuget Npgsql
nuget Expecto
nuget Testcontainers 2.2.0-beta.3290165812 beta
nuget YoloDev.Expecto.TestSdk 0.12.13
nuget Microsoft.NET.Test.Sdk 17.1.0
nuget altcover ~> 8.2.825

// [ FAKE GROUP ]
Expand Down
15 changes: 0 additions & 15 deletions paket.lock
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ NUGET
Microsoft.CodeAnalysis.Common (4.3.1)
System.Composition (>= 6.0)
System.IO.Pipelines (>= 6.0.3)
Microsoft.CodeCoverage (17.3.2)
Microsoft.CSharp (4.7)
Microsoft.Extensions.Configuration.Abstractions (6.0)
Microsoft.Extensions.Primitives (>= 6.0)
Expand All @@ -102,25 +101,15 @@ NUGET
Microsoft.Extensions.Logging.Abstractions (6.0.2)
Microsoft.Extensions.Primitives (6.0)
System.Runtime.CompilerServices.Unsafe (>= 6.0)
Microsoft.NET.Test.Sdk (17.1)
Microsoft.CodeCoverage (>= 17.1)
Microsoft.TestPlatform.TestHost (>= 17.1)
Microsoft.NETCore.Platforms (6.0.6)
Microsoft.NETCore.Targets (5.0)
Microsoft.TestPlatform.ObjectModel (17.3.2)
NuGet.Frameworks (>= 5.11)
System.Reflection.Metadata (>= 1.6)
Microsoft.TestPlatform.TestHost (17.3.2)
Microsoft.TestPlatform.ObjectModel (>= 17.3.2)
Newtonsoft.Json (>= 9.0.1)
Mono.Cecil (0.11.4)
Newtonsoft.Json (13.0.1)
Npgsql (6.0.7)
System.Runtime.CompilerServices.Unsafe (>= 6.0)
Npgsql.Json.NET (6.0.7)
Newtonsoft.Json (>= 13.0.1)
Npgsql (>= 6.0.7)
NuGet.Frameworks (6.3.1)
Portable.BouncyCastle (1.9)
Remotion.Linq (2.2)
System.Collections (>= 4.0.11)
Expand Down Expand Up @@ -301,10 +290,6 @@ NUGET
Weasel.Postgresql (5.7.1)
Npgsql (>= 6.0.1 < 7.0)
Weasel.Core (>= 5.7.1)
YoloDev.Expecto.TestSdk (0.12.13)
Expecto (>= 9.0 < 10.0)
FSharp.Core (>= 4.6)
System.Collections.Immutable (>= 1.5)

GROUP Build
STORAGE: NONE
Expand Down
3 changes: 0 additions & 3 deletions tests/Marten.FSharp.Tests/paket.references
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
FSharp.Core
Expecto
Testcontainers

Microsoft.NET.Test.Sdk
YoloDev.Expecto.TestSdk

0 comments on commit 7122ac3

Please sign in to comment.