-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[chore] Integration test, part 1 (#482)
- Sync C# lang version used for source code + unit tests - New "EasyPost.Integration" project to test integration versus unit tests - Rename VB and FSharp projects to more explicitly testing compatibility versus unit tests - Clarify that EasyPost.Tests (unit tests) can access internal properties of library, integration and compatibility tests cannot - Update Makefile, GitHub CI to handle/test new unit + integration + compatibility test sets
- Loading branch information
Showing
11 changed files
with
133 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -172,9 +172,9 @@ jobs: | |
|
||
# Run the unit tests in a specific framework (verify that the library works in that framework) | ||
- name: Run Tests | ||
run: make test-fw fw=${{ matrix.framework }} | ||
|
||
FSharp_Compatibility: | ||
run: make unit-test fw=${{ matrix.framework }} | ||
Integration_Tests: | ||
runs-on: windows-2022 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -202,14 +202,13 @@ jobs: | |
- name: Set up dotnet tools and dependencies | ||
run: make install | ||
|
||
# Build the test project | ||
- name: Build Solution | ||
run: msbuild EasyPost.Tests.FSharp\EasyPost.Tests.FSharp.fsproj /p:platform="Any CPU" /p:configuration="Debug" /p:outputPath="bin/Test" /p:target="Rebuild" -restore | ||
# Run the integration tests | ||
- name: Run Tests | ||
run: make integration-test fw=net7.0 # Always run integration tests on the latest framework | ||
|
||
Visual_Basic_Compatibility: | ||
FSharp_Compatibility_Tests: | ||
runs-on: windows-2022 | ||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
@@ -235,9 +234,42 @@ jobs: | |
- name: Set up dotnet tools and dependencies | ||
run: make install | ||
|
||
# Build the test project | ||
- name: Build Solution | ||
run: msbuild EasyPost.Tests.VB\EasyPost.Tests.VB.vbproj /p:platform="Any CPU" /p:configuration="Debug" /p:outputPath="bin/Test" /p:target="Rebuild" -restore | ||
# Run the compatibility tests | ||
- name: Run Tests | ||
run: make fs-compat-test fw=net7.0 # Always run compatibility tests on the latest framework | ||
|
||
Visual_Basic_Compatibility_Test: | ||
runs-on: windows-2022 | ||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
||
- name: Install .NET SDK | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 7.x.x | ||
|
||
- name: Setup MSBuild | ||
uses: microsoft/[email protected] | ||
|
||
- name: Setup Nuget | ||
uses: NuGet/[email protected] | ||
|
||
- name: Setup VSTest | ||
uses: darenm/[email protected] | ||
|
||
- name: Restore NuGet Packages | ||
run: make restore | ||
|
||
# Pull in fixtures submodule | ||
- name: Set up dotnet tools and dependencies | ||
run: make install | ||
|
||
# Run the compatibility tests | ||
- name: Run Tests | ||
run: make vb-compat-test fw=net7.0 # Always run compatibility tests on the latest framework | ||
|
||
|
||
# .NET Standard notes: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
EasyPost.Tests.FSharp/FSharpCompileTest.fs → ...Compatibility.FSharp/FSharpCompileTest.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
EasyPost.Tests.VB/EasyPost.Tests.VB.vbproj → ...ility.VB/EasyPost.Compatibility.VB.vbproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using Xunit; | ||
|
||
namespace EasyPost.Integration; | ||
|
||
public class Basics | ||
{ | ||
[Fact] | ||
public void Test1() | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<LangVersion>10</LangVersion> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
|
||
<IsPackable>false</IsPackable> | ||
<IsTestProject>true</IsTestProject> | ||
<RootNamespace>EasyPost.Integration</RootNamespace> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" /> | ||
<PackageReference Include="xunit" Version="2.4.2" /> | ||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5"> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
<PackageReference Include="coverlet.collector" Version="3.1.2"> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters