diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 7d9b3a7b..b9f571e4 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -30,8 +30,8 @@ jobs: matrix: include: # Ubuntu - - { name: 'Linux .NET Core 3', os: ubuntu-18.04, framework: 'netcoreapp3.1' } - - { name: 'Linux .NET 5', os: ubuntu-18.04, framework: 'net5' } + - { name: 'Linux .NET Core 3', os: ubuntu-22.04, framework: 'netcoreapp3.1' } + - { name: 'Linux .NET 5', os: ubuntu-22.04, framework: 'net5' } # macOs - { name: 'macOS .NET Core 3', os: macOS-latest, framework: 'netcoreapp3.1' } - { name: 'macOS .NET 5', os: macOS-latest, framework: 'net5' } @@ -55,7 +55,7 @@ jobs: shell: pwsh steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 1 @@ -69,12 +69,12 @@ jobs: - name: Setup .NET SDK if: (runner.os == 'macOS' || runner.os == 'Linux') - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v3 with: dotnet-version: ${{ env.DOTNET_SDK_VERSION }} - name: Setup Nuget Cache - uses: actions/cache@v2 + uses: actions/cache@v3 id: nuget-cache with: path: ~/.nuget @@ -113,7 +113,7 @@ jobs: /p:CollectCoverage=true - name: Save Code Coverage Results - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: CoverageReports-${{ runner.os }}-${{ matrix.framework }}.zip path: SignNow.Net.Test/bin/Debug/**/coverage* @@ -136,10 +136,10 @@ jobs: - name: Upload Code Coverage Report (Codecov.io) continue-on-error: true - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v3 with: name: ${{ runner.os }}-codecov-${{ matrix.framework }} flags: ${{ runner.os }},${{ env.TARGET_FRAMEWORK }} token: ${{ secrets.CODECOV_TOKEN }} - file: ${{ env.COVERAGE_PATH }}/${{ matrix.framework }}/coverage.${{ matrix.framework }}.opencover.xml + files: ${{ env.COVERAGE_PATH }}/${{ matrix.framework }}/coverage.${{ matrix.framework }}.opencover.xml fail_ci_if_error: false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6fa13d44..69fc4fde 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,17 +17,17 @@ jobs: NUGET_XMLDOC_MODE: skip # prevent the download of the XML documentation for the packages steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup .NET 5 - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v3 with: dotnet-version: | 3.1.x 5.0.x - name: Setup Nuget Cache - uses: actions/cache@v2 + uses: actions/cache@v3 id: nuget-cache with: path: ~/.nuget @@ -51,7 +51,7 @@ jobs: - name: Prepare Release Assets id: get-version run: | - echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} + echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT .github/release-notes.sh CHANGELOG.md > release-notes.txt - name: Create Release diff --git a/SignNow.Net.Examples/SignNow.Net.Examples.csproj b/SignNow.Net.Examples/SignNow.Net.Examples.csproj index 7ed4b525..a199eb29 100644 --- a/SignNow.Net.Examples/SignNow.Net.Examples.csproj +++ b/SignNow.Net.Examples/SignNow.Net.Examples.csproj @@ -12,9 +12,13 @@ - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + - + diff --git a/SignNow.Net.Test/AuthorizedApiTestBase.cs b/SignNow.Net.Test/AuthorizedApiTestBase.cs index cc1eac89..09bb61eb 100644 --- a/SignNow.Net.Test/AuthorizedApiTestBase.cs +++ b/SignNow.Net.Test/AuthorizedApiTestBase.cs @@ -125,7 +125,7 @@ protected static void DeleteTestDocument(string documentId) } using (var client = new HttpClient()) - using (var requestMessage = new HttpRequestMessage(HttpMethod.Delete, $"{ApiBaseUrl}/document/{documentId}")) + using (var requestMessage = new HttpRequestMessage(HttpMethod.Delete, $"{ApiBaseUrl.AbsoluteUri.Trim('/')}/document/{documentId}")) { requestMessage.Headers.Add("Authorization", Token.GetAuthorizationHeaderValue()); var response = client.SendAsync(requestMessage).Result; diff --git a/SignNow.Net.Test/FeatureTests/FreeFormInviteTest.cs b/SignNow.Net.Test/FeatureTests/FreeFormInviteTest.cs index 311f141a..224e4c51 100644 --- a/SignNow.Net.Test/FeatureTests/FreeFormInviteTest.cs +++ b/SignNow.Net.Test/FeatureTests/FreeFormInviteTest.cs @@ -38,6 +38,9 @@ public async Task DocumentOwnerCanSendFreeFormInviteToUser() Assert.IsNull(documentInviteRequest.IsCanceled, "Invite status should not be canceled by default."); Assert.AreEqual(InviteStatus.Pending, documentInviteRequest.Status); Assert.AreEqual(DocumentStatus.Pending, documentInfo.Status); + + // Could not delete document with pending invites. Invites must be cancelled first + await SignNowTestContext.Invites.CancelInviteAsync(documentInviteRequest).ConfigureAwait(false); } [TestMethod] diff --git a/SignNow.Net.Test/FeatureTests/RoleBasedInviteTest.cs b/SignNow.Net.Test/FeatureTests/RoleBasedInviteTest.cs index d6fdcf80..39017bef 100644 --- a/SignNow.Net.Test/FeatureTests/RoleBasedInviteTest.cs +++ b/SignNow.Net.Test/FeatureTests/RoleBasedInviteTest.cs @@ -39,6 +39,9 @@ public async Task DocumentOwnerCanSendRoleBasedInvite() Assert.AreEqual("Pending", fieldInvites.Status.ToString(), "Newly created Invite must have status: pending."); Assert.AreEqual("Signer 1", fieldInvites.RoleName, "Signer role mismatch."); Assert.AreEqual("signer1@signnow.com", fieldInvites.SignerEmail, "Signer email mismatch."); + + // Could not delete document with pending invites. Invites must be cancelled first + await SignNowTestContext.Invites.CancelInviteAsync(documentUpdated.Id).ConfigureAwait(false); } [TestMethod] diff --git a/SignNow.Net.Test/SignNow.Net.Test.csproj b/SignNow.Net.Test/SignNow.Net.Test.csproj index 71bc48b3..e5e9b5fd 100644 --- a/SignNow.Net.Test/SignNow.Net.Test.csproj +++ b/SignNow.Net.Test/SignNow.Net.Test.csproj @@ -18,21 +18,17 @@ - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/SignNow.Net/SignNow.Net.csproj b/SignNow.Net/SignNow.Net.csproj index 24a21bbf..10c5673c 100644 --- a/SignNow.Net/SignNow.Net.csproj +++ b/SignNow.Net/SignNow.Net.csproj @@ -17,11 +17,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - +