diff --git a/.github/workflows/dotnet-tests.yml b/.github/workflows/dotnet-tests.yml index 556c2711..1c584eb1 100644 --- a/.github/workflows/dotnet-tests.yml +++ b/.github/workflows/dotnet-tests.yml @@ -36,4 +36,6 @@ jobs: - name: Run tests (detailed) run: | - dotnet test src/Voucherify.Test/Voucherify.Test.csproj + dotnet test src/Voucherify.Test/Voucherify.Test.csproj -p:VoucherifyLibTfm=netstandard2.0 + dotnet test src/Voucherify.Test/Voucherify.Test.csproj -p:VoucherifyLibTfm=netstandard2.1 + dotnet test src/Voucherify.Test/Voucherify.Test.csproj -p:VoucherifyLibTfm=net9.0 diff --git a/Dockerfile b/Dockerfile index aac72c7b..03847c88 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,8 +4,9 @@ WORKDIR /app # Copy the source code COPY ./src ./src +COPY ./lib ./lib # Run the tests with detailed logging and check the results -CMD dotnet test src/Voucherify.Test/Voucherify.Test.csproj -l "console;verbosity=detailed" | \ +CMD dotnet test src/Voucherify.Test/Voucherify.Test.csproj -p:VoucherifyLibTfm=net9.0 -l "console;verbosity=detailed" | \ tee test_results.txt && \ grep -E "failed: 0.*skipped: 0" test_results.txt || (echo "Tests failed or were skipped!" && exit 1) diff --git a/src/Voucherify.Test/Voucherify.Test.csproj b/src/Voucherify.Test/Voucherify.Test.csproj index c94d2d53..73789f7a 100644 --- a/src/Voucherify.Test/Voucherify.Test.csproj +++ b/src/Voucherify.Test/Voucherify.Test.csproj @@ -5,6 +5,8 @@ Voucherify.Test net9.0 false + net9.0 + $(MSBuildThisFileDirectory)../../lib @@ -19,7 +21,32 @@ - + + $(VoucherifyLibRoot)/$(VoucherifyLibTfm)/Voucherify.dll + true + + + + + + + + + + + + + + + + + + + + + + + @@ -35,4 +62,9 @@ PreserveNewest + + + +