From e9cfad7a373d204c395b38b9d11fbe96f56bbf6d Mon Sep 17 00:00:00 2001 From: aasgoel Date: Thu, 20 Jun 2024 12:14:09 +0530 Subject: [PATCH 01/54] Update .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index d99a6f06..e6351c6c 100644 --- a/.gitignore +++ b/.gitignore @@ -355,3 +355,5 @@ MigrationBackup/ /cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/build.sh /cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/git_push.sh /cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/mono_nunit_test.sh + +.DS_Store From 987dfbcfc5c6d95dcbd6b602f8efd04a23d0b13e Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 26 Jun 2024 15:38:08 +0530 Subject: [PATCH 02/54] Revert "Update .gitignore" This reverts commit e9cfad7a373d204c395b38b9d11fbe96f56bbf6d. --- .gitignore | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitignore b/.gitignore index e6351c6c..d99a6f06 100644 --- a/.gitignore +++ b/.gitignore @@ -355,5 +355,3 @@ MigrationBackup/ /cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/build.sh /cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/git_push.sh /cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/mono_nunit_test.sh - -.DS_Store From 4fef5212325ae4b0671d6c4da69c4f8e24dc97ea Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 26 Jun 2024 15:38:16 +0530 Subject: [PATCH 03/54] Reapply "Update .gitignore" This reverts commit 987dfbcfc5c6d95dcbd6b602f8efd04a23d0b13e. --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index d99a6f06..e6351c6c 100644 --- a/.gitignore +++ b/.gitignore @@ -355,3 +355,5 @@ MigrationBackup/ /cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/build.sh /cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/git_push.sh /cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/mono_nunit_test.sh + +.DS_Store From 7912ca525a88742dc2876df0d1dc93b752a0be6d Mon Sep 17 00:00:00 2001 From: aasgoel Date: Thu, 27 Jun 2024 10:02:12 +0530 Subject: [PATCH 04/54] Adding workflow to check whether samples build or not --- .github/workflows/workflow.yml | 42 ++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/workflow.yml diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 00000000..42d38fc9 --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,42 @@ +name: DOTNET-STANDARD BUILDS +on: + push: + pull_request: + workflow_dispatch: +env: + CLIENT_FOLDER: 'cybersource-rest-client-dotnetstandard' + SAMPLE_FOLDER: 'cybersource-rest-samples-csharp' +jobs: + build-the-dotnet-client: + strategy: + fail-fast: false + matrix: + operating-system: [windows-latest,ubuntu-latest,macos-latest,macos-13,windows-2019,ubuntu-20.04] + defaults: + run: + shell: bash + runs-on: ${{matrix.operating-system}} + steps: + - name: Checkout the dotnet-standard-repo + uses: actions/checkout@v4 + with: + path: ${{env.CLIENT_FOLDER}} + - name: Checkout cybersource-rest-samples-csharp repo + uses: actions/checkout@v4 + with: + repository: 'CyberSource/cybersource-rest-samples-csharp' + ref: 'testing-branch' + path: ${{env.SAMPLE_FOLDER}} + - name: SetUp DotNet + uses: actions/setup-dotnet@v4 + - name: Running the samples to check whether it works or not + run: | + cd $SAMPLE_FOLDER + dotnet build cybersource-rest-samples-netcore.csproj -c release + cd bin/Release/netcoreapp3.1 + ./SampleCodeNetCore -RunAll > output.log + - name: Upload the Log file + uses: actions/upload-artifact@v4 + with: + name: log-file-dotnet-standard-${{matrix.operating-system}} + path: cd $SAMPLE_FOLDER/bin/Release/netcoreapp3.1/output.log From 73c6a0c62b81c2f745882ba3ccc80bb36732f0a2 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Thu, 27 Jun 2024 10:16:25 +0530 Subject: [PATCH 05/54] Update workflow.yml --- .github/workflows/workflow.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 42d38fc9..7d4c1285 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -29,6 +29,10 @@ jobs: path: ${{env.SAMPLE_FOLDER}} - name: SetUp DotNet uses: actions/setup-dotnet@v4 + with: + dotnet-version: | + 3.1.x + 5.0.x - name: Running the samples to check whether it works or not run: | cd $SAMPLE_FOLDER From c08d57c7137562b33cadf0ab02a88a46e400439b Mon Sep 17 00:00:00 2001 From: aasgoel Date: Thu, 27 Jun 2024 10:23:13 +0530 Subject: [PATCH 06/54] Update workflow.yml --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 7d4c1285..a7319e5c 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -43,4 +43,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: log-file-dotnet-standard-${{matrix.operating-system}} - path: cd $SAMPLE_FOLDER/bin/Release/netcoreapp3.1/output.log + path: cd $SAMPLE_FOLDER/bin/Release/netcoreapp3.1 From 4ecedba823dad611172d5321cf321601f9ddf7bb Mon Sep 17 00:00:00 2001 From: aasgoel Date: Thu, 27 Jun 2024 10:28:05 +0530 Subject: [PATCH 07/54] Update workflow.yml --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index a7319e5c..1d870514 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -43,4 +43,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: log-file-dotnet-standard-${{matrix.operating-system}} - path: cd $SAMPLE_FOLDER/bin/Release/netcoreapp3.1 + path: cd $SAMPLE_FOLDER/bin/Release From a93811450c791798861a0b18cdfc8e619eefe9fe Mon Sep 17 00:00:00 2001 From: aasgoel Date: Thu, 27 Jun 2024 10:35:29 +0530 Subject: [PATCH 08/54] Update workflow.yml --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 1d870514..25b73182 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -43,4 +43,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: log-file-dotnet-standard-${{matrix.operating-system}} - path: cd $SAMPLE_FOLDER/bin/Release + path: ${{env.SAMPLE_FOLDER}}/bin/Release/netcoreapp3.1/output.log From 3490e30effb8887ba2eb0c30c986ad078e0a09de Mon Sep 17 00:00:00 2001 From: aasgoel Date: Thu, 27 Jun 2024 11:10:08 +0530 Subject: [PATCH 09/54] Update workflow.yml --- .github/workflows/workflow.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 25b73182..389f073f 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -17,6 +17,10 @@ jobs: shell: bash runs-on: ${{matrix.operating-system}} steps: + - name: Setup git config + if: runner.os == 'Windows' + run: | + git config --global core.longpaths true - name: Checkout the dotnet-standard-repo uses: actions/checkout@v4 with: From d816d8a6e726d6ab1c1b5a6f4e9e52778d70084e Mon Sep 17 00:00:00 2001 From: aasgoel Date: Thu, 27 Jun 2024 16:06:09 +0530 Subject: [PATCH 10/54] added .sh file for making file changes --- .github/workflows/local_linker.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/local_linker.sh diff --git a/.github/workflows/local_linker.sh b/.github/workflows/local_linker.sh new file mode 100644 index 00000000..355fd90e --- /dev/null +++ b/.github/workflows/local_linker.sh @@ -0,0 +1,22 @@ +# # sed -i'' -e 's|pattern|replacement|g' filename +# #this script needs to be executed in the $github-workspace working directory + +# sed -i'' -e 's||\n +# ../../cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/bin/Release/netstandard2.1/Cybersource.Authentication.NetStandard.dll\n +# true\n +# |g' cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.csproj + + +# sed -i'' -e 's||\n +# ../cybersource-rest-client-dotnetstandard/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/bin/Release/netstandard2.1/Cybersource.Authentication.NetStandard.dll\n +# true\n +# |g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj + +# sed -i'' -e 's||\n +# ../cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/bin/Release/netstandard2.1/cybersource-rest-client-netstandard.dll\n +# true\n +# |g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj + +sed -i'' -e 's||\n ../../cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/bin/Release/netstandard2.1/Cybersource.Authentication.NetStandard.dll\n true\n|g' cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.csproj +sed -i'' -e 's||\n ../cybersource-rest-client-dotnetstandard/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/bin/Release/netstandard2.1/Cybersource.Authentication.NetStandard.dll\n true\n|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj +sed -i'' -e 's||\n ../cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/bin/Release/netstandard2.1/cybersource-rest-client-netstandard.dll\n true\n|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj From 294cdfa3782a930be40649483cbcd75f9a1fc817 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Thu, 27 Jun 2024 19:40:21 +0530 Subject: [PATCH 11/54] pushing local linker --- .github/workflows/workflow.yml | 55 +++++++++++++++++++++++++++------- 1 file changed, 45 insertions(+), 10 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 389f073f..1f110194 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -12,6 +12,7 @@ jobs: fail-fast: false matrix: operating-system: [windows-latest,ubuntu-latest,macos-latest,macos-13,windows-2019,ubuntu-20.04] + dotnet-ver: [3.1.x,5.0,6.0,7.0,8.0] defaults: run: shell: bash @@ -34,17 +35,51 @@ jobs: - name: SetUp DotNet uses: actions/setup-dotnet@v4 with: - dotnet-version: | - 3.1.x - 5.0.x - - name: Running the samples to check whether it works or not + dotnet-version: ${{matrix.dotnet-ver}} + - name: Changing the csproj files to reference the local dll files and building the projects and running the tests + env: + NET_VER: ${{matrix.dotnet-ver}} + TARGET_FR: netcoreapp3.1 run: | - cd $SAMPLE_FOLDER - dotnet build cybersource-rest-samples-netcore.csproj -c release - cd bin/Release/netcoreapp3.1 + sed -i -e 's||\n ../../cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/bin/Release/netstandard2.1/Cybersource.Authentication.NetStandard.dll\n true\n|g' cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.csproj + sed -i -e 's||\n ../cybersource-rest-client-dotnetstandard/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/bin/Release/netstandard2.1/Cybersource.Authentication.NetStandard.dll\n true\n|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj + sed -i -e 's||\n ../cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/bin/Release/netstandard2.1/cybersource-rest-client-netstandard.dll\n true\n|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj + if [ $NET_VER != '3.1.x' ]; then + export TARGET_FR = net$NET_VER + fi + echo $TARGET_FR + echo "Before Auth Build" + dotnet build $CLIENT_FOLDER/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/AuthenticationSdk.csproj -c release + echo "Before Client Build" + dotnet build $CLIENT_FOLDER/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.csproj -c release + echo "Before Samples Build" + dotnet build $SAMPLE_FOLDER/cybersource-rest-samples-netcore.csproj -c release + cd $SAMPLE_FOLDER/bin/Release/TARGET_FR + echo "Running Samples" ./SampleCodeNetCore -RunAll > output.log - - name: Upload the Log file + cp output.log ../../../ + - name: Setup Python v3.12 for report generation only + uses: actions/setup-python@v5 + with: + python-version: 3.12 + - name: Installing required python libraries and running the python programs to generate pdf report + run : | + python -m pip install --upgrade pip + pip install json2html + pip install xhtml2pdf + pip install bs4 + cd $SAMPLE_FOLDER/Validation + python sample_code_log_processor.py -l ../../$SAMPLE_FOLDER/output.log -o ../../$SAMPLE_FOLDER/python_actual_results.json + python sample_code_log_processor.py -l ../../$SAMPLE_FOLDER/output.log -o ../../$SAMPLE_FOLDER/csharp_actual_results.json + python response_code_validator.py -e ExpectedResults/csharp_expected_results.json -a ../../$SAMPLE_FOLDER/csharp_actual_results.json -o csharp_validation_results.json + python json_to_prettified_html.py -i csharp_validation_results.json -o csharp_validation_results.html + cp csharp_validation_results.pdf ../ #copying the file to flatten the directory of the upload artifact,Github Actions doesn't support that as of jun 2024 + - name: Upload the Log files uses: actions/upload-artifact@v4 with: - name: log-file-dotnet-standard-${{matrix.operating-system}} - path: ${{env.SAMPLE_FOLDER}}/bin/Release/netcoreapp3.1/output.log + name: log-file-${{matrix.operating-system}}-dotnet-std-ver-${{matrix.dotnet-ver}} + path: | + ${{env.SAMPLE_FOLDER}}/csharp_validation_results.pdf + ${{env.SAMPLE_FOLDER}}/output.log + + From df64d9f0a9f10d24869e02f7dacc992bec2b5a4e Mon Sep 17 00:00:00 2001 From: aasgoel Date: Thu, 27 Jun 2024 20:41:37 +0530 Subject: [PATCH 12/54] Update workflow.yml --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 1f110194..ef5980e2 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -54,7 +54,7 @@ jobs: dotnet build $CLIENT_FOLDER/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.csproj -c release echo "Before Samples Build" dotnet build $SAMPLE_FOLDER/cybersource-rest-samples-netcore.csproj -c release - cd $SAMPLE_FOLDER/bin/Release/TARGET_FR + cd $SAMPLE_FOLDER/bin/Release/$TARGET_FR echo "Running Samples" ./SampleCodeNetCore -RunAll > output.log cp output.log ../../../ From b35fb4dd9bb8ecce1a4e2fb1cbd5c20cd86e285a Mon Sep 17 00:00:00 2001 From: aasgoel Date: Thu, 27 Jun 2024 20:46:27 +0530 Subject: [PATCH 13/54] Update workflow.yml --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index ef5980e2..e6040c52 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: operating-system: [windows-latest,ubuntu-latest,macos-latest,macos-13,windows-2019,ubuntu-20.04] - dotnet-ver: [3.1.x,5.0,6.0,7.0,8.0] + dotnet-ver: ['3.1.x','5.0','6.0','7.0','8.0'] defaults: run: shell: bash From 7766a5f60f31e1ff0e255f3aef027d972bd22bfd Mon Sep 17 00:00:00 2001 From: aasgoel Date: Thu, 27 Jun 2024 20:52:25 +0530 Subject: [PATCH 14/54] Update workflow.yml --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index e6040c52..6f233ca4 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -45,7 +45,7 @@ jobs: sed -i -e 's||\n ../cybersource-rest-client-dotnetstandard/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/bin/Release/netstandard2.1/Cybersource.Authentication.NetStandard.dll\n true\n|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj sed -i -e 's||\n ../cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/bin/Release/netstandard2.1/cybersource-rest-client-netstandard.dll\n true\n|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj if [ $NET_VER != '3.1.x' ]; then - export TARGET_FR = net$NET_VER + export TARGET_FR=net${NET_VER} fi echo $TARGET_FR echo "Before Auth Build" From 814c46a17545ee11b8d81a6e92096f9e420563c0 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Thu, 27 Jun 2024 21:00:06 +0530 Subject: [PATCH 15/54] Update workflow.yml --- .github/workflows/workflow.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 6f233ca4..e125f059 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -54,6 +54,8 @@ jobs: dotnet build $CLIENT_FOLDER/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.csproj -c release echo "Before Samples Build" dotnet build $SAMPLE_FOLDER/cybersource-rest-samples-netcore.csproj -c release + pwd + ls cd $SAMPLE_FOLDER/bin/Release/$TARGET_FR echo "Running Samples" ./SampleCodeNetCore -RunAll > output.log From 08acecb19b9372cc3b689212e3b25c744b318c82 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Thu, 27 Jun 2024 21:04:28 +0530 Subject: [PATCH 16/54] Update workflow.yml --- .github/workflows/workflow.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index e125f059..9f2fc6ba 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -56,7 +56,13 @@ jobs: dotnet build $SAMPLE_FOLDER/cybersource-rest-samples-netcore.csproj -c release pwd ls - cd $SAMPLE_FOLDER/bin/Release/$TARGET_FR + cd $SAMPLE_FOLDER + ls + cd bin + ls + cd Release + ls + cd $TARGET_FR echo "Running Samples" ./SampleCodeNetCore -RunAll > output.log cp output.log ../../../ From a21c405cde15ef537fb5f5e7bf74e1c0a337c51f Mon Sep 17 00:00:00 2001 From: aasgoel Date: Thu, 27 Jun 2024 21:10:00 +0530 Subject: [PATCH 17/54] Update workflow.yml --- .github/workflows/workflow.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 9f2fc6ba..1678fa6a 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -46,6 +46,7 @@ jobs: sed -i -e 's||\n ../cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/bin/Release/netstandard2.1/cybersource-rest-client-netstandard.dll\n true\n|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj if [ $NET_VER != '3.1.x' ]; then export TARGET_FR=net${NET_VER} + sed -i -e 's|.*|$TARGET_FR|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj fi echo $TARGET_FR echo "Before Auth Build" @@ -54,15 +55,7 @@ jobs: dotnet build $CLIENT_FOLDER/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.csproj -c release echo "Before Samples Build" dotnet build $SAMPLE_FOLDER/cybersource-rest-samples-netcore.csproj -c release - pwd - ls - cd $SAMPLE_FOLDER - ls - cd bin - ls - cd Release - ls - cd $TARGET_FR + cd $SAMPLE_FOLDER/bin/Release/$TARGET_FR echo "Running Samples" ./SampleCodeNetCore -RunAll > output.log cp output.log ../../../ From d3059e74af90c9798eafb3cc7badce0ea0782b73 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Thu, 27 Jun 2024 21:13:22 +0530 Subject: [PATCH 18/54] Update workflow.yml --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 1678fa6a..99d8148c 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -46,7 +46,7 @@ jobs: sed -i -e 's||\n ../cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/bin/Release/netstandard2.1/cybersource-rest-client-netstandard.dll\n true\n|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj if [ $NET_VER != '3.1.x' ]; then export TARGET_FR=net${NET_VER} - sed -i -e 's|.*|$TARGET_FR|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj + sed -i -e 's|.*|${TARGET_FR}|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj fi echo $TARGET_FR echo "Before Auth Build" From eeea7a0d9024d65c83483cdfd5c6d064871ba85d Mon Sep 17 00:00:00 2001 From: aasgoel Date: Thu, 27 Jun 2024 21:28:45 +0530 Subject: [PATCH 19/54] Update workflow.yml --- .github/workflows/workflow.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 99d8148c..79561f69 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -48,6 +48,7 @@ jobs: export TARGET_FR=net${NET_VER} sed -i -e 's|.*|${TARGET_FR}|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj fi + sed 's|.*|${TARGET_FR}|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj echo $TARGET_FR echo "Before Auth Build" dotnet build $CLIENT_FOLDER/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/AuthenticationSdk.csproj -c release From 1514a2c28aaf86db092c0258ed88936225ca3992 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Thu, 27 Jun 2024 21:30:16 +0530 Subject: [PATCH 20/54] Update workflow.yml --- .github/workflows/workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 79561f69..a7bae3e9 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -46,9 +46,9 @@ jobs: sed -i -e 's||\n ../cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/bin/Release/netstandard2.1/cybersource-rest-client-netstandard.dll\n true\n|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj if [ $NET_VER != '3.1.x' ]; then export TARGET_FR=net${NET_VER} - sed -i -e 's|.*|${TARGET_FR}|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj + sed -i -e "s|.*|${TARGET_FR}|g" cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj fi - sed 's|.*|${TARGET_FR}|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj + sed "s|.*|${TARGET_FR}|g" cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj echo $TARGET_FR echo "Before Auth Build" dotnet build $CLIENT_FOLDER/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/AuthenticationSdk.csproj -c release From ff2bacd0fa841b26cf262ad74e4b6c6962f5c586 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Fri, 28 Jun 2024 09:14:16 +0530 Subject: [PATCH 21/54] Update workflow.yml --- .github/workflows/workflow.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index a7bae3e9..35a66cc5 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -48,13 +48,9 @@ jobs: export TARGET_FR=net${NET_VER} sed -i -e "s|.*|${TARGET_FR}|g" cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj fi - sed "s|.*|${TARGET_FR}|g" cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj - echo $TARGET_FR - echo "Before Auth Build" + which dotnet dotnet build $CLIENT_FOLDER/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/AuthenticationSdk.csproj -c release - echo "Before Client Build" dotnet build $CLIENT_FOLDER/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.csproj -c release - echo "Before Samples Build" dotnet build $SAMPLE_FOLDER/cybersource-rest-samples-netcore.csproj -c release cd $SAMPLE_FOLDER/bin/Release/$TARGET_FR echo "Running Samples" From 59f331549a7677cc7ee2a7c8c0d32e7472293f5d Mon Sep 17 00:00:00 2001 From: aasgoel Date: Fri, 28 Jun 2024 09:15:36 +0530 Subject: [PATCH 22/54] Update workflow.yml --- .github/workflows/workflow.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 35a66cc5..a04c50b1 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -49,6 +49,7 @@ jobs: sed -i -e "s|.*|${TARGET_FR}|g" cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj fi which dotnet + dotnet --version dotnet build $CLIENT_FOLDER/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/AuthenticationSdk.csproj -c release dotnet build $CLIENT_FOLDER/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.csproj -c release dotnet build $SAMPLE_FOLDER/cybersource-rest-samples-netcore.csproj -c release From a006af568a42fbc8942197cfa5861836b0ec4f7e Mon Sep 17 00:00:00 2001 From: aasgoel Date: Fri, 28 Jun 2024 09:47:25 +0530 Subject: [PATCH 23/54] Update workflow.yml --- .github/workflows/workflow.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index a04c50b1..9cedb7c1 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -33,6 +33,7 @@ jobs: ref: 'testing-branch' path: ${{env.SAMPLE_FOLDER}} - name: SetUp DotNet + id: setdotnet uses: actions/setup-dotnet@v4 with: dotnet-version: ${{matrix.dotnet-ver}} @@ -41,6 +42,9 @@ jobs: NET_VER: ${{matrix.dotnet-ver}} TARGET_FR: netcoreapp3.1 run: | + echo '${{steps.setdotnet.outputs.dotnet-version}}' + dotnet new globaljson --sdk-version 6.0.100 ${{steps.setdotnet.outputs.dotnet-version}} + cat global.json sed -i -e 's||\n ../../cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/bin/Release/netstandard2.1/Cybersource.Authentication.NetStandard.dll\n true\n|g' cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.csproj sed -i -e 's||\n ../cybersource-rest-client-dotnetstandard/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/bin/Release/netstandard2.1/Cybersource.Authentication.NetStandard.dll\n true\n|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj sed -i -e 's||\n ../cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/bin/Release/netstandard2.1/cybersource-rest-client-netstandard.dll\n true\n|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj @@ -50,6 +54,10 @@ jobs: fi which dotnet dotnet --version + dotnet --list-sdks + dotnet --list-runtimes + #we need to change the target sdk before building the dotnet standard projects + dotnet build $CLIENT_FOLDER/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/AuthenticationSdk.csproj -c release dotnet build $CLIENT_FOLDER/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.csproj -c release dotnet build $SAMPLE_FOLDER/cybersource-rest-samples-netcore.csproj -c release From a014dc83e271a5feecb3b3fa820b76927def6635 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Fri, 28 Jun 2024 09:49:00 +0530 Subject: [PATCH 24/54] Update workflow.yml --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 9cedb7c1..f471eebf 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -43,7 +43,7 @@ jobs: TARGET_FR: netcoreapp3.1 run: | echo '${{steps.setdotnet.outputs.dotnet-version}}' - dotnet new globaljson --sdk-version 6.0.100 ${{steps.setdotnet.outputs.dotnet-version}} + dotnet new globaljson --sdk-version ${{steps.setdotnet.outputs.dotnet-version}} cat global.json sed -i -e 's||\n ../../cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/bin/Release/netstandard2.1/Cybersource.Authentication.NetStandard.dll\n true\n|g' cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.csproj sed -i -e 's||\n ../cybersource-rest-client-dotnetstandard/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/bin/Release/netstandard2.1/Cybersource.Authentication.NetStandard.dll\n true\n|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj From 77c85d4fb82cb29c789c3e60d414de736b7f5f40 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Fri, 28 Jun 2024 09:53:53 +0530 Subject: [PATCH 25/54] Update workflow.yml --- .github/workflows/workflow.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index f471eebf..dd91bbcd 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -57,10 +57,17 @@ jobs: dotnet --list-sdks dotnet --list-runtimes #we need to change the target sdk before building the dotnet standard projects - + echo "Current Version Auth" + dotnet --version dotnet build $CLIENT_FOLDER/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/AuthenticationSdk.csproj -c release + echo "Current Version Client" + dotnet --version dotnet build $CLIENT_FOLDER/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.csproj -c release + echo "Current Version Samples" + dotnet --version dotnet build $SAMPLE_FOLDER/cybersource-rest-samples-netcore.csproj -c release + echo "Current Version" + dotnet --version cd $SAMPLE_FOLDER/bin/Release/$TARGET_FR echo "Running Samples" ./SampleCodeNetCore -RunAll > output.log From e59abba400786517d4770bb7669f03459fcf8b69 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Fri, 28 Jun 2024 09:56:06 +0530 Subject: [PATCH 26/54] Update workflow.yml --- .github/workflows/workflow.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index dd91bbcd..b7299ada 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -69,6 +69,8 @@ jobs: echo "Current Version" dotnet --version cd $SAMPLE_FOLDER/bin/Release/$TARGET_FR + pwd + ls echo "Running Samples" ./SampleCodeNetCore -RunAll > output.log cp output.log ../../../ From d3f1b42ca5bf4d2c9dd4d3889631f25db76acaae Mon Sep 17 00:00:00 2001 From: aasgoel Date: Fri, 28 Jun 2024 10:50:17 +0530 Subject: [PATCH 27/54] Update workflow.yml --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index b7299ada..cfdb4bc4 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -70,7 +70,7 @@ jobs: dotnet --version cd $SAMPLE_FOLDER/bin/Release/$TARGET_FR pwd - ls + ls -R echo "Running Samples" ./SampleCodeNetCore -RunAll > output.log cp output.log ../../../ From 4cc65518e0ff235c77878ff8e744135a792a5455 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Fri, 28 Jun 2024 19:00:11 +0530 Subject: [PATCH 28/54] Update workflow.yml --- .github/workflows/workflow.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index cfdb4bc4..31c727af 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -32,19 +32,19 @@ jobs: repository: 'CyberSource/cybersource-rest-samples-csharp' ref: 'testing-branch' path: ${{env.SAMPLE_FOLDER}} - - name: SetUp DotNet - id: setdotnet - uses: actions/setup-dotnet@v4 - with: - dotnet-version: ${{matrix.dotnet-ver}} + # - name: SetUp DotNet + # id: setdotnet + # uses: actions/setup-dotnet@v4 + # with: + # dotnet-version: ${{matrix.dotnet-ver}} - name: Changing the csproj files to reference the local dll files and building the projects and running the tests env: NET_VER: ${{matrix.dotnet-ver}} TARGET_FR: netcoreapp3.1 run: | - echo '${{steps.setdotnet.outputs.dotnet-version}}' - dotnet new globaljson --sdk-version ${{steps.setdotnet.outputs.dotnet-version}} - cat global.json + # echo '${{steps.setdotnet.outputs.dotnet-version}}' + # dotnet new globaljson --sdk-version ${{steps.setdotnet.outputs.dotnet-version}} + # cat global.json sed -i -e 's||\n ../../cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/bin/Release/netstandard2.1/Cybersource.Authentication.NetStandard.dll\n true\n|g' cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.csproj sed -i -e 's||\n ../cybersource-rest-client-dotnetstandard/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/bin/Release/netstandard2.1/Cybersource.Authentication.NetStandard.dll\n true\n|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj sed -i -e 's||\n ../cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/bin/Release/netstandard2.1/cybersource-rest-client-netstandard.dll\n true\n|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj From 327b0521ed968ba79cde8b557a58081207617c32 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Sun, 30 Jun 2024 22:13:25 +0530 Subject: [PATCH 29/54] Update workflow.yml --- .github/workflows/workflow.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 31c727af..c4dfadb0 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -21,7 +21,7 @@ jobs: - name: Setup git config if: runner.os == 'Windows' run: | - git config --global core.longpaths true + git config --global core.longpaths true # because of issue with path getting too long - name: Checkout the dotnet-standard-repo uses: actions/checkout@v4 with: @@ -32,11 +32,11 @@ jobs: repository: 'CyberSource/cybersource-rest-samples-csharp' ref: 'testing-branch' path: ${{env.SAMPLE_FOLDER}} - # - name: SetUp DotNet - # id: setdotnet - # uses: actions/setup-dotnet@v4 - # with: - # dotnet-version: ${{matrix.dotnet-ver}} + - name: SetUp DotNet + id: setdotnet + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{matrix.dotnet-ver}} - name: Changing the csproj files to reference the local dll files and building the projects and running the tests env: NET_VER: ${{matrix.dotnet-ver}} @@ -52,10 +52,10 @@ jobs: export TARGET_FR=net${NET_VER} sed -i -e "s|.*|${TARGET_FR}|g" cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj fi - which dotnet - dotnet --version - dotnet --list-sdks - dotnet --list-runtimes + # which dotnet + # dotnet --version + # dotnet --list-sdks + # dotnet --list-runtimes #we need to change the target sdk before building the dotnet standard projects echo "Current Version Auth" dotnet --version @@ -69,8 +69,8 @@ jobs: echo "Current Version" dotnet --version cd $SAMPLE_FOLDER/bin/Release/$TARGET_FR - pwd - ls -R + # pwd + # ls -R echo "Running Samples" ./SampleCodeNetCore -RunAll > output.log cp output.log ../../../ From 4b873b741940d210295b6b8b641eb76b4681e125 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Sun, 30 Jun 2024 22:30:31 +0530 Subject: [PATCH 30/54] Update workflow.yml --- .github/workflows/workflow.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index c4dfadb0..1171ea1c 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -42,9 +42,9 @@ jobs: NET_VER: ${{matrix.dotnet-ver}} TARGET_FR: netcoreapp3.1 run: | - # echo '${{steps.setdotnet.outputs.dotnet-version}}' - # dotnet new globaljson --sdk-version ${{steps.setdotnet.outputs.dotnet-version}} - # cat global.json + echo '${{steps.setdotnet.outputs.dotnet-version}}' + dotnet new globaljson --sdk-version ${{steps.setdotnet.outputs.dotnet-version}} + cat global.json sed -i -e 's||\n ../../cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/bin/Release/netstandard2.1/Cybersource.Authentication.NetStandard.dll\n true\n|g' cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.csproj sed -i -e 's||\n ../cybersource-rest-client-dotnetstandard/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/bin/Release/netstandard2.1/Cybersource.Authentication.NetStandard.dll\n true\n|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj sed -i -e 's||\n ../cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/bin/Release/netstandard2.1/cybersource-rest-client-netstandard.dll\n true\n|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj From 3bc72dd691f5ef70dac8e969f79d1be43efab0c3 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Sun, 30 Jun 2024 22:43:44 +0530 Subject: [PATCH 31/54] Update workflow.yml --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 1171ea1c..685faaac 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - operating-system: [windows-latest,ubuntu-latest,macos-latest,macos-13,windows-2019,ubuntu-20.04] + operating-system: [windows-latest,ubuntu-latest,macos-latest,macos-13,windows-2019,ubuntu-20.04,macos-14-large] dotnet-ver: ['3.1.x','5.0','6.0','7.0','8.0'] defaults: run: From 7e9a8ad490eb9ceb72ddd4db77415796dd30a5be Mon Sep 17 00:00:00 2001 From: aasgoel Date: Sun, 30 Jun 2024 22:46:49 +0530 Subject: [PATCH 32/54] Update workflow.yml --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 685faaac..e2cb8d53 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - operating-system: [windows-latest,ubuntu-latest,macos-latest,macos-13,windows-2019,ubuntu-20.04,macos-14-large] + operating-system: [windows-latest,ubuntu-latest,windows-2019,ubuntu-20.04,macos-14-large,macos-latest-large] dotnet-ver: ['3.1.x','5.0','6.0','7.0','8.0'] defaults: run: From 67c10781206adbfdb79fa554c81cacafbe520c24 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Sun, 30 Jun 2024 22:54:18 +0530 Subject: [PATCH 33/54] Update workflow.yml --- .github/workflows/workflow.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index e2cb8d53..59a22a74 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - operating-system: [windows-latest,ubuntu-latest,windows-2019,ubuntu-20.04,macos-14-large,macos-latest-large] + operating-system: [windows-latest,ubuntu-latest,windows-2019,ubuntu-20.04,macos-latest,macos-14] dotnet-ver: ['3.1.x','5.0','6.0','7.0','8.0'] defaults: run: @@ -69,8 +69,8 @@ jobs: echo "Current Version" dotnet --version cd $SAMPLE_FOLDER/bin/Release/$TARGET_FR - # pwd - # ls -R + pwd + ls -R echo "Running Samples" ./SampleCodeNetCore -RunAll > output.log cp output.log ../../../ From efd2dff6b8add1ac328280aa1c503eefb81205f3 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Sun, 30 Jun 2024 22:55:11 +0530 Subject: [PATCH 34/54] Update workflow.yml --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 59a22a74..4b9a281b 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - operating-system: [windows-latest,ubuntu-latest,windows-2019,ubuntu-20.04,macos-latest,macos-14] + operating-system: [windows-latest,ubuntu-latest,windows-2019,ubuntu-20.04,macos-latest,macos-13] dotnet-ver: ['3.1.x','5.0','6.0','7.0','8.0'] defaults: run: From ffee1ec27d74a2344466a815114b413637f3bca2 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 1 Jul 2024 08:33:12 +0530 Subject: [PATCH 35/54] Update workflow.yml --- .github/workflows/workflow.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 4b9a281b..34ca72ac 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -42,6 +42,7 @@ jobs: NET_VER: ${{matrix.dotnet-ver}} TARGET_FR: netcoreapp3.1 run: | + uname -m echo '${{steps.setdotnet.outputs.dotnet-version}}' dotnet new globaljson --sdk-version ${{steps.setdotnet.outputs.dotnet-version}} cat global.json From 85c08be9ce60e585cf012331875c8616ffef6dcb Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 1 Jul 2024 09:23:17 +0530 Subject: [PATCH 36/54] Update workflow.yml --- .github/workflows/workflow.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 34ca72ac..c53c3467 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -17,6 +17,9 @@ jobs: run: shell: bash runs-on: ${{matrix.operating-system}} + env: + NET_VER: ${{matrix.dotnet-ver}} + TARGET_FR: netcoreapp3.1 steps: - name: Setup git config if: runner.os == 'Windows' @@ -37,13 +40,10 @@ jobs: uses: actions/setup-dotnet@v4 with: dotnet-version: ${{matrix.dotnet-ver}} - - name: Changing the csproj files to reference the local dll files and building the projects and running the tests - env: - NET_VER: ${{matrix.dotnet-ver}} - TARGET_FR: netcoreapp3.1 + - name: Changing the csproj files to reference the local Authentication and Client dll files. run: | uname -m - echo '${{steps.setdotnet.outputs.dotnet-version}}' + # echo '${{steps.setdotnet.outputs.dotnet-version}}' dotnet new globaljson --sdk-version ${{steps.setdotnet.outputs.dotnet-version}} cat global.json sed -i -e 's||\n ../../cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/bin/Release/netstandard2.1/Cybersource.Authentication.NetStandard.dll\n true\n|g' cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.csproj @@ -53,25 +53,25 @@ jobs: export TARGET_FR=net${NET_VER} sed -i -e "s|.*|${TARGET_FR}|g" cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj fi - # which dotnet - # dotnet --version - # dotnet --list-sdks - # dotnet --list-runtimes + - name: Build the Authentication and Client projects #we need to change the target sdk before building the dotnet standard projects + run: | echo "Current Version Auth" dotnet --version dotnet build $CLIENT_FOLDER/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/AuthenticationSdk.csproj -c release echo "Current Version Client" dotnet --version dotnet build $CLIENT_FOLDER/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.csproj -c release + - name: Build the Samples project and Run Tests + run: | echo "Current Version Samples" dotnet --version dotnet build $SAMPLE_FOLDER/cybersource-rest-samples-netcore.csproj -c release echo "Current Version" dotnet --version cd $SAMPLE_FOLDER/bin/Release/$TARGET_FR - pwd - ls -R + # pwd + # ls -R echo "Running Samples" ./SampleCodeNetCore -RunAll > output.log cp output.log ../../../ From 90f34ad883622dc7ca0c6e469de05472c0a8d94c Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 1 Jul 2024 09:31:02 +0530 Subject: [PATCH 37/54] Update workflow.yml --- .github/workflows/workflow.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index c53c3467..c437d60e 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -19,7 +19,6 @@ jobs: runs-on: ${{matrix.operating-system}} env: NET_VER: ${{matrix.dotnet-ver}} - TARGET_FR: netcoreapp3.1 steps: - name: Setup git config if: runner.os == 'Windows' @@ -41,6 +40,8 @@ jobs: with: dotnet-version: ${{matrix.dotnet-ver}} - name: Changing the csproj files to reference the local Authentication and Client dll files. + env: + TARGET_FR: netcore3.1 run: | uname -m # echo '${{steps.setdotnet.outputs.dotnet-version}}' @@ -63,7 +64,10 @@ jobs: dotnet --version dotnet build $CLIENT_FOLDER/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.csproj -c release - name: Build the Samples project and Run Tests + env: + TARGET_FR: netcore3.1 run: | + export TARGET_FR=net${NET_VER} echo "Current Version Samples" dotnet --version dotnet build $SAMPLE_FOLDER/cybersource-rest-samples-netcore.csproj -c release From 4eeb56cc643cd9e8aaed06e818d1bb7293b4506a Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 1 Jul 2024 09:33:25 +0530 Subject: [PATCH 38/54] Update workflow.yml --- .github/workflows/workflow.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index c437d60e..24f785d4 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -40,8 +40,6 @@ jobs: with: dotnet-version: ${{matrix.dotnet-ver}} - name: Changing the csproj files to reference the local Authentication and Client dll files. - env: - TARGET_FR: netcore3.1 run: | uname -m # echo '${{steps.setdotnet.outputs.dotnet-version}}' @@ -50,10 +48,6 @@ jobs: sed -i -e 's||\n ../../cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/bin/Release/netstandard2.1/Cybersource.Authentication.NetStandard.dll\n true\n|g' cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.csproj sed -i -e 's||\n ../cybersource-rest-client-dotnetstandard/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/bin/Release/netstandard2.1/Cybersource.Authentication.NetStandard.dll\n true\n|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj sed -i -e 's||\n ../cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/bin/Release/netstandard2.1/cybersource-rest-client-netstandard.dll\n true\n|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj - if [ $NET_VER != '3.1.x' ]; then - export TARGET_FR=net${NET_VER} - sed -i -e "s|.*|${TARGET_FR}|g" cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj - fi - name: Build the Authentication and Client projects #we need to change the target sdk before building the dotnet standard projects run: | @@ -67,7 +61,10 @@ jobs: env: TARGET_FR: netcore3.1 run: | - export TARGET_FR=net${NET_VER} + if [ $NET_VER != '3.1.x' ]; then + export TARGET_FR=net${NET_VER} + sed -i -e "s|.*|${TARGET_FR}|g" cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj + fi echo "Current Version Samples" dotnet --version dotnet build $SAMPLE_FOLDER/cybersource-rest-samples-netcore.csproj -c release From 888d03f7fda5441c5965d6d178cf28177637b35a Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 1 Jul 2024 09:34:59 +0530 Subject: [PATCH 39/54] Update workflow.yml --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 24f785d4..405a1fb1 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -59,7 +59,7 @@ jobs: dotnet build $CLIENT_FOLDER/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.csproj -c release - name: Build the Samples project and Run Tests env: - TARGET_FR: netcore3.1 + TARGET_FR: netcoreapp3.1 run: | if [ $NET_VER != '3.1.x' ]; then export TARGET_FR=net${NET_VER} From 66c654ad0badd9244e33a9f0a187e028ba3222ae Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 1 Jul 2024 09:48:51 +0530 Subject: [PATCH 40/54] Update workflow.yml --- .github/workflows/workflow.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 405a1fb1..c174faae 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - operating-system: [windows-latest,ubuntu-latest,windows-2019,ubuntu-20.04,macos-latest,macos-13] + operating-system: [windows-latest,ubuntu-latest,windows-2019,ubuntu-20.04,macos-latest,macos-13,macos-12] dotnet-ver: ['3.1.x','5.0','6.0','7.0','8.0'] defaults: run: @@ -42,14 +42,12 @@ jobs: - name: Changing the csproj files to reference the local Authentication and Client dll files. run: | uname -m - # echo '${{steps.setdotnet.outputs.dotnet-version}}' dotnet new globaljson --sdk-version ${{steps.setdotnet.outputs.dotnet-version}} cat global.json sed -i -e 's||\n ../../cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/bin/Release/netstandard2.1/Cybersource.Authentication.NetStandard.dll\n true\n|g' cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.csproj sed -i -e 's||\n ../cybersource-rest-client-dotnetstandard/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/bin/Release/netstandard2.1/Cybersource.Authentication.NetStandard.dll\n true\n|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj sed -i -e 's||\n ../cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/bin/Release/netstandard2.1/cybersource-rest-client-netstandard.dll\n true\n|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj - name: Build the Authentication and Client projects - #we need to change the target sdk before building the dotnet standard projects run: | echo "Current Version Auth" dotnet --version @@ -65,6 +63,7 @@ jobs: export TARGET_FR=net${NET_VER} sed -i -e "s|.*|${TARGET_FR}|g" cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj fi + #changing the target framework for samples application echo "Current Version Samples" dotnet --version dotnet build $SAMPLE_FOLDER/cybersource-rest-samples-netcore.csproj -c release From 1d2f2c73a5fa34690e88ba0d397ad9ffa1b7f85f Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 1 Jul 2024 10:05:08 +0530 Subject: [PATCH 41/54] Update workflow.yml --- .github/workflows/workflow.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index c174faae..db1df293 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -73,6 +73,7 @@ jobs: # pwd # ls -R echo "Running Samples" + pwd ./SampleCodeNetCore -RunAll > output.log cp output.log ../../../ - name: Setup Python v3.12 for report generation only From 4bb272899666addcc3c64b64849ea9a7960eda27 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 1 Jul 2024 10:09:44 +0530 Subject: [PATCH 42/54] Update workflow.yml --- .github/workflows/workflow.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index db1df293..8de1e4cc 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -13,6 +13,9 @@ jobs: matrix: operating-system: [windows-latest,ubuntu-latest,windows-2019,ubuntu-20.04,macos-latest,macos-13,macos-12] dotnet-ver: ['3.1.x','5.0','6.0','7.0','8.0'] + exclude: + - operating-system: macos-latest + dotnet-ver: ['3.1.x','5.0'] defaults: run: shell: bash From a8f5b897e98c87d51919522a6db0e5f9c1b4c8cb Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 1 Jul 2024 10:10:48 +0530 Subject: [PATCH 43/54] Update workflow.yml --- .github/workflows/workflow.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 8de1e4cc..cc73bf1b 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -15,7 +15,10 @@ jobs: dotnet-ver: ['3.1.x','5.0','6.0','7.0','8.0'] exclude: - operating-system: macos-latest - dotnet-ver: ['3.1.x','5.0'] + dotnet-ver: '3.1.x' + - operating-system: macos-latest + dotnet-ver: '5.0' + defaults: run: shell: bash From e1adf65fb5f5d4adc0424aeb81e2617354bfce4c Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 1 Jul 2024 11:22:05 +0530 Subject: [PATCH 44/54] Update workflow.yml --- .github/workflows/workflow.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index cc73bf1b..c9614580 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -48,8 +48,12 @@ jobs: - name: Changing the csproj files to reference the local Authentication and Client dll files. run: | uname -m - dotnet new globaljson --sdk-version ${{steps.setdotnet.outputs.dotnet-version}} - cat global.json + if [[ ${{matrix.dotnet-ver}} == '3.1.x' && [ "$(uname -s)" == "Darwin" ]] || [ ${{matrix.dotnet-ver}} == '5.0' && [ "$(uname -s)" == "Darwin" ]]]; then + echo "Microsoft .NET SDK has issues" + else + dotnet new globaljson --sdk-version ${{steps.setdotnet.outputs.dotnet-version}} + cat global.json + fi sed -i -e 's||\n ../../cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/bin/Release/netstandard2.1/Cybersource.Authentication.NetStandard.dll\n true\n|g' cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.csproj sed -i -e 's||\n ../cybersource-rest-client-dotnetstandard/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/bin/Release/netstandard2.1/Cybersource.Authentication.NetStandard.dll\n true\n|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj sed -i -e 's||\n ../cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/bin/Release/netstandard2.1/cybersource-rest-client-netstandard.dll\n true\n|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj From c93ce5cb390ca953a78afde1828519969800605e Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 1 Jul 2024 11:24:21 +0530 Subject: [PATCH 45/54] Update workflow.yml --- .github/workflows/workflow.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index c9614580..2a0e4729 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -48,7 +48,8 @@ jobs: - name: Changing the csproj files to reference the local Authentication and Client dll files. run: | uname -m - if [[ ${{matrix.dotnet-ver}} == '3.1.x' && [ "$(uname -s)" == "Darwin" ]] || [ ${{matrix.dotnet-ver}} == '5.0' && [ "$(uname -s)" == "Darwin" ]]]; then + if [[ (${{matrix.dotnet-ver}} == '3.1.x' && "$(uname -s)" == "Darwin") || + (${{matrix.dotnet-ver}} == '5.0' && "$(uname -s)" == "Darwin") ]]; then echo "Microsoft .NET SDK has issues" else dotnet new globaljson --sdk-version ${{steps.setdotnet.outputs.dotnet-version}} From b065d38f7d03408d506961b801a39e0d47b9539b Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 1 Jul 2024 12:00:14 +0530 Subject: [PATCH 46/54] Update workflow.yml --- .github/workflows/workflow.yml | 44 +++++++++++++--------------------- 1 file changed, 16 insertions(+), 28 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 2a0e4729..386d89ab 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -7,30 +7,29 @@ env: CLIENT_FOLDER: 'cybersource-rest-client-dotnetstandard' SAMPLE_FOLDER: 'cybersource-rest-samples-csharp' jobs: - build-the-dotnet-client: + workflow-job: + defaults: + run: + shell: bash strategy: fail-fast: false matrix: - operating-system: [windows-latest,ubuntu-latest,windows-2019,ubuntu-20.04,macos-latest,macos-13,macos-12] + operating-system: [windows-latest,windows-2019,ubuntu-latest,ubuntu-20.04,macos-latest,macos-13] dotnet-ver: ['3.1.x','5.0','6.0','7.0','8.0'] exclude: - - operating-system: macos-latest + - operating-system: macos-latest #macos 14 arm64 image is being used and it doesn't support .NET Core 3.1 dotnet-ver: '3.1.x' - - operating-system: macos-latest + - operating-system: macos-latest #macos 14 arm64 image is being used and it doesn't support .NET 5.0 dotnet-ver: '5.0' - - defaults: - run: - shell: bash runs-on: ${{matrix.operating-system}} env: NET_VER: ${{matrix.dotnet-ver}} steps: - - name: Setup git config + - name: Setup Git Config for windows to allow path lengths greater than 260 characters if: runner.os == 'Windows' run: | - git config --global core.longpaths true # because of issue with path getting too long - - name: Checkout the dotnet-standard-repo + git config --global core.longpaths true + - name: Checkout the cybersource-rest-client-dotnetstandard repo uses: actions/checkout@v4 with: path: ${{env.CLIENT_FOLDER}} @@ -45,12 +44,11 @@ jobs: uses: actions/setup-dotnet@v4 with: dotnet-version: ${{matrix.dotnet-ver}} - - name: Changing the csproj files to reference the local Authentication and Client dll files. + - name: Changing the csproj files to reference the locally built Authorization and Client dll file run: | - uname -m if [[ (${{matrix.dotnet-ver}} == '3.1.x' && "$(uname -s)" == "Darwin") || (${{matrix.dotnet-ver}} == '5.0' && "$(uname -s)" == "Darwin") ]]; then - echo "Microsoft .NET SDK has issues" + echo "Microsoft .NET SDK version ${{matrix.dotnet-ver}} has issues, latest Microsoft .NET SDK will be used for building the projects." else dotnet new globaljson --sdk-version ${{steps.setdotnet.outputs.dotnet-version}} cat global.json @@ -60,11 +58,8 @@ jobs: sed -i -e 's||\n ../cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/bin/Release/netstandard2.1/cybersource-rest-client-netstandard.dll\n true\n|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj - name: Build the Authentication and Client projects run: | - echo "Current Version Auth" dotnet --version dotnet build $CLIENT_FOLDER/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/AuthenticationSdk.csproj -c release - echo "Current Version Client" - dotnet --version dotnet build $CLIENT_FOLDER/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.csproj -c release - name: Build the Samples project and Run Tests env: @@ -75,16 +70,11 @@ jobs: sed -i -e "s|.*|${TARGET_FR}|g" cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj fi #changing the target framework for samples application - echo "Current Version Samples" dotnet --version + echo "Target Framework : ${TARGET_FR}" dotnet build $SAMPLE_FOLDER/cybersource-rest-samples-netcore.csproj -c release - echo "Current Version" - dotnet --version cd $SAMPLE_FOLDER/bin/Release/$TARGET_FR - # pwd - # ls -R echo "Running Samples" - pwd ./SampleCodeNetCore -RunAll > output.log cp output.log ../../../ - name: Setup Python v3.12 for report generation only @@ -98,17 +88,15 @@ jobs: pip install xhtml2pdf pip install bs4 cd $SAMPLE_FOLDER/Validation - python sample_code_log_processor.py -l ../../$SAMPLE_FOLDER/output.log -o ../../$SAMPLE_FOLDER/python_actual_results.json python sample_code_log_processor.py -l ../../$SAMPLE_FOLDER/output.log -o ../../$SAMPLE_FOLDER/csharp_actual_results.json python response_code_validator.py -e ExpectedResults/csharp_expected_results.json -a ../../$SAMPLE_FOLDER/csharp_actual_results.json -o csharp_validation_results.json python json_to_prettified_html.py -i csharp_validation_results.json -o csharp_validation_results.html - cp csharp_validation_results.pdf ../ #copying the file to flatten the directory of the upload artifact,Github Actions doesn't support that as of jun 2024 - - name: Upload the Log files + cp csharp_validation_results.pdf ../ #copying the file to flatten the directory of the upload artifact,Github Actions doesn't support directory falttening as of June 2024 + - name: Upload Test Reports uses: actions/upload-artifact@v4 with: - name: log-file-${{matrix.operating-system}}-dotnet-std-ver-${{matrix.dotnet-ver}} + name: log-files-${{matrix.operating-system}}-dotnet-standard-ver-${{matrix.dotnet-ver}} path: | ${{env.SAMPLE_FOLDER}}/csharp_validation_results.pdf - ${{env.SAMPLE_FOLDER}}/output.log From d207137a5e6e033d515ae3e9e644f1b4ce813672 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 1 Jul 2024 16:35:08 +0530 Subject: [PATCH 47/54] Modified A comment [no ci] --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 386d89ab..e7f5191a 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -48,7 +48,7 @@ jobs: run: | if [[ (${{matrix.dotnet-ver}} == '3.1.x' && "$(uname -s)" == "Darwin") || (${{matrix.dotnet-ver}} == '5.0' && "$(uname -s)" == "Darwin") ]]; then - echo "Microsoft .NET SDK version ${{matrix.dotnet-ver}} has issues, latest Microsoft .NET SDK will be used for building the projects." + echo "Microsoft .NET SDK version ${{matrix.dotnet-ver}} has issues for Mac OS, latest Microsoft .NET SDK will be used for building the projects." else dotnet new globaljson --sdk-version ${{steps.setdotnet.outputs.dotnet-version}} cat global.json From a0ee1158c944cb10b66731882c86624041dfe869 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 1 Jul 2024 16:46:52 +0530 Subject: [PATCH 48/54] Adding Staus Badge [no ci] --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b46dace6..0800ab68 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # .NET Standard Client SDK for the CyberSource REST API +[![DOTNET-STANDARD BUILDS](https://github.com/CyberSource/cybersource-rest-client-dotnetstandard/actions/workflows/workflow.yml/badge.svg)](https://github.com/CyberSource/cybersource-rest-client-dotnetstandard/actions/workflows/workflow.yml) The CyberSource .NET Standard client provides convenient access to the [CyberSource REST API](https://developer.cybersource.com/api/reference/api-reference.html) from your .NET application. From 9a24bf7d052834082386f1aa523abffc4d2d90b3 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 3 Jul 2024 15:51:42 +0530 Subject: [PATCH 49/54] running with report-generation action --- .github/actions/generate-report/action.yml | 58 ++++++++++++++++++ .github/workflows/workflow.yml | 69 +++++++++++++++++----- 2 files changed, 111 insertions(+), 16 deletions(-) create mode 100644 .github/actions/generate-report/action.yml diff --git a/.github/actions/generate-report/action.yml b/.github/actions/generate-report/action.yml new file mode 100644 index 00000000..b3787523 --- /dev/null +++ b/.github/actions/generate-report/action.yml @@ -0,0 +1,58 @@ +name: 'Generate the Report' +description: 'Generates the report using the log-file-name file present just inside the sample folder path provided , given Validation Folder is there inside the sample folder as well' +inputs: + lang: + description: 'The language or framework in which SDK is written needs to be given as an input' + required: true + sample-folder-name: + description: 'The name of the sample folder' + required: true + log-file-name: + description: 'The name of the generated log file' + required: true +outputs: + result-pdf-name: + description: 'the name of the final generated pdf report' + value: ${{steps.generate.outputs.pdfname}} +runs: + using: 'composite' + steps: + - name: Setup Python v3.12 for report generation only + uses: actions/setup-python@v5 + with: + python-version: 3.12 + - name: Installing required python libraries and running the python programs to generate pdf report + id: generate + run : | + export EXPECTED_RES_LANG=${{inputs.lang}} + if [[ "${{inputs.lang}}" == "dotnet" ]] || [[ "${{inputs.lang}}" == "dotnetstandard" ]]; then + export EXPECTED_RES_LANG=csharp + fi + echo $EXPECTED_RES_LANG + python --version + echo "Before Running Report Generation" + cd ${{inputs.sample-folder-name}} + python -m pip install --upgrade pip + python -m venv newve + if [[ "$(uname -s)" == "Linux" ]]; then + echo "In LINUX" + source newve/bin/activate + elif [[ "$(uname -s)" == "Darwin" ]]; then + echo "In MAC" + source newve/bin/activate + else + echo "In Windows" + source newve/Scripts/activate + fi + echo $VIRTUAL_ENV + pip install json2html + pip install xhtml2pdf + pip install bs4 + cd Validation + python sample_code_log_processor.py -l ../../${{inputs.sample-folder-name}}/${{inputs.log-file-name}} -o ../../${{inputs.sample-folder-name}}/${{inputs.lang}}_actual_results.json + python response_code_validator.py -e ExpectedResults/${EXPECTED_RES_LANG}_expected_results.json -a ../../${{inputs.sample-folder-name}}/${{inputs.lang}}_actual_results.json -o ${{inputs.lang}}_validation_results.json + python json_to_prettified_html.py -i ${{inputs.lang}}_validation_results.json -o ${{inputs.lang}}_validation_results.html + cp ${{inputs.lang}}_validation_results.pdf ../ #copying the file to flaatten the directory of the upload artifact,Github Actions doesn't support that as of jun 2024 + echo "pdfname=${{inputs.lang}}_validation_results.pdf" >> $GITHUB_OUTPUT + shell: bash + diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index e7f5191a..7f39b958 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -77,26 +77,63 @@ jobs: echo "Running Samples" ./SampleCodeNetCore -RunAll > output.log cp output.log ../../../ - - name: Setup Python v3.12 for report generation only - uses: actions/setup-python@v5 + - name: Using Report Generation Action + id: report-generation + uses: ./cybersource-rest-client-dotnetstandard/.github/actions/generate-report with: - python-version: 3.12 - - name: Installing required python libraries and running the python programs to generate pdf report - run : | - python -m pip install --upgrade pip - pip install json2html - pip install xhtml2pdf - pip install bs4 - cd $SAMPLE_FOLDER/Validation - python sample_code_log_processor.py -l ../../$SAMPLE_FOLDER/output.log -o ../../$SAMPLE_FOLDER/csharp_actual_results.json - python response_code_validator.py -e ExpectedResults/csharp_expected_results.json -a ../../$SAMPLE_FOLDER/csharp_actual_results.json -o csharp_validation_results.json - python json_to_prettified_html.py -i csharp_validation_results.json -o csharp_validation_results.html - cp csharp_validation_results.pdf ../ #copying the file to flatten the directory of the upload artifact,Github Actions doesn't support directory falttening as of June 2024 + lang: dotnetstandard + sample-folder-name: ${{env.SAMPLE_FOLDER}} + log-file-name: output.log - name: Upload Test Reports uses: actions/upload-artifact@v4 with: - name: log-files-${{matrix.operating-system}}-dotnet-standard-ver-${{matrix.dotnet-ver}} + name: sample-run-report-${{matrix.operating-system}}-dotnet-core-ver-${{matrix.dotnet-ver}} path: | - ${{env.SAMPLE_FOLDER}}/csharp_validation_results.pdf + ${{env.SAMPLE_FOLDER}}/${{steps.report-generation.outputs.result-pdf-name}} + + + + + + + + + + + + + + + + + + + + + + + + + # - name: Setup Python v3.12 for report generation only + # uses: actions/setup-python@v5 + # with: + # python-version: 3.12 + # - name: Installing required python libraries and running the python programs to generate pdf report + # run : | + # python -m pip install --upgrade pip + # pip install json2html + # pip install xhtml2pdf + # pip install bs4 + # cd $SAMPLE_FOLDER/Validation + # python sample_code_log_processor.py -l ../../$SAMPLE_FOLDER/output.log -o ../../$SAMPLE_FOLDER/csharp_actual_results.json + # python response_code_validator.py -e ExpectedResults/csharp_expected_results.json -a ../../$SAMPLE_FOLDER/csharp_actual_results.json -o csharp_validation_results.json + # python json_to_prettified_html.py -i csharp_validation_results.json -o csharp_validation_results.html + # cp csharp_validation_results.pdf ../ #copying the file to flatten the directory of the upload artifact,Github Actions doesn't support directory falttening as of June 2024 + # - name: Upload Test Reports + # uses: actions/upload-artifact@v4 + # with: + # name: log-files-${{matrix.operating-system}}-dotnet-standard-ver-${{matrix.dotnet-ver}} + # path: | + # ${{env.SAMPLE_FOLDER}}/csharp_validation_results.pdf From a480440169b4ace5ce03202e48af5ce2a3a3bdf5 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Fri, 5 Jul 2024 12:11:51 +0530 Subject: [PATCH 50/54] Update workflow.yml --- .github/workflows/workflow.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 7f39b958..e802b8fc 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -56,6 +56,7 @@ jobs: sed -i -e 's||\n ../../cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/bin/Release/netstandard2.1/Cybersource.Authentication.NetStandard.dll\n true\n|g' cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.csproj sed -i -e 's||\n ../cybersource-rest-client-dotnetstandard/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/bin/Release/netstandard2.1/Cybersource.Authentication.NetStandard.dll\n true\n|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj sed -i -e 's||\n ../cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/bin/Release/netstandard2.1/cybersource-rest-client-netstandard.dll\n true\n|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj + cat cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj - name: Build the Authentication and Client projects run: | dotnet --version @@ -69,6 +70,7 @@ jobs: export TARGET_FR=net${NET_VER} sed -i -e "s|.*|${TARGET_FR}|g" cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj fi + cat cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj #changing the target framework for samples application dotnet --version echo "Target Framework : ${TARGET_FR}" From 904add3cfc5005b13be6dcff62f644600829aec7 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Fri, 5 Jul 2024 12:16:48 +0530 Subject: [PATCH 51/54] Update workflow.yml --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index e802b8fc..29179df9 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -56,7 +56,7 @@ jobs: sed -i -e 's||\n ../../cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/bin/Release/netstandard2.1/Cybersource.Authentication.NetStandard.dll\n true\n|g' cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.csproj sed -i -e 's||\n ../cybersource-rest-client-dotnetstandard/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/bin/Release/netstandard2.1/Cybersource.Authentication.NetStandard.dll\n true\n|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj sed -i -e 's||\n ../cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/bin/Release/netstandard2.1/cybersource-rest-client-netstandard.dll\n true\n|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj - cat cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj + cat cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.csproj - name: Build the Authentication and Client projects run: | dotnet --version From 6648d52d5ab8122c272556e5676af1edd738d650 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 8 Jul 2024 15:12:36 +0530 Subject: [PATCH 52/54] [no ci] --- .github/workflows/workflow.yml | 47 ---------------------------------- 1 file changed, 47 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 29179df9..f3fea686 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -92,50 +92,3 @@ jobs: name: sample-run-report-${{matrix.operating-system}}-dotnet-core-ver-${{matrix.dotnet-ver}} path: | ${{env.SAMPLE_FOLDER}}/${{steps.report-generation.outputs.result-pdf-name}} - - - - - - - - - - - - - - - - - - - - - - - - - # - name: Setup Python v3.12 for report generation only - # uses: actions/setup-python@v5 - # with: - # python-version: 3.12 - # - name: Installing required python libraries and running the python programs to generate pdf report - # run : | - # python -m pip install --upgrade pip - # pip install json2html - # pip install xhtml2pdf - # pip install bs4 - # cd $SAMPLE_FOLDER/Validation - # python sample_code_log_processor.py -l ../../$SAMPLE_FOLDER/output.log -o ../../$SAMPLE_FOLDER/csharp_actual_results.json - # python response_code_validator.py -e ExpectedResults/csharp_expected_results.json -a ../../$SAMPLE_FOLDER/csharp_actual_results.json -o csharp_validation_results.json - # python json_to_prettified_html.py -i csharp_validation_results.json -o csharp_validation_results.html - # cp csharp_validation_results.pdf ../ #copying the file to flatten the directory of the upload artifact,Github Actions doesn't support directory falttening as of June 2024 - # - name: Upload Test Reports - # uses: actions/upload-artifact@v4 - # with: - # name: log-files-${{matrix.operating-system}}-dotnet-standard-ver-${{matrix.dotnet-ver}} - # path: | - # ${{env.SAMPLE_FOLDER}}/csharp_validation_results.pdf - - From a2487f53dcd991f5c75de156e19c0b709949bbd3 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Tue, 9 Jul 2024 11:49:04 +0530 Subject: [PATCH 53/54] Removed local_linker.sh --- .github/workflows/local_linker.sh | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 .github/workflows/local_linker.sh diff --git a/.github/workflows/local_linker.sh b/.github/workflows/local_linker.sh deleted file mode 100644 index 355fd90e..00000000 --- a/.github/workflows/local_linker.sh +++ /dev/null @@ -1,22 +0,0 @@ -# # sed -i'' -e 's|pattern|replacement|g' filename -# #this script needs to be executed in the $github-workspace working directory - -# sed -i'' -e 's||\n -# ../../cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/bin/Release/netstandard2.1/Cybersource.Authentication.NetStandard.dll\n -# true\n -# |g' cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.csproj - - -# sed -i'' -e 's||\n -# ../cybersource-rest-client-dotnetstandard/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/bin/Release/netstandard2.1/Cybersource.Authentication.NetStandard.dll\n -# true\n -# |g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj - -# sed -i'' -e 's||\n -# ../cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/bin/Release/netstandard2.1/cybersource-rest-client-netstandard.dll\n -# true\n -# |g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj - -sed -i'' -e 's||\n ../../cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/bin/Release/netstandard2.1/Cybersource.Authentication.NetStandard.dll\n true\n|g' cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.csproj -sed -i'' -e 's||\n ../cybersource-rest-client-dotnetstandard/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/bin/Release/netstandard2.1/Cybersource.Authentication.NetStandard.dll\n true\n|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj -sed -i'' -e 's||\n ../cybersource-rest-client-dotnetstandard/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/bin/Release/netstandard2.1/cybersource-rest-client-netstandard.dll\n true\n|g' cybersource-rest-samples-csharp/cybersource-rest-samples-netcore.csproj From 8c1a1d0b98314ed2822d9a601c92b170af23cd42 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Tue, 16 Jul 2024 11:49:50 +0530 Subject: [PATCH 54/54] updates samples ref to master --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index f3fea686..2b12bb61 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -37,7 +37,7 @@ jobs: uses: actions/checkout@v4 with: repository: 'CyberSource/cybersource-rest-samples-csharp' - ref: 'testing-branch' + ref: 'master' path: ${{env.SAMPLE_FOLDER}} - name: SetUp DotNet id: setdotnet