Skip to content

Commit

Permalink
github tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andi0b committed Dec 19, 2024
1 parent fc48404 commit 7faba9b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
with:
dotnet-version: 9.0.x
- name: Restore dependencies
run: dotnet restore -p:test=true
run: dotnet restore -p:test=true
- name: Build
run: dotnet build -p:test=true --no-restore --configuration Release
- name: Test
run: >
dotnet test -p:test=true -p:TestingPlatformShowTestsFailure=true
dotnet test -p:test=true
--configuration Release
--logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true"
--no-build --verbosity normal
10 changes: 5 additions & 5 deletions Day03_fparsec.fs
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ module tests =
let ``Part 2 example`` (input) = part2 input =! 48


[<Fact>]
[<Fact(Skip = "requires file")>]
let ``Part 1 realworld`` () =
System.IO.File.ReadAllText("../../../inputs/day03.txt") |> part1 =! 156388521

[<Fact>]
[<Fact(Skip = "requires file")>]
let ``Part 2 realworld`` () =
System.IO.File.ReadAllText("../../../inputs/day03.txt") |> part2 =! 75920122

Expand All @@ -79,10 +79,10 @@ module ``FParsec Tests`` =
| Success(result, _, _) -> Result.Ok result
| Failure(msg, _, _) -> Result.Error msg

[<Fact(Skip="requires file")>]
[<Fact>]
let ``Test mul(123,456)`` () =
test mul "mul(123,456)" =! Result.Ok(123, 456)

[<Fact(Skip="requires file")>]
[<Fact>]
let ``Test mul(123,456`` () =
test mul "mul(123,456]" <>! Result.Ok(123, 456)
test mul "mul(123,456]" <>! Result.Ok(123, 456)
5 changes: 0 additions & 5 deletions advent-of-code-2024.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
<GenerateTestingPlatformEntryPoint>false</GenerateTestingPlatformEntryPoint>
<GenerateSelfRegisteredExtensions>false</GenerateSelfRegisteredExtensions>
</PropertyGroup>

<PropertyGroup Condition="'$(test)' == 'true'">
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FParsec" Version="1.1.1" />
Expand Down

0 comments on commit 7faba9b

Please sign in to comment.