Skip to content

Commit

Permalink
Skip approval and PdbGit for TFMs not built
Browse files Browse the repository at this point in the history
And upgrade ApprovalTests
  • Loading branch information
thomaslevesque committed Oct 22, 2019
1 parent 02cb42c commit 22b25d8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion tests/FakeItEasy.Tests.Approval/ApiApproval.cs
Expand Up @@ -13,7 +13,7 @@ namespace FakeItEasy.Tests.Approval

public class ApiApproval
{
[Theory]
[SkippableTheory]
[InlineData("FakeItEasy", "net40")]
[InlineData("FakeItEasy", "net45")]
[InlineData("FakeItEasy", "netstandard1.6")]
Expand All @@ -36,6 +36,8 @@ public void ApproveApi(string projectName, string frameworkVersion)
GetSourceDirectory(),
$@"..\..\src\{projectName}\bin\{configurationName}\{frameworkVersion}\{projectName}.dll"));

Skip.IfNot(File.Exists(assemblyFile), "Assembly doesn't exist.");

var assembly = Assembly.LoadFile(Path.GetFullPath(assemblyFile));
var publicApi = ApiGenerator.GeneratePublicApi(assembly);

Expand Down
Expand Up @@ -6,9 +6,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ApprovalTests" Version="3.0.11" />
<PackageReference Include="ApprovalUtilities" Version="3.0.11" />
<PackageReference Include="ApprovalTests" Version="4.2.2" />
<PackageReference Include="ApprovalUtilities" Version="4.2.2" />
<PackageReference Include="PublicApiGenerator" Version="9.3.0" />
<PackageReference Include="Xunit.SkippableFact" Version="1.3.12" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion tools/FakeItEasy.Build/Program.cs
Expand Up @@ -80,7 +80,7 @@ public static void Main(string[] args)
Target(
"pdbgit",
DependsOn("build"),
forEach: Pdbs,
forEach: Pdbs.Where(pdb => File.Exists(pdb.Path)),
action: pdb => Run(ToolPaths.PdbGit, $"-u https://github.com/FakeItEasy/FakeItEasy -s {pdb.Path}"));

RunTargetsAndExit(args, messageOnly: ex => ex is NonZeroExitCodeException);
Expand Down

0 comments on commit 22b25d8

Please sign in to comment.