From 68aa22c56917a43964bd1bbeb55b0da1f78e4340 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Thu, 6 Jun 2024 10:46:24 +0530 Subject: [PATCH 001/130] test commit --- .github/workflows/python-workflow.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/python-workflow.yml diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml new file mode 100644 index 00000000..6b247d8d --- /dev/null +++ b/.github/workflows/python-workflow.yml @@ -0,0 +1,18 @@ +name: workflow cybersource-rest-client-python +on: + push: + pull_request: + types: + - opened + branches: + - 'master' + - 'adding-workflows' +jobs: + job-1: + runs-on: ubunutu-latest + steps: + - name: Checkout the Code + uses: actions/checkout@v4 + - name: Listing out all that is there + run: ls -lrt + From c14e644e59717eb682a00b4a59be8707c6982d9f Mon Sep 17 00:00:00 2001 From: aasgoel Date: Thu, 6 Jun 2024 15:27:04 +0530 Subject: [PATCH 002/130] checking out the python samples inside a new folder python_sdk in workflow --- .github/workflows/python-workflow.yml | 36 +++++++++++++++++---------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 6b247d8d..f7ff5c8b 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -1,18 +1,28 @@ -name: workflow cybersource-rest-client-python -on: - push: - pull_request: - types: - - opened - branches: - - 'master' - - 'adding-workflows' +name: workflow cybersource-rest-client-python-test-run +on: push + # pull_request: + # types: + # - opened + # branches: + # - 'master' + # - 'adding-workflows' jobs: job-1: runs-on: ubunutu-latest steps: - - name: Checkout the Code + - name: Make New Directory + run: mkdir python_sdk + - name: Checkout the python-rest-client-repo uses: actions/checkout@v4 - - name: Listing out all that is there - run: ls -lrt - + with: + path: 'python_sdk' + - name: Checkout the python-samples-folder + uses: actions/checkout@v4 + with: + repository: 'CyberSource/cybersource-rest-samples-python' + path: 'python_sdk' + - name: Change the folder and list the files + run: | + cd python_sdk + ls + echo "Inside the python_sdk" From e04cdc358e54f2c339a49633d7c6dd314b675679 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Thu, 6 Jun 2024 16:54:10 +0530 Subject: [PATCH 003/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 29 +++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index f7ff5c8b..b3850a84 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -8,21 +8,38 @@ on: push # - 'adding-workflows' jobs: job-1: - runs-on: ubunutu-latest + runs-on: ubuntu-24.04 steps: - name: Make New Directory - run: mkdir python_sdk + run: | + rm -rf python_sdk_testing + mkdir python_sdk_testing - name: Checkout the python-rest-client-repo uses: actions/checkout@v4 with: - path: 'python_sdk' + path: 'python_sdk_testing' - name: Checkout the python-samples-folder uses: actions/checkout@v4 with: repository: 'CyberSource/cybersource-rest-samples-python' - path: 'python_sdk' + path: 'python_sdk_testing' - name: Change the folder and list the files run: | - cd python_sdk + cd python_sdk_testing ls - echo "Inside the python_sdk" + echo "Inside the python_sdk_testing" + - name: Setting up and activating python virtual environment + run: | + python3 -m venv ve + source ve/bin/activate + - name: Building the projects + run: | + cd cyber-source-rest-client-python + pip install -e . + cd .. + cd cyber-source-rest-samples-python + pip install -e . + pip install requests + bash ./sample_code_runner.sh + + From 091b4289bb811688365557144e9dd86212f25942 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Fri, 7 Jun 2024 12:17:40 +0530 Subject: [PATCH 004/130] Updated the workflow for running test on a updateinvoicesettings --- .github/workflows/python-workflow.yml | 65 ++++++++++++++++----------- 1 file changed, 38 insertions(+), 27 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index b3850a84..1709736d 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -1,45 +1,56 @@ name: workflow cybersource-rest-client-python-test-run -on: push - # pull_request: - # types: - # - opened - # branches: - # - 'master' - # - 'adding-workflows' +on: + push: + jobs: job-1: + env: + CLIENT_FOLDER: 'cybersource-rest-client-python' + SAMPLE_FOLDER: 'cybersource-rest-samples-python' runs-on: ubuntu-24.04 steps: - - name: Make New Directory + # - name: Code Checkout + # uses: actions/checkout@v4 + - name: Making separate folders run: | - rm -rf python_sdk_testing - mkdir python_sdk_testing - - name: Checkout the python-rest-client-repo + rm -rf '$CLIENT_FOLDER' + rm -rf '$SAMPLE_FOLDER' + mkdir $CLIENT_FOLDER $SAMPLE_FOLDER + - name: Adding client uses: actions/checkout@v4 with: - path: 'python_sdk_testing' - - name: Checkout the python-samples-folder + repository: 'CyberSource/cybersource-rest-client-python' + path: './$CLIENT_FOLDER' + - name: Adding sample uses: actions/checkout@v4 with: repository: 'CyberSource/cybersource-rest-samples-python' - path: 'python_sdk_testing' - - name: Change the folder and list the files - run: | - cd python_sdk_testing - ls - echo "Inside the python_sdk_testing" - - name: Setting up and activating python virtual environment + path: '$SAMPLE_FOLDER' + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: "3.10" + - name: Set up virtual python environment run: | - python3 -m venv ve + python -m pip install --upgrade pip + python -m venv ve source ve/bin/activate - name: Building the projects run: | - cd cyber-source-rest-client-python + cd '$CLIENT_FOLDER' pip install -e . cd .. - cd cyber-source-rest-samples-python + cd '$SAMPLE_FOLDER' pip install -e . - pip install requests - bash ./sample_code_runner.sh - - + #echo "Before Running the python file" + python samples/Invoicing/InvoiceSettings/updateinvoicesettings.py + #echo "After Running the Python File" + #bash ./sample_code_runner.sh + - name: Upload the log files + if: always() + uses: actions/upload-artifact@v4 + with: + name: log-files + path: '$SAMPLE_FOLDER/output.log' + + From 01498fd22d7a506c22997de987a283136aadda28 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Fri, 7 Jun 2024 12:23:37 +0530 Subject: [PATCH 005/130] changed the runner to ubuntu latest in place of ubuntu 24.04 --- .github/workflows/python-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 1709736d..1ebbd328 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -7,7 +7,7 @@ jobs: env: CLIENT_FOLDER: 'cybersource-rest-client-python' SAMPLE_FOLDER: 'cybersource-rest-samples-python' - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest steps: # - name: Code Checkout # uses: actions/checkout@v4 From 6c87b3fe25fc94b7301d3c937eddd3fdab65cc00 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Fri, 7 Jun 2024 12:27:29 +0530 Subject: [PATCH 006/130] added one more test to check whether it fails or not --- .github/workflows/python-workflow.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 1ebbd328..77dfebfc 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -43,6 +43,8 @@ jobs: cd '$SAMPLE_FOLDER' pip install -e . #echo "Before Running the python file" + python samples/Invoicing/InvoiceSettings/get-invoice-settings.py + echo "Done with first sample" python samples/Invoicing/InvoiceSettings/updateinvoicesettings.py #echo "After Running the Python File" #bash ./sample_code_runner.sh From 21b9fb291a61ee48458709d7a2686e82a4028539 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Fri, 7 Jun 2024 12:35:40 +0530 Subject: [PATCH 007/130] updated the workflow --- .github/workflows/python-workflow.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 77dfebfc..0f46e122 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -25,6 +25,7 @@ jobs: uses: actions/checkout@v4 with: repository: 'CyberSource/cybersource-rest-samples-python' + ref: 'testing-branch' path: '$SAMPLE_FOLDER' - name: Install Python uses: actions/setup-python@v5 @@ -43,11 +44,11 @@ jobs: cd '$SAMPLE_FOLDER' pip install -e . #echo "Before Running the python file" - python samples/Invoicing/InvoiceSettings/get-invoice-settings.py - echo "Done with first sample" - python samples/Invoicing/InvoiceSettings/updateinvoicesettings.py + #python samples/Invoicing/InvoiceSettings/get-invoice-settings.py + #echo "Done with first sample" + #python samples/Invoicing/InvoiceSettings/updateinvoicesettings.py #echo "After Running the Python File" - #bash ./sample_code_runner.sh + bash ./sample_code_runner.sh - name: Upload the log files if: always() uses: actions/upload-artifact@v4 From b4c736f23faadaa214ce7a8715c19b260be2dacf Mon Sep 17 00:00:00 2001 From: aasgoel Date: Fri, 7 Jun 2024 13:16:23 +0530 Subject: [PATCH 008/130] adding the lib file to workflow to check will it work --- .github/workflows/python-workflow.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 0f46e122..8c04fa88 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -43,12 +43,14 @@ jobs: cd .. cd '$SAMPLE_FOLDER' pip install -e . + pip install lib #echo "Before Running the python file" #python samples/Invoicing/InvoiceSettings/get-invoice-settings.py #echo "Done with first sample" #python samples/Invoicing/InvoiceSettings/updateinvoicesettings.py #echo "After Running the Python File" - bash ./sample_code_runner.sh + #bash ./sample_code_runner.sh + python samples/authentication/sample_code/PutMethod.py - name: Upload the log files if: always() uses: actions/upload-artifact@v4 From 6b53d622c3557967d0fd352ed29a302f89e3e0fe Mon Sep 17 00:00:00 2001 From: aasgoel Date: Fri, 7 Jun 2024 13:46:16 +0530 Subject: [PATCH 009/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 8c04fa88..e8095b6d 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -43,14 +43,13 @@ jobs: cd .. cd '$SAMPLE_FOLDER' pip install -e . - pip install lib #echo "Before Running the python file" #python samples/Invoicing/InvoiceSettings/get-invoice-settings.py #echo "Done with first sample" #python samples/Invoicing/InvoiceSettings/updateinvoicesettings.py #echo "After Running the Python File" - #bash ./sample_code_runner.sh - python samples/authentication/sample_code/PutMethod.py + bash ./sample_code_runner.sh + #python samples/authentication/sample_code/PutMethod.py - name: Upload the log files if: always() uses: actions/upload-artifact@v4 From 074e5adbbee8b14caa5461ded5d4d01819fa695d Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 10:44:36 +0530 Subject: [PATCH 010/130] Made Changes to the workflow to run test report generation --- .github/workflows/python-workflow.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index e8095b6d..68897c04 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -36,7 +36,7 @@ jobs: python -m pip install --upgrade pip python -m venv ve source ve/bin/activate - - name: Building the projects + - name: Building the projects and running the Tests run: | cd '$CLIENT_FOLDER' pip install -e . @@ -50,11 +50,22 @@ jobs: #echo "After Running the Python File" bash ./sample_code_runner.sh #python samples/authentication/sample_code/PutMethod.py - - name: Upload the log files + - name: Installing required python libraries and running the python programs to generate pdf report + run : | + cd Validation + pip install json2html + pip install xhtml2pdf + pip install bs4 + python sample_code_log_processor.py -l ../../cybersource-rest-samples-python/output.log -o ../../cybersource-rest-samples-python/python_actual_results.json + python response_code_validator.py -e ExpectedResults/python_expected_results.json -a ../../cybersource-rest-samples-python/python_actual_results.json -o python_validation_results.json + python json_to_prettified_html.py -i python_validation_results.json -o python_validation_results.html + - name: Upload the log files and report pdf if: always() uses: actions/upload-artifact@v4 with: name: log-files - path: '$SAMPLE_FOLDER/output.log' + path: | + '$SAMPLE_FOLDER/output.log' + '$SAMPLE_FOLDER/Validation/python_validation_results.pdf' From 334249fd2a9776dc4e0e36859e874e4acd108f62 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 11:01:03 +0530 Subject: [PATCH 011/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 68897c04..d73b8a35 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -48,9 +48,10 @@ jobs: #echo "Done with first sample" #python samples/Invoicing/InvoiceSettings/updateinvoicesettings.py #echo "After Running the Python File" - bash ./sample_code_runner.sh + #bash ./sample_code_runner.sh #python samples/authentication/sample_code/PutMethod.py - name: Installing required python libraries and running the python programs to generate pdf report + working-directory: '$GITHUB_WORKSPACE/$SAMPLE_FOLDER' run : | cd Validation pip install json2html From 7722990d61525676c83b47425c8b34261f8cd6b7 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 11:05:08 +0530 Subject: [PATCH 012/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index d73b8a35..dd055ed4 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -51,8 +51,12 @@ jobs: #bash ./sample_code_runner.sh #python samples/authentication/sample_code/PutMethod.py - name: Installing required python libraries and running the python programs to generate pdf report - working-directory: '$GITHUB_WORKSPACE/$SAMPLE_FOLDER' + #working-directory: '$GITHUB_WORKSPACE/$SAMPLE_FOLDER' run : | + cd ../../ + cd '$CLIENT_FOLDER' + cd '$CLIENT_FOLDER' + cd '$SAMPLE_FOLDER' cd Validation pip install json2html pip install xhtml2pdf From 1c9aa9f532df4161f726926731af71aeec249389 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 11:07:44 +0530 Subject: [PATCH 013/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index dd055ed4..cb87ddc7 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -53,6 +53,7 @@ jobs: - name: Installing required python libraries and running the python programs to generate pdf report #working-directory: '$GITHUB_WORKSPACE/$SAMPLE_FOLDER' run : | + exit cd ../../ cd '$CLIENT_FOLDER' cd '$CLIENT_FOLDER' From 8067d5847195873ee704d8ede5e7c8dc8455392b Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 11:12:16 +0530 Subject: [PATCH 014/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index cb87ddc7..ce385d81 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -53,12 +53,9 @@ jobs: - name: Installing required python libraries and running the python programs to generate pdf report #working-directory: '$GITHUB_WORKSPACE/$SAMPLE_FOLDER' run : | + cd ~ + pwd exit - cd ../../ - cd '$CLIENT_FOLDER' - cd '$CLIENT_FOLDER' - cd '$SAMPLE_FOLDER' - cd Validation pip install json2html pip install xhtml2pdf pip install bs4 From 49578ec0660cccf958a10ec4cfd15ac15f262cd5 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 11:14:35 +0530 Subject: [PATCH 015/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index ce385d81..81217ee4 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -48,14 +48,15 @@ jobs: #echo "Done with first sample" #python samples/Invoicing/InvoiceSettings/updateinvoicesettings.py #echo "After Running the Python File" - #bash ./sample_code_runner.sh + bash ./sample_code_runner.sh #python samples/authentication/sample_code/PutMethod.py - name: Installing required python libraries and running the python programs to generate pdf report #working-directory: '$GITHUB_WORKSPACE/$SAMPLE_FOLDER' run : | cd ~ - pwd - exit + cd work/cybersource-rest-client-python/cybersource-rest-client-python + source ve/bin/activate + cd '$SAMPLE_FOLDER' pip install json2html pip install xhtml2pdf pip install bs4 From a1d8bdec6d6b61f9ee2684799aa9cc492edff8a9 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 11:30:36 +0530 Subject: [PATCH 016/130] removing the Comments and changing the directory to Validation --- .github/workflows/python-workflow.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 81217ee4..7c1838e3 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -9,8 +9,6 @@ jobs: SAMPLE_FOLDER: 'cybersource-rest-samples-python' runs-on: ubuntu-latest steps: - # - name: Code Checkout - # uses: actions/checkout@v4 - name: Making separate folders run: | rm -rf '$CLIENT_FOLDER' @@ -43,15 +41,8 @@ jobs: cd .. cd '$SAMPLE_FOLDER' pip install -e . - #echo "Before Running the python file" - #python samples/Invoicing/InvoiceSettings/get-invoice-settings.py - #echo "Done with first sample" - #python samples/Invoicing/InvoiceSettings/updateinvoicesettings.py - #echo "After Running the Python File" bash ./sample_code_runner.sh - #python samples/authentication/sample_code/PutMethod.py - name: Installing required python libraries and running the python programs to generate pdf report - #working-directory: '$GITHUB_WORKSPACE/$SAMPLE_FOLDER' run : | cd ~ cd work/cybersource-rest-client-python/cybersource-rest-client-python @@ -60,6 +51,7 @@ jobs: pip install json2html pip install xhtml2pdf pip install bs4 + cd Validation python sample_code_log_processor.py -l ../../cybersource-rest-samples-python/output.log -o ../../cybersource-rest-samples-python/python_actual_results.json python response_code_validator.py -e ExpectedResults/python_expected_results.json -a ../../cybersource-rest-samples-python/python_actual_results.json -o python_validation_results.json python json_to_prettified_html.py -i python_validation_results.json -o python_validation_results.html From b58beebc83638c7919d9526a1b6c59760b99560d Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 11:53:49 +0530 Subject: [PATCH 017/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 7c1838e3..e5fbd94f 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -3,7 +3,7 @@ on: push: jobs: - job-1: + job-linux: env: CLIENT_FOLDER: 'cybersource-rest-client-python' SAMPLE_FOLDER: 'cybersource-rest-samples-python' @@ -41,7 +41,7 @@ jobs: cd .. cd '$SAMPLE_FOLDER' pip install -e . - bash ./sample_code_runner.sh + #bash ./sample_code_runner.sh - name: Installing required python libraries and running the python programs to generate pdf report run : | cd ~ @@ -52,9 +52,20 @@ jobs: pip install xhtml2pdf pip install bs4 cd Validation - python sample_code_log_processor.py -l ../../cybersource-rest-samples-python/output.log -o ../../cybersource-rest-samples-python/python_actual_results.json - python response_code_validator.py -e ExpectedResults/python_expected_results.json -a ../../cybersource-rest-samples-python/python_actual_results.json -o python_validation_results.json - python json_to_prettified_html.py -i python_validation_results.json -o python_validation_results.html + pwd + ls + cd.. + pwd + ls + cd.. + pwd + ls + cd.. + pwd + ls + #python sample_code_log_processor.py -l ../../cybersource-rest-samples-python/output.log -o ../../cybersource-rest-samples-python/python_actual_results.json + #python response_code_validator.py -e ExpectedResults/python_expected_results.json -a ../../cybersource-rest-samples-python/python_actual_results.json -o python_validation_results.json + #python json_to_prettified_html.py -i python_validation_results.json -o python_validation_results.html - name: Upload the log files and report pdf if: always() uses: actions/upload-artifact@v4 From cb5c9ad3932c3a398881bfe69abbf2e63626014d Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 11:54:46 +0530 Subject: [PATCH 018/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index e5fbd94f..97dd1c8f 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -54,13 +54,13 @@ jobs: cd Validation pwd ls - cd.. + cd .. pwd ls - cd.. + cd .. pwd ls - cd.. + cd .. pwd ls #python sample_code_log_processor.py -l ../../cybersource-rest-samples-python/output.log -o ../../cybersource-rest-samples-python/python_actual_results.json From 204c1ee41e9b737e3f80e467c3b1dada3058d52f Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 12:00:30 +0530 Subject: [PATCH 019/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 97dd1c8f..3f1fd1f3 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -11,20 +11,20 @@ jobs: steps: - name: Making separate folders run: | - rm -rf '$CLIENT_FOLDER' - rm -rf '$SAMPLE_FOLDER' + rm -rf $CLIENT_FOLDER + rm -rf $SAMPLE_FOLDER mkdir $CLIENT_FOLDER $SAMPLE_FOLDER - name: Adding client uses: actions/checkout@v4 with: repository: 'CyberSource/cybersource-rest-client-python' - path: './$CLIENT_FOLDER' + path: $CLIENT_FOLDER - name: Adding sample uses: actions/checkout@v4 with: repository: 'CyberSource/cybersource-rest-samples-python' ref: 'testing-branch' - path: '$SAMPLE_FOLDER' + path: $SAMPLE_FOLDER - name: Install Python uses: actions/setup-python@v5 with: @@ -36,10 +36,10 @@ jobs: source ve/bin/activate - name: Building the projects and running the Tests run: | - cd '$CLIENT_FOLDER' + cd $CLIENT_FOLDER pip install -e . cd .. - cd '$SAMPLE_FOLDER' + cd $SAMPLE_FOLDER pip install -e . #bash ./sample_code_runner.sh - name: Installing required python libraries and running the python programs to generate pdf report @@ -47,7 +47,7 @@ jobs: cd ~ cd work/cybersource-rest-client-python/cybersource-rest-client-python source ve/bin/activate - cd '$SAMPLE_FOLDER' + cd $SAMPLE_FOLDER pip install json2html pip install xhtml2pdf pip install bs4 @@ -72,7 +72,7 @@ jobs: with: name: log-files path: | - '$SAMPLE_FOLDER/output.log' - '$SAMPLE_FOLDER/Validation/python_validation_results.pdf' + $SAMPLE_FOLDER/output.log + $SAMPLE_FOLDER/Validation/python_validation_results.pdf From f25115bcd6ed1ced5af5d7cffa5aed13ad0049aa Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 12:02:14 +0530 Subject: [PATCH 020/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 3f1fd1f3..d7fc9ac3 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -31,6 +31,8 @@ jobs: python-version: "3.10" - name: Set up virtual python environment run: | + ls + pwd python -m pip install --upgrade pip python -m venv ve source ve/bin/activate From 03011d0bfb8ecc244b1ac2692328db05064e4d25 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 12:06:17 +0530 Subject: [PATCH 021/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index d7fc9ac3..5082fdac 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -18,13 +18,13 @@ jobs: uses: actions/checkout@v4 with: repository: 'CyberSource/cybersource-rest-client-python' - path: $CLIENT_FOLDER + path: "$CLIENT_FOLDER" - name: Adding sample uses: actions/checkout@v4 with: repository: 'CyberSource/cybersource-rest-samples-python' ref: 'testing-branch' - path: $SAMPLE_FOLDER + path: "$SAMPLE_FOLDER" - name: Install Python uses: actions/setup-python@v5 with: @@ -38,6 +38,7 @@ jobs: source ve/bin/activate - name: Building the projects and running the Tests run: | + ls cd $CLIENT_FOLDER pip install -e . cd .. From 122ab44a6cf6d92f583ee165ee81a0fe877190b6 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 12:10:52 +0530 Subject: [PATCH 022/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 5082fdac..7a692a50 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -1,12 +1,11 @@ name: workflow cybersource-rest-client-python-test-run on: push: - +env: + CLIENT_FOLDER: 'cybersource-rest-client-python' + SAMPLE_FOLDER: 'cybersource-rest-samples-python' jobs: job-linux: - env: - CLIENT_FOLDER: 'cybersource-rest-client-python' - SAMPLE_FOLDER: 'cybersource-rest-samples-python' runs-on: ubuntu-latest steps: - name: Making separate folders From 703cb9b043d901fe58526e41a72c904b5095fe20 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 12:14:22 +0530 Subject: [PATCH 023/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 7a692a50..25f3ebe2 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -17,13 +17,13 @@ jobs: uses: actions/checkout@v4 with: repository: 'CyberSource/cybersource-rest-client-python' - path: "$CLIENT_FOLDER" + path: "${{env.CLIENT_FOLDER}}" - name: Adding sample uses: actions/checkout@v4 with: repository: 'CyberSource/cybersource-rest-samples-python' ref: 'testing-branch' - path: "$SAMPLE_FOLDER" + path: "${{env.SAMPLE_FOLDER}}" - name: Install Python uses: actions/setup-python@v5 with: From d9cb3f639edf5618e2d7e93edf07066ceb38fbee Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 12:20:57 +0530 Subject: [PATCH 024/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 25f3ebe2..e40034f7 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -30,14 +30,11 @@ jobs: python-version: "3.10" - name: Set up virtual python environment run: | - ls - pwd python -m pip install --upgrade pip python -m venv ve source ve/bin/activate - name: Building the projects and running the Tests run: | - ls cd $CLIENT_FOLDER pip install -e . cd .. @@ -54,18 +51,15 @@ jobs: pip install xhtml2pdf pip install bs4 cd Validation - pwd - ls cd .. - pwd - ls cd .. pwd ls - cd .. - pwd + cd $SAMPLE_FOLDER + echo "Print Sample Folder" ls - #python sample_code_log_processor.py -l ../../cybersource-rest-samples-python/output.log -o ../../cybersource-rest-samples-python/python_actual_results.json + echo hi >> output.log + python sample_code_log_processor.py -l ../../cybersource-rest-samples-python/output.log -o ../../cybersource-rest-samples-python/python_actual_results.json #python response_code_validator.py -e ExpectedResults/python_expected_results.json -a ../../cybersource-rest-samples-python/python_actual_results.json -o python_validation_results.json #python json_to_prettified_html.py -i python_validation_results.json -o python_validation_results.html - name: Upload the log files and report pdf From 94a8405dbda6514c1de4a9350580ac53fb0c27b5 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 12:22:38 +0530 Subject: [PATCH 025/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index e40034f7..0187dce7 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -59,6 +59,7 @@ jobs: echo "Print Sample Folder" ls echo hi >> output.log + cd Validation python sample_code_log_processor.py -l ../../cybersource-rest-samples-python/output.log -o ../../cybersource-rest-samples-python/python_actual_results.json #python response_code_validator.py -e ExpectedResults/python_expected_results.json -a ../../cybersource-rest-samples-python/python_actual_results.json -o python_validation_results.json #python json_to_prettified_html.py -i python_validation_results.json -o python_validation_results.html From 99ebdcbb097d82ef268571aee2003a980e7be31a Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 12:27:27 +0530 Subject: [PATCH 026/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 0187dce7..9ed5acc3 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -51,18 +51,9 @@ jobs: pip install xhtml2pdf pip install bs4 cd Validation - cd .. - cd .. - pwd - ls - cd $SAMPLE_FOLDER - echo "Print Sample Folder" - ls - echo hi >> output.log - cd Validation - python sample_code_log_processor.py -l ../../cybersource-rest-samples-python/output.log -o ../../cybersource-rest-samples-python/python_actual_results.json - #python response_code_validator.py -e ExpectedResults/python_expected_results.json -a ../../cybersource-rest-samples-python/python_actual_results.json -o python_validation_results.json - #python json_to_prettified_html.py -i python_validation_results.json -o python_validation_results.html + python sample_code_log_processor.py -l ../../$SAMPLE_FOLDER/output.log -o ../../$SAMPLE_FOLDER/python_actual_results.json + python response_code_validator.py -e ExpectedResults/python_expected_results.json -a ../../$SAMPLE_FOLDER/python_actual_results.json -o python_validation_results.json + python json_to_prettified_html.py -i python_validation_results.json -o python_validation_results.html - name: Upload the log files and report pdf if: always() uses: actions/upload-artifact@v4 From 632674fa50b3cbb6226ae43bef28d06f12697525 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 12:28:37 +0530 Subject: [PATCH 027/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 9ed5acc3..395223dd 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -50,6 +50,7 @@ jobs: pip install json2html pip install xhtml2pdf pip install bs4 + echo hi >> output.log cd Validation python sample_code_log_processor.py -l ../../$SAMPLE_FOLDER/output.log -o ../../$SAMPLE_FOLDER/python_actual_results.json python response_code_validator.py -e ExpectedResults/python_expected_results.json -a ../../$SAMPLE_FOLDER/python_actual_results.json -o python_validation_results.json From e02c3f8cc96843a2a74ff68ceb5ffca08002deb7 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 12:30:36 +0530 Subject: [PATCH 028/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 395223dd..88da97ea 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -61,7 +61,7 @@ jobs: with: name: log-files path: | - $SAMPLE_FOLDER/output.log - $SAMPLE_FOLDER/Validation/python_validation_results.pdf + "${{env.SAMPLE_FOLDER}}/output.log" + "${{env.SAMPLE_FOLDER}}/Validation/python_validation_results.pdf" From 8e42398f3b2183e9a3b98c98b5fd0d3246d5e621 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 12:32:39 +0530 Subject: [PATCH 029/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 88da97ea..02f9e403 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -17,13 +17,13 @@ jobs: uses: actions/checkout@v4 with: repository: 'CyberSource/cybersource-rest-client-python' - path: "${{env.CLIENT_FOLDER}}" + path: ${{env.CLIENT_FOLDER}} - name: Adding sample uses: actions/checkout@v4 with: repository: 'CyberSource/cybersource-rest-samples-python' ref: 'testing-branch' - path: "${{env.SAMPLE_FOLDER}}" + path: ${{env.SAMPLE_FOLDER}} - name: Install Python uses: actions/setup-python@v5 with: @@ -61,7 +61,7 @@ jobs: with: name: log-files path: | - "${{env.SAMPLE_FOLDER}}/output.log" - "${{env.SAMPLE_FOLDER}}/Validation/python_validation_results.pdf" + ${{env.SAMPLE_FOLDER}}/output.log + ${{env.SAMPLE_FOLDER}}/Validation/python_validation_results.pdf From 64215bba337413b3272a9ff6aa2b4a49b105ed6c Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 12:35:25 +0530 Subject: [PATCH 030/130] running the samples and generating the actual report --- .github/workflows/python-workflow.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 02f9e403..b70eb09b 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -40,7 +40,7 @@ jobs: cd .. cd $SAMPLE_FOLDER pip install -e . - #bash ./sample_code_runner.sh + bash ./sample_code_runner.sh - name: Installing required python libraries and running the python programs to generate pdf report run : | cd ~ @@ -50,7 +50,6 @@ jobs: pip install json2html pip install xhtml2pdf pip install bs4 - echo hi >> output.log cd Validation python sample_code_log_processor.py -l ../../$SAMPLE_FOLDER/output.log -o ../../$SAMPLE_FOLDER/python_actual_results.json python response_code_validator.py -e ExpectedResults/python_expected_results.json -a ../../$SAMPLE_FOLDER/python_actual_results.json -o python_validation_results.json From d5a00e7657e303387f13c2ac79de3ddc10566e0d Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 13:46:15 +0530 Subject: [PATCH 031/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index b70eb09b..249aae21 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -6,6 +6,9 @@ env: SAMPLE_FOLDER: 'cybersource-rest-samples-python' jobs: job-linux: + strategy: + matrix: + operating-system: [ubuntu-latest,windows-latest] runs-on: ubuntu-latest steps: - name: Making separate folders @@ -63,4 +66,3 @@ jobs: ${{env.SAMPLE_FOLDER}}/output.log ${{env.SAMPLE_FOLDER}}/Validation/python_validation_results.pdf - From 4cc720b7df4830cf134c32bbaee1d1e6a68436cc Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 13:54:48 +0530 Subject: [PATCH 032/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 249aae21..0945b8d1 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -9,7 +9,7 @@ jobs: strategy: matrix: operating-system: [ubuntu-latest,windows-latest] - runs-on: ubuntu-latest + runs-on: ${{matrix.operating-system}} steps: - name: Making separate folders run: | @@ -61,7 +61,7 @@ jobs: if: always() uses: actions/upload-artifact@v4 with: - name: log-files + name: log-files-${{matrix.operating-system}} path: | ${{env.SAMPLE_FOLDER}}/output.log ${{env.SAMPLE_FOLDER}}/Validation/python_validation_results.pdf From 85edc9f2d93caa6e4e36b25798852dec99908bea Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 14:44:02 +0530 Subject: [PATCH 033/130] Create python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/workflows/python-workflow-window.yml diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml new file mode 100644 index 00000000..3d332f6e --- /dev/null +++ b/.github/workflows/python-workflow-window.yml @@ -0,0 +1,12 @@ +name: workflow cybersource-rest-client-python-test-run +on: + push: +env: + CLIENT_FOLDER: 'cybersource-rest-client-python' + SAMPLE_FOLDER: 'cybersource-rest-samples-python' +jobs: + job-windows: + runs-on: windows-latest + steps: + - name: Print the Current Directory + run : cd From dd9e8cefd93b4ec503441f06d04c9081916dca79 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 14:57:48 +0530 Subject: [PATCH 034/130] Update python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index 3d332f6e..a3b94a8c 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -8,5 +8,5 @@ jobs: job-windows: runs-on: windows-latest steps: - - name: Print the Current Directory - run : cd + - name: Check the git Version + run : git --version From ff55ce3a09689c0599a117eacf4a2733a0177ed9 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 14:59:16 +0530 Subject: [PATCH 035/130] Update python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index a3b94a8c..4ede3662 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -9,4 +9,7 @@ jobs: runs-on: windows-latest steps: - name: Check the git Version - run : git --version + run : | + cd + pwd + git --version From f9e0d14c1ed3f8beb2feaf4a0ac141fc61ead4a0 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 15:03:56 +0530 Subject: [PATCH 036/130] Update python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index 4ede3662..5e69517f 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -10,6 +10,6 @@ jobs: steps: - name: Check the git Version run : | - cd + echo "HI" pwd git --version From 6d8d4fa5035b8f1300a14877391dcd0104b866cd Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 15:05:44 +0530 Subject: [PATCH 037/130] Update python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index 5e69517f..c784fbf7 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -13,3 +13,5 @@ jobs: echo "HI" pwd git --version + cd .. + pwd From b982bae4c437ca3227074d8d0817b020b207eb42 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 15:06:45 +0530 Subject: [PATCH 038/130] Update python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index c784fbf7..d163f619 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -15,3 +15,5 @@ jobs: git --version cd .. pwd + cd ~ + pwd From 0b5a470343252137345f4266bedb151f28822012 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 15:08:22 +0530 Subject: [PATCH 039/130] Update python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index d163f619..a70df0e4 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -17,3 +17,4 @@ jobs: pwd cd ~ pwd + Get-Location \ No newline at end of file From e2289ba5d4501ac350118ecc454ff937fbd149ad Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 15:11:31 +0530 Subject: [PATCH 040/130] Update python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 61 +++++++++++++++++--- 1 file changed, 53 insertions(+), 8 deletions(-) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index a70df0e4..e187851d 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -8,13 +8,58 @@ jobs: job-windows: runs-on: windows-latest steps: - - name: Check the git Version - run : | - echo "HI" - pwd - git --version + - name: Making separate folders + run: | + rm -rf $CLIENT_FOLDER + rm -rf $SAMPLE_FOLDER + mkdir $CLIENT_FOLDER $SAMPLE_FOLDER + - name: Adding client + uses: actions/checkout@v4 + with: + repository: 'CyberSource/cybersource-rest-client-python' + path: ${{env.CLIENT_FOLDER}} + - name: Adding sample + uses: actions/checkout@v4 + with: + repository: 'CyberSource/cybersource-rest-samples-python' + ref: 'testing-branch' + path: ${{env.SAMPLE_FOLDER}} + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: "3.10" + - name: Set up virtual python environment + run: | + python -m pip install --upgrade pip + python -m venv ve + source ve/bin/activate + - name: Building the projects and running the Tests + run: | + cd $CLIENT_FOLDER + pip install -e . cd .. - pwd + cd $SAMPLE_FOLDER + pip install -e . + bash ./sample_code_runner.sh + - name: Installing required python libraries and running the python programs to generate pdf report + run : | cd ~ - pwd - Get-Location \ No newline at end of file + cd work/cybersource-rest-client-python/cybersource-rest-client-python + source ve/bin/activate + cd $SAMPLE_FOLDER + pip install json2html + pip install xhtml2pdf + pip install bs4 + cd Validation + python sample_code_log_processor.py -l ../../$SAMPLE_FOLDER/output.log -o ../../$SAMPLE_FOLDER/python_actual_results.json + python response_code_validator.py -e ExpectedResults/python_expected_results.json -a ../../$SAMPLE_FOLDER/python_actual_results.json -o python_validation_results.json + python json_to_prettified_html.py -i python_validation_results.json -o python_validation_results.html + - name: Upload the log files and report pdf + if: always() + uses: actions/upload-artifact@v4 + with: + name: log-files-windows + path: | + ${{env.SAMPLE_FOLDER}}/output.log + ${{env.SAMPLE_FOLDER}}/Validation/python_validation_results.pdf + From e89d0ce03c998982f0a52b3c526e765da6c2327b Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 15:13:23 +0530 Subject: [PATCH 041/130] Update python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index e187851d..72c77639 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -10,8 +10,6 @@ jobs: steps: - name: Making separate folders run: | - rm -rf $CLIENT_FOLDER - rm -rf $SAMPLE_FOLDER mkdir $CLIENT_FOLDER $SAMPLE_FOLDER - name: Adding client uses: actions/checkout@v4 From 80209da0558d61a91573acd54a6b3ff32daa43f1 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 15:15:20 +0530 Subject: [PATCH 042/130] Update python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index 72c77639..26466049 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -10,7 +10,10 @@ jobs: steps: - name: Making separate folders run: | + rm -rf $CLIENT_FOLDER + rm -rf $SAMPLE_FOLDER mkdir $CLIENT_FOLDER $SAMPLE_FOLDER + shell: bash - name: Adding client uses: actions/checkout@v4 with: @@ -31,6 +34,7 @@ jobs: python -m pip install --upgrade pip python -m venv ve source ve/bin/activate + shell: bash - name: Building the projects and running the Tests run: | cd $CLIENT_FOLDER @@ -39,6 +43,7 @@ jobs: cd $SAMPLE_FOLDER pip install -e . bash ./sample_code_runner.sh + shell: bash - name: Installing required python libraries and running the python programs to generate pdf report run : | cd ~ @@ -52,6 +57,7 @@ jobs: python sample_code_log_processor.py -l ../../$SAMPLE_FOLDER/output.log -o ../../$SAMPLE_FOLDER/python_actual_results.json python response_code_validator.py -e ExpectedResults/python_expected_results.json -a ../../$SAMPLE_FOLDER/python_actual_results.json -o python_validation_results.json python json_to_prettified_html.py -i python_validation_results.json -o python_validation_results.html + shell: bash - name: Upload the log files and report pdf if: always() uses: actions/upload-artifact@v4 From e987ee62801e35bacca6ca9baa0af73dd7f1ad9f Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 15:20:57 +0530 Subject: [PATCH 043/130] Update python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 67 ++++++++++---------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index 26466049..ae8e7a8b 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -33,37 +33,38 @@ jobs: run: | python -m pip install --upgrade pip python -m venv ve - source ve/bin/activate - shell: bash - - name: Building the projects and running the Tests - run: | - cd $CLIENT_FOLDER - pip install -e . - cd .. - cd $SAMPLE_FOLDER - pip install -e . - bash ./sample_code_runner.sh - shell: bash - - name: Installing required python libraries and running the python programs to generate pdf report - run : | - cd ~ - cd work/cybersource-rest-client-python/cybersource-rest-client-python - source ve/bin/activate - cd $SAMPLE_FOLDER - pip install json2html - pip install xhtml2pdf - pip install bs4 - cd Validation - python sample_code_log_processor.py -l ../../$SAMPLE_FOLDER/output.log -o ../../$SAMPLE_FOLDER/python_actual_results.json - python response_code_validator.py -e ExpectedResults/python_expected_results.json -a ../../$SAMPLE_FOLDER/python_actual_results.json -o python_validation_results.json - python json_to_prettified_html.py -i python_validation_results.json -o python_validation_results.html - shell: bash - - name: Upload the log files and report pdf - if: always() - uses: actions/upload-artifact@v4 - with: - name: log-files-windows - path: | - ${{env.SAMPLE_FOLDER}}/output.log - ${{env.SAMPLE_FOLDER}}/Validation/python_validation_results.pdf + source + # ve/bin/activate + # shell: bash + # - name: Building the projects and running the Tests + # run: | + # cd $CLIENT_FOLDER + # pip install -e . + # cd .. + # cd $SAMPLE_FOLDER + # pip install -e . + # bash ./sample_code_runner.sh + # shell: bash + # - name: Installing required python libraries and running the python programs to generate pdf report + # run : | + # cd ~ + # cd work/cybersource-rest-client-python/cybersource-rest-client-python + # source ve/bin/activate + # cd $SAMPLE_FOLDER + # pip install json2html + # pip install xhtml2pdf + # pip install bs4 + # cd Validation + # python sample_code_log_processor.py -l ../../$SAMPLE_FOLDER/output.log -o ../../$SAMPLE_FOLDER/python_actual_results.json + # python response_code_validator.py -e ExpectedResults/python_expected_results.json -a ../../$SAMPLE_FOLDER/python_actual_results.json -o python_validation_results.json + # python json_to_prettified_html.py -i python_validation_results.json -o python_validation_results.html + # shell: bash + # - name: Upload the log files and report pdf + # if: always() + # uses: actions/upload-artifact@v4 + # with: + # name: log-files-windows + # path: | + # ${{env.SAMPLE_FOLDER}}/output.log + # ${{env.SAMPLE_FOLDER}}/Validation/python_validation_results.pdf From b54c7ef83d836e478dae946bb6d0d8dbafa30464 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 15:23:04 +0530 Subject: [PATCH 044/130] Update python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index ae8e7a8b..46c76625 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -33,7 +33,8 @@ jobs: run: | python -m pip install --upgrade pip python -m venv ve - source + pwd + shell: bash # ve/bin/activate # shell: bash # - name: Building the projects and running the Tests From 5bb5bee5490a7b1a90f2a3f91c7f523789dac53e Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 15:24:25 +0530 Subject: [PATCH 045/130] Update python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index 46c76625..ca0ac287 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -33,7 +33,7 @@ jobs: run: | python -m pip install --upgrade pip python -m venv ve - pwd + ls shell: bash # ve/bin/activate # shell: bash From cdcffddb294ab1abaa7af1e155e9891bc71eae29 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 15:26:17 +0530 Subject: [PATCH 046/130] Update python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 24 +++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index ca0ac287..07094ba9 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -14,17 +14,17 @@ jobs: rm -rf $SAMPLE_FOLDER mkdir $CLIENT_FOLDER $SAMPLE_FOLDER shell: bash - - name: Adding client - uses: actions/checkout@v4 - with: - repository: 'CyberSource/cybersource-rest-client-python' - path: ${{env.CLIENT_FOLDER}} - - name: Adding sample - uses: actions/checkout@v4 - with: - repository: 'CyberSource/cybersource-rest-samples-python' - ref: 'testing-branch' - path: ${{env.SAMPLE_FOLDER}} + # - name: Adding client + # uses: actions/checkout@v4 + # with: + # repository: 'CyberSource/cybersource-rest-client-python' + # path: ${{env.CLIENT_FOLDER}} + # - name: Adding sample + # uses: actions/checkout@v4 + # with: + # repository: 'CyberSource/cybersource-rest-samples-python' + # ref: 'testing-branch' + # path: ${{env.SAMPLE_FOLDER}} - name: Install Python uses: actions/setup-python@v5 with: @@ -34,6 +34,8 @@ jobs: python -m pip install --upgrade pip python -m venv ve ls + cd ve + ls shell: bash # ve/bin/activate # shell: bash From 8bdaf8c30f74b2d86891469f7c1b591077dc0fa2 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 15:28:16 +0530 Subject: [PATCH 047/130] Update python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index 07094ba9..c810239e 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -34,7 +34,7 @@ jobs: python -m pip install --upgrade pip python -m venv ve ls - cd ve + cd ve/Scripts ls shell: bash # ve/bin/activate From 0c242d9421e144af9605a907a0f12351833d072e Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 15:31:19 +0530 Subject: [PATCH 048/130] Update python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index c810239e..170b1df8 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -34,7 +34,7 @@ jobs: python -m pip install --upgrade pip python -m venv ve ls - cd ve/Scripts + cd ve/Scripts/activate.bat ls shell: bash # ve/bin/activate From 94250cafb3d6b2639b770b42bb74645d7b80f7f4 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 15:32:47 +0530 Subject: [PATCH 049/130] Update python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index 170b1df8..9f4785e1 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -34,8 +34,7 @@ jobs: python -m pip install --upgrade pip python -m venv ve ls - cd ve/Scripts/activate.bat - ls + source ve/Scripts/activate.bat shell: bash # ve/bin/activate # shell: bash From ce2630a695de9bd4b0afb0859aef1d4e4560d5a2 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 15:35:13 +0530 Subject: [PATCH 050/130] Update python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index 9f4785e1..7f605fd5 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -34,7 +34,7 @@ jobs: python -m pip install --upgrade pip python -m venv ve ls - source ve/Scripts/activate.bat + source ve/Scripts/activate shell: bash # ve/bin/activate # shell: bash From dcfe2887a54d4ae631b54e905a34cc23d67392a6 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 15:37:18 +0530 Subject: [PATCH 051/130] Update python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index 7f605fd5..9185565c 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -33,20 +33,20 @@ jobs: run: | python -m pip install --upgrade pip python -m venv ve - ls + #ls source ve/Scripts/activate shell: bash # ve/bin/activate # shell: bash - # - name: Building the projects and running the Tests - # run: | - # cd $CLIENT_FOLDER - # pip install -e . - # cd .. - # cd $SAMPLE_FOLDER - # pip install -e . - # bash ./sample_code_runner.sh - # shell: bash + - name: Building the projects and running the Tests + run: | + cd $CLIENT_FOLDER + pip install -e . + cd .. + cd $SAMPLE_FOLDER + pip install -e . + bash ./sample_code_runner.sh + shell: bash # - name: Installing required python libraries and running the python programs to generate pdf report # run : | # cd ~ From b1439972e54dd0332dd2e314e685fe73f25000a6 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 15:39:13 +0530 Subject: [PATCH 052/130] Update python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 22 ++++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index 9185565c..d5cdb146 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -14,17 +14,17 @@ jobs: rm -rf $SAMPLE_FOLDER mkdir $CLIENT_FOLDER $SAMPLE_FOLDER shell: bash - # - name: Adding client - # uses: actions/checkout@v4 - # with: - # repository: 'CyberSource/cybersource-rest-client-python' - # path: ${{env.CLIENT_FOLDER}} - # - name: Adding sample - # uses: actions/checkout@v4 - # with: - # repository: 'CyberSource/cybersource-rest-samples-python' - # ref: 'testing-branch' - # path: ${{env.SAMPLE_FOLDER}} + - name: Adding client + uses: actions/checkout@v4 + with: + repository: 'CyberSource/cybersource-rest-client-python' + path: ${{env.CLIENT_FOLDER}} + - name: Adding sample + uses: actions/checkout@v4 + with: + repository: 'CyberSource/cybersource-rest-samples-python' + ref: 'testing-branch' + path: ${{env.SAMPLE_FOLDER}} - name: Install Python uses: actions/setup-python@v5 with: From f6ef1e1da9db5396798603fc15cf62e140086442 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 15:48:39 +0530 Subject: [PATCH 053/130] Update python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index d5cdb146..ce3dd682 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -47,9 +47,10 @@ jobs: pip install -e . bash ./sample_code_runner.sh shell: bash - # - name: Installing required python libraries and running the python programs to generate pdf report - # run : | - # cd ~ + - name: Installing required python libraries and running the python programs to generate pdf report + run : | + pwd + ls # cd work/cybersource-rest-client-python/cybersource-rest-client-python # source ve/bin/activate # cd $SAMPLE_FOLDER From 8bddbf572eef1b7160fd7eebdcd4bb4470976e0b Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 15:51:24 +0530 Subject: [PATCH 054/130] Update python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index ce3dd682..02288332 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -45,12 +45,18 @@ jobs: cd .. cd $SAMPLE_FOLDER pip install -e . - bash ./sample_code_runner.sh + #bash ./sample_code_runner.sh shell: bash - name: Installing required python libraries and running the python programs to generate pdf report run : | - pwd - ls + cd .. + source ve/Scripts/activate + cd $SAMPLE_FOLDER + pip install json2html + pip install xhtml2pdf + pip install bs4 + shell: bash + # cd work/cybersource-rest-client-python/cybersource-rest-client-python # source ve/bin/activate # cd $SAMPLE_FOLDER From 5ea344e5d1261dc6e3218196768c4bb1ca392293 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 15:54:43 +0530 Subject: [PATCH 055/130] Update python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index 02288332..9667642f 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -49,12 +49,13 @@ jobs: shell: bash - name: Installing required python libraries and running the python programs to generate pdf report run : | - cd .. - source ve/Scripts/activate - cd $SAMPLE_FOLDER - pip install json2html - pip install xhtml2pdf - pip install bs4 + pwd + # cd .. + # source ve/Scripts/activate + # cd $SAMPLE_FOLDER + # pip install json2html + # pip install xhtml2pdf + # pip install bs4 shell: bash # cd work/cybersource-rest-client-python/cybersource-rest-client-python From 8873ed62c6896c0ed219814fc02d676ccad7882d Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 15:58:46 +0530 Subject: [PATCH 056/130] Update python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index 9667642f..c3b6f8ee 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -45,11 +45,15 @@ jobs: cd .. cd $SAMPLE_FOLDER pip install -e . - #bash ./sample_code_runner.sh + pwd + bash ./sample_code_runner.sh shell: bash - name: Installing required python libraries and running the python programs to generate pdf report run : | pwd + cd ~ + pwd + ls # cd .. # source ve/Scripts/activate # cd $SAMPLE_FOLDER From 1277a3d7e8bf0c16a762aa8abea3faef977f6e3f Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 16:09:55 +0530 Subject: [PATCH 057/130] Update python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 47 +++++++------------- 1 file changed, 17 insertions(+), 30 deletions(-) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index c3b6f8ee..cb8109ab 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -50,35 +50,22 @@ jobs: shell: bash - name: Installing required python libraries and running the python programs to generate pdf report run : | - pwd - cd ~ - pwd - ls - # cd .. - # source ve/Scripts/activate - # cd $SAMPLE_FOLDER - # pip install json2html - # pip install xhtml2pdf - # pip install bs4 + source ve/Scripts/activate + cd $SAMPLE_FOLDER + pip install json2html + pip install xhtml2pdf + pip install bs4 + cd Validation + python sample_code_log_processor.py -l ../../$SAMPLE_FOLDER/output.log -o ../../$SAMPLE_FOLDER/python_actual_results.json + python response_code_validator.py -e ExpectedResults/python_expected_results.json -a ../../$SAMPLE_FOLDER/python_actual_results.json -o python_validation_results.json + python json_to_prettified_html.py -i python_validation_results.json -o python_validation_results.html shell: bash - - # cd work/cybersource-rest-client-python/cybersource-rest-client-python - # source ve/bin/activate - # cd $SAMPLE_FOLDER - # pip install json2html - # pip install xhtml2pdf - # pip install bs4 - # cd Validation - # python sample_code_log_processor.py -l ../../$SAMPLE_FOLDER/output.log -o ../../$SAMPLE_FOLDER/python_actual_results.json - # python response_code_validator.py -e ExpectedResults/python_expected_results.json -a ../../$SAMPLE_FOLDER/python_actual_results.json -o python_validation_results.json - # python json_to_prettified_html.py -i python_validation_results.json -o python_validation_results.html - # shell: bash - # - name: Upload the log files and report pdf - # if: always() - # uses: actions/upload-artifact@v4 - # with: - # name: log-files-windows - # path: | - # ${{env.SAMPLE_FOLDER}}/output.log - # ${{env.SAMPLE_FOLDER}}/Validation/python_validation_results.pdf + - name: Upload the log files and report pdf + if: always() + uses: actions/upload-artifact@v4 + with: + name: log-files-windows + path: | + ${{env.SAMPLE_FOLDER}}/output.log + ${{env.SAMPLE_FOLDER}}/Validation/python_validation_results.pdf From 85cdf481e9614453c11764e8afe7ebdbf7d145a9 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 16:30:17 +0530 Subject: [PATCH 058/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 0945b8d1..4fabebe5 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -8,7 +8,7 @@ jobs: job-linux: strategy: matrix: - operating-system: [ubuntu-latest,windows-latest] + operating-system: [ubuntu-latest,macos-latest] runs-on: ${{matrix.operating-system}} steps: - name: Making separate folders @@ -65,4 +65,3 @@ jobs: path: | ${{env.SAMPLE_FOLDER}}/output.log ${{env.SAMPLE_FOLDER}}/Validation/python_validation_results.pdf - From 18a539bc069ac265129f8a255775e168f53eff76 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 22:55:59 +0530 Subject: [PATCH 059/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 4fabebe5..2ae90e8e 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -46,9 +46,9 @@ jobs: bash ./sample_code_runner.sh - name: Installing required python libraries and running the python programs to generate pdf report run : | - cd ~ - cd work/cybersource-rest-client-python/cybersource-rest-client-python - source ve/bin/activate + # cd ~ + # cd work/cybersource-rest-client-python/cybersource-rest-client-python + # source ve/bin/activate cd $SAMPLE_FOLDER pip install json2html pip install xhtml2pdf From 82d00f48578db45c886db9cf93c7c11cbc75bb3d Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 23:31:26 +0530 Subject: [PATCH 060/130] Changed the Worflow files --- .github/workflows/python-workflow-window.yml | 33 ++++++++++++++------ .github/workflows/python-workflow.yml | 5 ++- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index cb8109ab..64be28a6 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -5,8 +5,12 @@ env: CLIENT_FOLDER: 'cybersource-rest-client-python' SAMPLE_FOLDER: 'cybersource-rest-samples-python' jobs: - job-windows: - runs-on: windows-latest + complete-job: + strategy: + matrix: + operating-system: [ubuntu-latest,macos-latest] + pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12'] + runs-on: ${{matrix.operating-system}} steps: - name: Making separate folders run: | @@ -28,16 +32,21 @@ jobs: - name: Install Python uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: ${{matrix.pyth-version}} - name: Set up virtual python environment + if: ${{matrix.operating-system == 'windows-latest' }} run: | python -m pip install --upgrade pip python -m venv ve - #ls source ve/Scripts/activate shell: bash - # ve/bin/activate - # shell: bash + - name: Set up virtual python environment + if: ${{matrix.operating-system != 'windows-latest' }} + run: | + python -m pip install --upgrade pip + python -m venv ve + source ve/bin/activate + shell: bash - name: Building the projects and running the Tests run: | cd $CLIENT_FOLDER @@ -45,12 +54,18 @@ jobs: cd .. cd $SAMPLE_FOLDER pip install -e . - pwd bash ./sample_code_runner.sh shell: bash + - name : Activating the Virtual Env non windows + if: ${{matrix.operating-system != 'windows-latest' }} + run: source ve/bin/activate + shell: bash + - name : Activating the Virtual Env for windows + if: ${{matrix.operating-system == 'windows-latest' }} + run: source ve/Scripts/activate + shell: bash - name: Installing required python libraries and running the python programs to generate pdf report run : | - source ve/Scripts/activate cd $SAMPLE_FOLDER pip install json2html pip install xhtml2pdf @@ -64,7 +79,7 @@ jobs: if: always() uses: actions/upload-artifact@v4 with: - name: log-files-windows + name: log-files-${{matrix.operating-system}}-ver${{matrix.pyth-version}} path: | ${{env.SAMPLE_FOLDER}}/output.log ${{env.SAMPLE_FOLDER}}/Validation/python_validation_results.pdf diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 2ae90e8e..8c08dd8f 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -9,6 +9,7 @@ jobs: strategy: matrix: operating-system: [ubuntu-latest,macos-latest] + pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12'] runs-on: ${{matrix.operating-system}} steps: - name: Making separate folders @@ -46,9 +47,7 @@ jobs: bash ./sample_code_runner.sh - name: Installing required python libraries and running the python programs to generate pdf report run : | - # cd ~ - # cd work/cybersource-rest-client-python/cybersource-rest-client-python - # source ve/bin/activate + source ve/bin/activate cd $SAMPLE_FOLDER pip install json2html pip install xhtml2pdf From 1066d6572d8978b7f3c686cf4ac3d666ed222438 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 23:33:57 +0530 Subject: [PATCH 061/130] Update python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index 64be28a6..49d14698 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -8,8 +8,8 @@ jobs: complete-job: strategy: matrix: - operating-system: [ubuntu-latest,macos-latest] - pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12'] + operating-system: [ubuntu-latest,macos-latest,windows-latest] + pyth-version: ['3.9','3.10','3.11','3.12'] runs-on: ${{matrix.operating-system}} steps: - name: Making separate folders From c235dcf6352d7d7242111b4c55ebeab2b3aa018b Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 23:48:03 +0530 Subject: [PATCH 062/130] adding always to ensure that the other runners don't stop running --- .github/workflows/python-workflow-window.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index 49d14698..281e05e9 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -6,6 +6,7 @@ env: SAMPLE_FOLDER: 'cybersource-rest-samples-python' jobs: complete-job: + if: always() strategy: matrix: operating-system: [ubuntu-latest,macos-latest,windows-latest] @@ -76,7 +77,6 @@ jobs: python json_to_prettified_html.py -i python_validation_results.json -o python_validation_results.html shell: bash - name: Upload the log files and report pdf - if: always() uses: actions/upload-artifact@v4 with: name: log-files-${{matrix.operating-system}}-ver${{matrix.pyth-version}} From cadf486eb71590a7fe47c3513bebbace209bb94e Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 10 Jun 2024 23:57:51 +0530 Subject: [PATCH 063/130] Update python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index 281e05e9..172eab6c 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -10,7 +10,7 @@ jobs: strategy: matrix: operating-system: [ubuntu-latest,macos-latest,windows-latest] - pyth-version: ['3.9','3.10','3.11','3.12'] + pyth-version: ['3.9','3.10','3.11','3.12','3.8'] runs-on: ${{matrix.operating-system}} steps: - name: Making separate folders @@ -83,4 +83,3 @@ jobs: path: | ${{env.SAMPLE_FOLDER}}/output.log ${{env.SAMPLE_FOLDER}}/Validation/python_validation_results.pdf - From cc5f142c396830e22802cd9ad53bae153bd9291f Mon Sep 17 00:00:00 2001 From: aasgoel Date: Tue, 11 Jun 2024 00:12:51 +0530 Subject: [PATCH 064/130] Update python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index 172eab6c..8b9cd822 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -10,7 +10,7 @@ jobs: strategy: matrix: operating-system: [ubuntu-latest,macos-latest,windows-latest] - pyth-version: ['3.9','3.10','3.11','3.12','3.8'] + pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12',] runs-on: ${{matrix.operating-system}} steps: - name: Making separate folders From 622e56b0c0cbab18671876265bc88595f9ea6d00 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Tue, 11 Jun 2024 00:17:17 +0530 Subject: [PATCH 065/130] Update python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index 8b9cd822..d14d3480 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -12,6 +12,7 @@ jobs: operating-system: [ubuntu-latest,macos-latest,windows-latest] pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12',] runs-on: ${{matrix.operating-system}} + continue-on-error: true steps: - name: Making separate folders run: | From 5ddeb5a411b3ad0491739eb78fbec573541c9a0f Mon Sep 17 00:00:00 2001 From: aasgoel Date: Tue, 11 Jun 2024 09:48:09 +0530 Subject: [PATCH 066/130] Update python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index d14d3480..501eb917 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -6,11 +6,13 @@ env: SAMPLE_FOLDER: 'cybersource-rest-samples-python' jobs: complete-job: - if: always() + defaults: + run: + shell: bash strategy: matrix: operating-system: [ubuntu-latest,macos-latest,windows-latest] - pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12',] + pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12'] runs-on: ${{matrix.operating-system}} continue-on-error: true steps: @@ -19,7 +21,6 @@ jobs: rm -rf $CLIENT_FOLDER rm -rf $SAMPLE_FOLDER mkdir $CLIENT_FOLDER $SAMPLE_FOLDER - shell: bash - name: Adding client uses: actions/checkout@v4 with: @@ -41,14 +42,12 @@ jobs: python -m pip install --upgrade pip python -m venv ve source ve/Scripts/activate - shell: bash - name: Set up virtual python environment if: ${{matrix.operating-system != 'windows-latest' }} run: | python -m pip install --upgrade pip python -m venv ve source ve/bin/activate - shell: bash - name: Building the projects and running the Tests run: | cd $CLIENT_FOLDER @@ -57,15 +56,12 @@ jobs: cd $SAMPLE_FOLDER pip install -e . bash ./sample_code_runner.sh - shell: bash - name : Activating the Virtual Env non windows if: ${{matrix.operating-system != 'windows-latest' }} run: source ve/bin/activate - shell: bash - name : Activating the Virtual Env for windows if: ${{matrix.operating-system == 'windows-latest' }} run: source ve/Scripts/activate - shell: bash - name: Installing required python libraries and running the python programs to generate pdf report run : | cd $SAMPLE_FOLDER @@ -76,11 +72,10 @@ jobs: python sample_code_log_processor.py -l ../../$SAMPLE_FOLDER/output.log -o ../../$SAMPLE_FOLDER/python_actual_results.json python response_code_validator.py -e ExpectedResults/python_expected_results.json -a ../../$SAMPLE_FOLDER/python_actual_results.json -o python_validation_results.json python json_to_prettified_html.py -i python_validation_results.json -o python_validation_results.html - shell: bash - name: Upload the log files and report pdf uses: actions/upload-artifact@v4 with: name: log-files-${{matrix.operating-system}}-ver${{matrix.pyth-version}} path: | ${{env.SAMPLE_FOLDER}}/output.log - ${{env.SAMPLE_FOLDER}}/Validation/python_validation_results.pdf + ${{env.SAMPLE_FOLDER}}/Validation/python_validation_results.pdf \ No newline at end of file From 0664a4bbf51a09cf471ed62b994c32e0b0d556b5 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Tue, 11 Jun 2024 10:04:08 +0530 Subject: [PATCH 067/130] the version xhtml2pdf --- .github/workflows/python-workflow-window.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index 501eb917..e0862cb2 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -66,7 +66,7 @@ jobs: run : | cd $SAMPLE_FOLDER pip install json2html - pip install xhtml2pdf + pip install xhtml2pdf==0.2.5 pip install bs4 cd Validation python sample_code_log_processor.py -l ../../$SAMPLE_FOLDER/output.log -o ../../$SAMPLE_FOLDER/python_actual_results.json From b25225955a7db8eb5d8fab184f38c2a433653d8b Mon Sep 17 00:00:00 2001 From: aasgoel Date: Tue, 11 Jun 2024 10:47:25 +0530 Subject: [PATCH 068/130] Update python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index e0862cb2..28a54822 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -13,6 +13,22 @@ jobs: matrix: operating-system: [ubuntu-latest,macos-latest,windows-latest] pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12'] + include: + - operating-system: ubuntu-20.04 + pyth-version: '3.6' + - operating-system: macos-13 + pyth-version: '3.6' + - operating-system: macos-13 + pyth-version: '3.7' + exclude: + - operating-system: macos-latest + pyth-version: '3.6' + - operating-system: macos-latest + pyth-version: '3.7' + - operating-system: ubuntu-latest + pyth-version: '3.6' + - operating-system: windows-latest + pyth-version: '3.6' runs-on: ${{matrix.operating-system}} continue-on-error: true steps: @@ -24,7 +40,6 @@ jobs: - name: Adding client uses: actions/checkout@v4 with: - repository: 'CyberSource/cybersource-rest-client-python' path: ${{env.CLIENT_FOLDER}} - name: Adding sample uses: actions/checkout@v4 @@ -55,6 +70,7 @@ jobs: cd .. cd $SAMPLE_FOLDER pip install -e . + pip install requests munch bash ./sample_code_runner.sh - name : Activating the Virtual Env non windows if: ${{matrix.operating-system != 'windows-latest' }} @@ -66,7 +82,7 @@ jobs: run : | cd $SAMPLE_FOLDER pip install json2html - pip install xhtml2pdf==0.2.5 + pip install xhtml2pdf pip install bs4 cd Validation python sample_code_log_processor.py -l ../../$SAMPLE_FOLDER/output.log -o ../../$SAMPLE_FOLDER/python_actual_results.json From c9c5e9462cf4da775fbdaa0334b01d6130d7ba88 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Tue, 11 Jun 2024 10:56:10 +0530 Subject: [PATCH 069/130] Update python-workflow-window.yml --- .github/workflows/python-workflow-window.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index 28a54822..f6e307e2 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -70,7 +70,6 @@ jobs: cd .. cd $SAMPLE_FOLDER pip install -e . - pip install requests munch bash ./sample_code_runner.sh - name : Activating the Virtual Env non windows if: ${{matrix.operating-system != 'windows-latest' }} From af46ff6611204097db191c72cf0c606b72687f23 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 12 Jun 2024 11:34:14 +0530 Subject: [PATCH 070/130] deleted the Old Workflow and added workflow that runs for all three os --- .github/workflows/python-workflow-window.yml | 8 +-- .github/workflows/python-workflow.yml | 66 -------------------- 2 files changed, 4 insertions(+), 70 deletions(-) delete mode 100644 .github/workflows/python-workflow.yml diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow-window.yml index f6e307e2..f144f325 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow-window.yml @@ -21,13 +21,13 @@ jobs: - operating-system: macos-13 pyth-version: '3.7' exclude: - - operating-system: macos-latest + - operating-system: macos-latest # python 3.6 is unavailable for mac os latest becuase 3.6 doesnt support arm 64 pyth-version: '3.6' - - operating-system: macos-latest + - operating-system: macos-latest # python 3.7 is unavailable for mac os latest becuase 3.7 doesnt support arm 64 pyth-version: '3.7' - - operating-system: ubuntu-latest + - operating-system: ubuntu-latest # The version '3.6' with architecture 'x64' was not found for Ubuntu 22.04. pyth-version: '3.6' - - operating-system: windows-latest + - operating-system: windows-latest # The tests were run successfully but report generation was not possible as xhtml2pdf had issues with python 3.6,Fix :- the output log file can be used to generate the report on another runner with a python ver 3.8 and above pyth-version: '3.6' runs-on: ${{matrix.operating-system}} continue-on-error: true diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml deleted file mode 100644 index 8c08dd8f..00000000 --- a/.github/workflows/python-workflow.yml +++ /dev/null @@ -1,66 +0,0 @@ -name: workflow cybersource-rest-client-python-test-run -on: - push: -env: - CLIENT_FOLDER: 'cybersource-rest-client-python' - SAMPLE_FOLDER: 'cybersource-rest-samples-python' -jobs: - job-linux: - strategy: - matrix: - operating-system: [ubuntu-latest,macos-latest] - pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12'] - runs-on: ${{matrix.operating-system}} - steps: - - name: Making separate folders - run: | - rm -rf $CLIENT_FOLDER - rm -rf $SAMPLE_FOLDER - mkdir $CLIENT_FOLDER $SAMPLE_FOLDER - - name: Adding client - uses: actions/checkout@v4 - with: - repository: 'CyberSource/cybersource-rest-client-python' - path: ${{env.CLIENT_FOLDER}} - - name: Adding sample - uses: actions/checkout@v4 - with: - repository: 'CyberSource/cybersource-rest-samples-python' - ref: 'testing-branch' - path: ${{env.SAMPLE_FOLDER}} - - name: Install Python - uses: actions/setup-python@v5 - with: - python-version: "3.10" - - name: Set up virtual python environment - run: | - python -m pip install --upgrade pip - python -m venv ve - source ve/bin/activate - - name: Building the projects and running the Tests - run: | - cd $CLIENT_FOLDER - pip install -e . - cd .. - cd $SAMPLE_FOLDER - pip install -e . - bash ./sample_code_runner.sh - - name: Installing required python libraries and running the python programs to generate pdf report - run : | - source ve/bin/activate - cd $SAMPLE_FOLDER - pip install json2html - pip install xhtml2pdf - pip install bs4 - cd Validation - python sample_code_log_processor.py -l ../../$SAMPLE_FOLDER/output.log -o ../../$SAMPLE_FOLDER/python_actual_results.json - python response_code_validator.py -e ExpectedResults/python_expected_results.json -a ../../$SAMPLE_FOLDER/python_actual_results.json -o python_validation_results.json - python json_to_prettified_html.py -i python_validation_results.json -o python_validation_results.html - - name: Upload the log files and report pdf - if: always() - uses: actions/upload-artifact@v4 - with: - name: log-files-${{matrix.operating-system}} - path: | - ${{env.SAMPLE_FOLDER}}/output.log - ${{env.SAMPLE_FOLDER}}/Validation/python_validation_results.pdf From b94e2c7cf8433ad35c23d7c1f5597aff5bfaef23 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Fri, 14 Jun 2024 12:10:35 +0530 Subject: [PATCH 071/130] Update the workflow file --- ...orkflow-window.yml => python-workflow.yml} | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) rename .github/workflows/{python-workflow-window.yml => python-workflow.yml} (81%) diff --git a/.github/workflows/python-workflow-window.yml b/.github/workflows/python-workflow.yml similarity index 81% rename from .github/workflows/python-workflow-window.yml rename to .github/workflows/python-workflow.yml index f144f325..839b9c20 100644 --- a/.github/workflows/python-workflow-window.yml +++ b/.github/workflows/python-workflow.yml @@ -1,11 +1,11 @@ -name: workflow cybersource-rest-client-python-test-run +name: workflow for cybersource-rest-client-python on: push: env: CLIENT_FOLDER: 'cybersource-rest-client-python' SAMPLE_FOLDER: 'cybersource-rest-samples-python' jobs: - complete-job: + workflow-job: defaults: run: shell: bash @@ -14,9 +14,9 @@ jobs: operating-system: [ubuntu-latest,macos-latest,windows-latest] pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12'] include: - - operating-system: ubuntu-20.04 + - operating-system: ubuntu-20.04 # The tests were run successfully but report generation was not possible as xhtml2pdf had issues with python 3.6,Fix :- the output log file can be used to generate the report on another runner with a python ver 3.8 and above pyth-version: '3.6' - - operating-system: macos-13 + - operating-system: macos-13 # The tests were run successfully but report generation was not possible as xhtml2pdf had issues with python 3.6,Fix :- the output log file can be used to generate the report on another runner with a python ver 3.8 and above pyth-version: '3.6' - operating-system: macos-13 pyth-version: '3.7' @@ -71,12 +71,12 @@ jobs: cd $SAMPLE_FOLDER pip install -e . bash ./sample_code_runner.sh - - name : Activating the Virtual Env non windows - if: ${{matrix.operating-system != 'windows-latest' }} - run: source ve/bin/activate - - name : Activating the Virtual Env for windows - if: ${{matrix.operating-system == 'windows-latest' }} - run: source ve/Scripts/activate + # - name : Activating the Virtual Env non windows + # if: ${{matrix.operating-system != 'windows-latest' }} + # run: source ve/bin/activate + # - name : Activating the Virtual Env for windows + # if: ${{matrix.operating-system == 'windows-latest' }} + # run: source ve/Scripts/activate - name: Installing required python libraries and running the python programs to generate pdf report run : | cd $SAMPLE_FOLDER From 991eee42495a89eba45744526ada6305b0067aee Mon Sep 17 00:00:00 2001 From: aasgoel Date: Fri, 14 Jun 2024 12:14:12 +0530 Subject: [PATCH 072/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 839b9c20..ecd8dca1 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -1,4 +1,4 @@ -name: workflow for cybersource-rest-client-python +name: workflow for python to run samples on: push: env: From db0312a6b25c4254efce96d2786791ce970dc0ad Mon Sep 17 00:00:00 2001 From: aasgoel Date: Fri, 14 Jun 2024 15:13:21 +0530 Subject: [PATCH 073/130] Changes to yaml file --- .github/workflows/python-workflow.yml | 35 +++++++++++++-------------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index ecd8dca1..c2a88c96 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -1,4 +1,4 @@ -name: workflow for python to run samples +name: workflow for cybs rest client python sdk to run samples on: push: env: @@ -32,16 +32,16 @@ jobs: runs-on: ${{matrix.operating-system}} continue-on-error: true steps: - - name: Making separate folders + - name: Creating separate folders for checkout repos run: | rm -rf $CLIENT_FOLDER rm -rf $SAMPLE_FOLDER mkdir $CLIENT_FOLDER $SAMPLE_FOLDER - - name: Adding client + - name: Checkout cybersource-rest-client-python repo uses: actions/checkout@v4 with: path: ${{env.CLIENT_FOLDER}} - - name: Adding sample + - name: Checkout cybersource-rest-samples-python repo uses: actions/checkout@v4 with: repository: 'CyberSource/cybersource-rest-samples-python' @@ -51,32 +51,30 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{matrix.pyth-version}} - - name: Set up virtual python environment + - name: Setup Virtual Python Environment if OS is windows if: ${{matrix.operating-system == 'windows-latest' }} run: | python -m pip install --upgrade pip python -m venv ve source ve/Scripts/activate - - name: Set up virtual python environment + - name: Setup Virtual Python Environment if OS is not windows if: ${{matrix.operating-system != 'windows-latest' }} run: | python -m pip install --upgrade pip python -m venv ve source ve/bin/activate - - name: Building the projects and running the Tests + - name: Building the projects and running the Test Cases run: | cd $CLIENT_FOLDER pip install -e . cd .. cd $SAMPLE_FOLDER pip install -e . - bash ./sample_code_runner.sh - # - name : Activating the Virtual Env non windows - # if: ${{matrix.operating-system != 'windows-latest' }} - # run: source ve/bin/activate - # - name : Activating the Virtual Env for windows - # if: ${{matrix.operating-system == 'windows-latest' }} - # run: source ve/Scripts/activate + bash ./sample_code_runner.sh + - 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 : | cd $SAMPLE_FOLDER @@ -87,10 +85,11 @@ jobs: python sample_code_log_processor.py -l ../../$SAMPLE_FOLDER/output.log -o ../../$SAMPLE_FOLDER/python_actual_results.json python response_code_validator.py -e ExpectedResults/python_expected_results.json -a ../../$SAMPLE_FOLDER/python_actual_results.json -o python_validation_results.json python json_to_prettified_html.py -i python_validation_results.json -o python_validation_results.html - - name: Upload the log files and report pdf + cp python_validation_results.pdf ../ #copying the file to flaatten the directory of the upload artifact , Github Actions doesn't support that as of jun 2024 + - name: Upload Test Reports uses: actions/upload-artifact@v4 with: - name: log-files-${{matrix.operating-system}}-ver${{matrix.pyth-version}} + name: log-files-${{matrix.operating-system}}-python-ver-${{matrix.pyth-version}} path: | - ${{env.SAMPLE_FOLDER}}/output.log - ${{env.SAMPLE_FOLDER}}/Validation/python_validation_results.pdf \ No newline at end of file + # ${{env.SAMPLE_FOLDER}}/output.log + ${{env.SAMPLE_FOLDER}}/python_validation_results.pdf From 1e12f497edc1ddbc1aa2ce316d5b0dfe46ecfe8a Mon Sep 17 00:00:00 2001 From: aasgoel Date: Fri, 14 Jun 2024 15:28:19 +0530 Subject: [PATCH 074/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index c2a88c96..8cb6489f 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -1,6 +1,8 @@ name: workflow for cybs rest client python sdk to run samples on: push: + pull_request: + workflow_dispatch: env: CLIENT_FOLDER: 'cybersource-rest-client-python' SAMPLE_FOLDER: 'cybersource-rest-samples-python' @@ -14,9 +16,9 @@ jobs: operating-system: [ubuntu-latest,macos-latest,windows-latest] pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12'] include: - - operating-system: ubuntu-20.04 # The tests were run successfully but report generation was not possible as xhtml2pdf had issues with python 3.6,Fix :- the output log file can be used to generate the report on another runner with a python ver 3.8 and above + - operating-system: ubuntu-20.04 pyth-version: '3.6' - - operating-system: macos-13 # The tests were run successfully but report generation was not possible as xhtml2pdf had issues with python 3.6,Fix :- the output log file can be used to generate the report on another runner with a python ver 3.8 and above + - operating-system: macos-13 pyth-version: '3.6' - operating-system: macos-13 pyth-version: '3.7' @@ -27,8 +29,6 @@ jobs: pyth-version: '3.7' - operating-system: ubuntu-latest # The version '3.6' with architecture 'x64' was not found for Ubuntu 22.04. pyth-version: '3.6' - - operating-system: windows-latest # The tests were run successfully but report generation was not possible as xhtml2pdf had issues with python 3.6,Fix :- the output log file can be used to generate the report on another runner with a python ver 3.8 and above - pyth-version: '3.6' runs-on: ${{matrix.operating-system}} continue-on-error: true steps: From 629c611361e75c3afc61e890cffde3135c6f88fe Mon Sep 17 00:00:00 2001 From: aasgoel Date: Sun, 16 Jun 2024 21:46:15 +0530 Subject: [PATCH 075/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 8cb6489f..fdf19368 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -16,11 +16,11 @@ jobs: operating-system: [ubuntu-latest,macos-latest,windows-latest] pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12'] include: - - operating-system: ubuntu-20.04 + - operating-system: ubuntu-20.04 # Checking support for ubuntu with python 3.6 pyth-version: '3.6' - - operating-system: macos-13 + - operating-system: macos-13 # Checking support for mac os with python 3.6 pyth-version: '3.6' - - operating-system: macos-13 + - operating-system: macos-13 # Checking support for mac os with python 3.7 pyth-version: '3.7' exclude: - operating-system: macos-latest # python 3.6 is unavailable for mac os latest becuase 3.6 doesnt support arm 64 @@ -91,5 +91,4 @@ jobs: with: name: log-files-${{matrix.operating-system}}-python-ver-${{matrix.pyth-version}} path: | - # ${{env.SAMPLE_FOLDER}}/output.log ${{env.SAMPLE_FOLDER}}/python_validation_results.pdf From bd416f5627ddaa2ef2868976bc970b1e1e229eb3 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Tue, 18 Jun 2024 17:17:30 +0530 Subject: [PATCH 076/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index fdf19368..832be602 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -45,7 +45,7 @@ jobs: uses: actions/checkout@v4 with: repository: 'CyberSource/cybersource-rest-samples-python' - ref: 'testing-branch' + ref: 'testing-branch' # this is used for checking out a particular branch in repo path: ${{env.SAMPLE_FOLDER}} - name: Install Python uses: actions/setup-python@v5 @@ -65,18 +65,23 @@ jobs: source ve/bin/activate - name: Building the projects and running the Test Cases run: | + echo $VIRTUAL_ENV cd $CLIENT_FOLDER pip install -e . cd .. + echo $VIRTUAL_ENV cd $SAMPLE_FOLDER pip install -e . - bash ./sample_code_runner.sh + bash ./sample_code_runner.sh + echo $VIRTUAL_ENV - 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 : | + echo "Before Running Report Generation" + echo $VIRTUAL_ENV cd $SAMPLE_FOLDER pip install json2html pip install xhtml2pdf @@ -85,7 +90,7 @@ jobs: python sample_code_log_processor.py -l ../../$SAMPLE_FOLDER/output.log -o ../../$SAMPLE_FOLDER/python_actual_results.json python response_code_validator.py -e ExpectedResults/python_expected_results.json -a ../../$SAMPLE_FOLDER/python_actual_results.json -o python_validation_results.json python json_to_prettified_html.py -i python_validation_results.json -o python_validation_results.html - cp python_validation_results.pdf ../ #copying the file to flaatten the directory of the upload artifact , Github Actions doesn't support that as of jun 2024 + cp python_validation_results.pdf ../ #copying the file to flaatten the directory of the upload artifact,Github Actions doesn't support that as of jun 2024 - name: Upload Test Reports uses: actions/upload-artifact@v4 with: From c01f2589a885a594b693965502475e80f19bf42e Mon Sep 17 00:00:00 2001 From: aasgoel Date: Tue, 18 Jun 2024 17:20:37 +0530 Subject: [PATCH 077/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 832be602..5afd7da4 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -82,6 +82,8 @@ jobs: run : | echo "Before Running Report Generation" echo $VIRTUAL_ENV + echo "PWD" + pwd cd $SAMPLE_FOLDER pip install json2html pip install xhtml2pdf From f189f1f7c70647e462484690abe2a4310d029d72 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Tue, 18 Jun 2024 17:45:44 +0530 Subject: [PATCH 078/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 5afd7da4..687b59d0 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -63,6 +63,7 @@ jobs: python -m pip install --upgrade pip python -m venv ve source ve/bin/activate + echo $VIRTUAL_ENV - name: Building the projects and running the Test Cases run: | echo $VIRTUAL_ENV From d11445f4099a21e0fe08fc0869ab9482cfadc9e7 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Tue, 18 Jun 2024 18:08:16 +0530 Subject: [PATCH 079/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 37 +++++++++++++++++---------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 687b59d0..8f4d18c9 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -12,6 +12,7 @@ jobs: run: shell: bash strategy: + fail-fast: false matrix: operating-system: [ubuntu-latest,macos-latest,windows-latest] pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12'] @@ -30,7 +31,6 @@ jobs: - operating-system: ubuntu-latest # The version '3.6' with architecture 'x64' was not found for Ubuntu 22.04. pyth-version: '3.6' runs-on: ${{matrix.operating-system}} - continue-on-error: true steps: - name: Creating separate folders for checkout repos run: | @@ -51,21 +51,33 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{matrix.pyth-version}} - - name: Setup Virtual Python Environment if OS is windows - if: ${{matrix.operating-system == 'windows-latest' }} - run: | - python -m pip install --upgrade pip - python -m venv ve - source ve/Scripts/activate - - name: Setup Virtual Python Environment if OS is not windows - if: ${{matrix.operating-system != 'windows-latest' }} + # - name: Setup Virtual Python Environment if OS is windows + # if: ${{matrix.operating-system == 'windows-latest' }} + # run: | + # python -m pip install --upgrade pip + # python -m venv ve + # source ve/Scripts/activate + # - name: Setup Virtual Python Environment if OS is not windows + # if: ${{matrix.operating-system != 'windows-latest' }} + # run: | + # python -m pip install --upgrade pip + # python -m venv ve + # source ve/bin/activate + # echo $VIRTUAL_ENV + - name: Building the projects and running the Test Cases run: | python -m pip install --upgrade pip python -m venv ve + if [[ "$(uname -s)" == "Linux" ]]; then source ve/bin/activate - echo $VIRTUAL_ENV - - name: Building the projects and running the Test Cases - run: | + echo "In LINUX" + elif [[ "$(uname -s)" == "Darwin" ]]; then + source ve/bin/activate + echo "In MAC" + else + source ve/Scripts/activate + echo "In Windows" + fi echo $VIRTUAL_ENV cd $CLIENT_FOLDER pip install -e . @@ -82,7 +94,6 @@ jobs: - name: Installing required python libraries and running the python programs to generate pdf report run : | echo "Before Running Report Generation" - echo $VIRTUAL_ENV echo "PWD" pwd cd $SAMPLE_FOLDER From 2afbf4210ae6c1eb25081f07c3a22574e6b8a84f Mon Sep 17 00:00:00 2001 From: aasgoel Date: Tue, 18 Jun 2024 18:14:08 +0530 Subject: [PATCH 080/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 8f4d18c9..40b2d652 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -93,6 +93,17 @@ jobs: python-version: 3.12 - name: Installing required python libraries and running the python programs to generate pdf report run : | + if [[ "$(uname -s)" == "Linux" ]]; then + source ve/bin/activate + echo "In LINUX" + elif [[ "$(uname -s)" == "Darwin" ]]; then + source ve/bin/activate + echo "In MAC" + else + source ve/Scripts/activate + echo "In Windows" + fi + echo $VIRTUAL_ENV echo "Before Running Report Generation" echo "PWD" pwd From c33efba4affaca36cc3c8cc0a37d2f628e020f72 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 19 Jun 2024 09:04:44 +0530 Subject: [PATCH 081/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 35 ++++++++------------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 40b2d652..5b1d3030 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -15,21 +15,13 @@ jobs: fail-fast: false matrix: operating-system: [ubuntu-latest,macos-latest,windows-latest] - pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12'] + pyth-version: ['3.7','3.8','3.9','3.10','3.11','3.12'] include: - - operating-system: ubuntu-20.04 # Checking support for ubuntu with python 3.6 - pyth-version: '3.6' - - operating-system: macos-13 # Checking support for mac os with python 3.6 - pyth-version: '3.6' - operating-system: macos-13 # Checking support for mac os with python 3.7 pyth-version: '3.7' exclude: - - operating-system: macos-latest # python 3.6 is unavailable for mac os latest becuase 3.6 doesnt support arm 64 - pyth-version: '3.6' - operating-system: macos-latest # python 3.7 is unavailable for mac os latest becuase 3.7 doesnt support arm 64 pyth-version: '3.7' - - operating-system: ubuntu-latest # The version '3.6' with architecture 'x64' was not found for Ubuntu 22.04. - pyth-version: '3.6' runs-on: ${{matrix.operating-system}} steps: - name: Creating separate folders for checkout repos @@ -51,32 +43,25 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{matrix.pyth-version}} - # - name: Setup Virtual Python Environment if OS is windows - # if: ${{matrix.operating-system == 'windows-latest' }} - # run: | - # python -m pip install --upgrade pip - # python -m venv ve - # source ve/Scripts/activate - # - name: Setup Virtual Python Environment if OS is not windows - # if: ${{matrix.operating-system != 'windows-latest' }} - # run: | - # python -m pip install --upgrade pip - # python -m venv ve - # source ve/bin/activate - # echo $VIRTUAL_ENV - name: Building the projects and running the Test Cases run: | python -m pip install --upgrade pip python -m venv ve if [[ "$(uname -s)" == "Linux" ]]; then - source ve/bin/activate echo "In LINUX" - elif [[ "$(uname -s)" == "Darwin" ]]; then source ve/bin/activate + elif [[ "$(uname -s)" == "Darwin" ]]; then echo "In MAC" + source ve/bin/activate else - source ve/Scripts/activate echo "In Windows" + source ve/Scripts/activate + version=$(python3 --version 2>&1 | awk '{print $2}') + if [[ $version == 3.7.* ]] + then + pip install cryptography==41.0.7 + fi + # check if python version is 3.7 then "pip install cryptography==41.0.7" fi echo $VIRTUAL_ENV cd $CLIENT_FOLDER From 421ee5eefc4bf1d4c44709322455db5cc36f807f Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 19 Jun 2024 10:40:58 +0530 Subject: [PATCH 082/130] Update README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index ab41117e..3238a508 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,11 @@ Since v0.0.31, a new logging framework has been introduced in the SDK. This new More information about this new logging framework can be found in this file : [Logging.md](Logging.md) +### Tetsing for different environments +[![workflow for cybs rest client python sdk to run samples](https://github.com/CyberSource/cybersource-rest-client-python/actions/workflows/python-workflow.yml/badge.svg?branch=adding-workflows)](https://github.com/CyberSource/cybersource-rest-client-python/actions/workflows/python-workflow.yml) + +The tag indicates whether sample codes have been successfully run for different environments. + ## Features ## MetaKey Support From 1f438f3f7dffce93da28a6fd205efb0e07987aa7 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 19 Jun 2024 14:44:34 +0530 Subject: [PATCH 083/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 5b1d3030..cb907c8f 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -93,6 +93,7 @@ jobs: echo "PWD" pwd cd $SAMPLE_FOLDER + python -m pip install --upgrade pip pip install json2html pip install xhtml2pdf pip install bs4 From 10cdaad39f41f2d10b9f648171a33cfe49d0bf53 Mon Sep 17 00:00:00 2001 From: gnongsie Date: Wed, 19 Jun 2024 16:52:48 +0530 Subject: [PATCH 084/130] Testing out environmental markers for dependencies --- .github/workflows/python-workflow.yml | 45 ++++++++++++++++----------- requirements.txt | 6 ++-- setup.py | 6 ++-- 3 files changed, 34 insertions(+), 23 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index cb907c8f..62b39c4f 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -15,11 +15,19 @@ jobs: fail-fast: false matrix: operating-system: [ubuntu-latest,macos-latest,windows-latest] - pyth-version: ['3.7','3.8','3.9','3.10','3.11','3.12'] + pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12'] include: + - operating-system: ubuntu-20.0.4 # Checking support for ubuntu os with python 3.6 + pyth-version: '3.6' + - operating-system: macos-13 # Checking support for mac os with python 3.6 + pyth-version: '3.6' - operating-system: macos-13 # Checking support for mac os with python 3.7 pyth-version: '3.7' exclude: + - operating-system: ubuntu-latest # python 3.7 is unavailable for mac os latest becuase 3.7 doesnt support arm 64 + pyth-version: '3.6' + - operating-system: macos-latest # python 3.6 is unavailable for mac os latest becuase 3.6 doesnt support arm 64 + pyth-version: '3.6' - operating-system: macos-latest # python 3.7 is unavailable for mac os latest becuase 3.7 doesnt support arm 64 pyth-version: '3.7' runs-on: ${{matrix.operating-system}} @@ -48,20 +56,19 @@ jobs: python -m pip install --upgrade pip python -m venv ve if [[ "$(uname -s)" == "Linux" ]]; then - echo "In LINUX" - source ve/bin/activate + echo "In LINUX" + source ve/bin/activate elif [[ "$(uname -s)" == "Darwin" ]]; then - echo "In MAC" - source ve/bin/activate + echo "In MAC" + source ve/bin/activate else - echo "In Windows" - source ve/Scripts/activate - version=$(python3 --version 2>&1 | awk '{print $2}') - if [[ $version == 3.7.* ]] - then - pip install cryptography==41.0.7 - fi - # check if python version is 3.7 then "pip install cryptography==41.0.7" + echo "In Windows" + source ve/Scripts/activate + version=$(python3 --version 2>&1 | awk '{print $2}') + # if [[ $version == 3.7.* ]]; then + # pip install cryptography==41.0.7 + # fi + # # check if python version is 3.7 then "pip install cryptography==41.0.7" fi echo $VIRTUAL_ENV cd $CLIENT_FOLDER @@ -79,14 +86,14 @@ jobs: - name: Installing required python libraries and running the python programs to generate pdf report run : | if [[ "$(uname -s)" == "Linux" ]]; then - source ve/bin/activate - echo "In LINUX" + source ve/bin/activate + echo "In LINUX" elif [[ "$(uname -s)" == "Darwin" ]]; then - source ve/bin/activate - echo "In MAC" + source ve/bin/activate + echo "In MAC" else - source ve/Scripts/activate - echo "In Windows" + source ve/Scripts/activate + echo "In Windows" fi echo $VIRTUAL_ENV echo "Before Running Report Generation" diff --git a/requirements.txt b/requirements.txt index 2d85d360..0a4264db 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,5 +6,7 @@ DateTime setuptools six urllib3 -jwcrypto -cryptography +jwcrypto==1.5.1;python_version<="3.7" +jwcrypto>=1.5.6;python_version>"3.7" +cryptography==40.0.2;python_version<="3.6" +cryptography<41.1.0;python_version>"3.6" diff --git a/setup.py b/setup.py index 09a56c9a..3c36746e 100644 --- a/setup.py +++ b/setup.py @@ -28,8 +28,10 @@ "setuptools", "six", "urllib3", - "jwcrypto", - "cryptography", + "jwcrypto==1.5.1;python_version<='3.7'", + "jwcrypto>=1.5.6;python_version>'3.7'", + "cryptography==40.0.2;python_version<='3.6'", + "cryptography<41.1.0;python_version>'3.6'" ], packages=find_packages(), include_package_data=True, From 718dcb88d31ea61de473862318753407e20a8268 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 19 Jun 2024 17:19:09 +0530 Subject: [PATCH 085/130] changed ubuntu version from 20.0.4 to 20.04 --- .github/workflows/python-workflow.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 62b39c4f..c80ae926 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -17,7 +17,7 @@ jobs: operating-system: [ubuntu-latest,macos-latest,windows-latest] pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12'] include: - - operating-system: ubuntu-20.0.4 # Checking support for ubuntu os with python 3.6 + - operating-system: ubuntu-20.04 # Checking support for ubuntu os with python 3.6 pyth-version: '3.6' - operating-system: macos-13 # Checking support for mac os with python 3.6 pyth-version: '3.6' @@ -85,16 +85,6 @@ jobs: python-version: 3.12 - name: Installing required python libraries and running the python programs to generate pdf report run : | - if [[ "$(uname -s)" == "Linux" ]]; then - source ve/bin/activate - echo "In LINUX" - elif [[ "$(uname -s)" == "Darwin" ]]; then - source ve/bin/activate - echo "In MAC" - else - source ve/Scripts/activate - echo "In Windows" - fi echo $VIRTUAL_ENV echo "Before Running Report Generation" echo "PWD" From a10ecfc33c44d5686608fc085f4c48961401e6db Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 19 Jun 2024 17:29:01 +0530 Subject: [PATCH 086/130] Updated the readme file --- README.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3238a508..778adad4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # Python Client SDK for the CyberSource REST API +[![BUILD](https://github.com/CyberSource/cybersource-rest-client-python/actions/workflows/python-workflow.yml/badge.svg?branch=adding-workflows)](https://github.com/CyberSource/cybersource-rest-client-python/actions/workflows/python-workflow.yml) + ## Description The CyberSource Python client provides convenient access to the [CyberSource REST API](https://developer.cybersource.com/api/reference/api-reference.html) from your Python application. @@ -76,11 +78,6 @@ Since v0.0.31, a new logging framework has been introduced in the SDK. This new More information about this new logging framework can be found in this file : [Logging.md](Logging.md) -### Tetsing for different environments -[![workflow for cybs rest client python sdk to run samples](https://github.com/CyberSource/cybersource-rest-client-python/actions/workflows/python-workflow.yml/badge.svg?branch=adding-workflows)](https://github.com/CyberSource/cybersource-rest-client-python/actions/workflows/python-workflow.yml) - -The tag indicates whether sample codes have been successfully run for different environments. - ## Features ## MetaKey Support From a6502b507d90f2ba273bfe89e423836023eb1812 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 19 Jun 2024 17:42:02 +0530 Subject: [PATCH 087/130] Renaming the workflow --- .github/workflows/python-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index c80ae926..ad607dbc 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -1,4 +1,4 @@ -name: workflow for cybs rest client python sdk to run samples +name: PYTHON BUILDS on: push: pull_request: From 8c429327297380bdbf856f6f5d3470e0028c995f Mon Sep 17 00:00:00 2001 From: gnongsie Date: Wed, 19 Jun 2024 18:03:35 +0530 Subject: [PATCH 088/130] Trying to fix error of openssl on Windows --- .github/workflows/python-workflow.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index ad607dbc..44955b9f 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -32,6 +32,10 @@ jobs: pyth-version: '3.7' runs-on: ${{matrix.operating-system}} steps: + - run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append + if: runner.os == 'Windows' + - run: vcpkg install openssl:x64-windows-static-md + if: runner.os == 'Windows' - name: Creating separate folders for checkout repos run: | rm -rf $CLIENT_FOLDER From 368f9d442ec2cd1e495c99360461759173083288 Mon Sep 17 00:00:00 2001 From: gnongsie Date: Wed, 19 Jun 2024 18:06:15 +0530 Subject: [PATCH 089/130] Changing shell for command --- .github/workflows/python-workflow.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 44955b9f..42682e92 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -34,8 +34,10 @@ jobs: steps: - run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append if: runner.os == 'Windows' + shell: pwsh - run: vcpkg install openssl:x64-windows-static-md if: runner.os == 'Windows' + shell: pwsh - name: Creating separate folders for checkout repos run: | rm -rf $CLIENT_FOLDER From 9eb0de1298321e7a2a76b9839589539727f824aa Mon Sep 17 00:00:00 2001 From: aasgoel Date: Fri, 21 Jun 2024 11:10:48 +0530 Subject: [PATCH 090/130] Adding comment to trigger workflow --- .github/workflows/python-workflow.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 42682e92..e697c667 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -70,7 +70,7 @@ jobs: else echo "In Windows" source ve/Scripts/activate - version=$(python3 --version 2>&1 | awk '{print $2}') + # version=$(python3 --version 2>&1 | awk '{print $2}') # if [[ $version == 3.7.* ]]; then # pip install cryptography==41.0.7 # fi @@ -111,3 +111,5 @@ jobs: name: log-files-${{matrix.operating-system}}-python-ver-${{matrix.pyth-version}} path: | ${{env.SAMPLE_FOLDER}}/python_validation_results.pdf + +# Adding comment \ No newline at end of file From 8db182edacc75ca8cf51eaacfa1de3ca8555a73f Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 1 Jul 2024 12:47:32 +0530 Subject: [PATCH 091/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index e697c667..b46f67f8 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -35,9 +35,9 @@ jobs: - run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append if: runner.os == 'Windows' shell: pwsh - - run: vcpkg install openssl:x64-windows-static-md - if: runner.os == 'Windows' - shell: pwsh + # - run: vcpkg install openssl:x64-windows-static-md + # if: runner.os == 'Windows' + # shell: pwsh - name: Creating separate folders for checkout repos run: | rm -rf $CLIENT_FOLDER From 3e8d3d8b9b6636aae5bfff574e80f03f235370f6 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 1 Jul 2024 12:51:47 +0530 Subject: [PATCH 092/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index b46f67f8..e697c667 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -35,9 +35,9 @@ jobs: - run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append if: runner.os == 'Windows' shell: pwsh - # - run: vcpkg install openssl:x64-windows-static-md - # if: runner.os == 'Windows' - # shell: pwsh + - run: vcpkg install openssl:x64-windows-static-md + if: runner.os == 'Windows' + shell: pwsh - name: Creating separate folders for checkout repos run: | rm -rf $CLIENT_FOLDER From 465e2623f11ff2efa1da6e69faaec4e6dfcca848 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 1 Jul 2024 12:56:07 +0530 Subject: [PATCH 093/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index e697c667..319da11b 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -59,6 +59,7 @@ jobs: python-version: ${{matrix.pyth-version}} - name: Building the projects and running the Test Cases run: | + python --version python -m pip install --upgrade pip python -m venv ve if [[ "$(uname -s)" == "Linux" ]]; then @@ -91,9 +92,10 @@ jobs: python-version: 3.12 - name: Installing required python libraries and running the python programs to generate pdf report run : | + python --version echo $VIRTUAL_ENV echo "Before Running Report Generation" - echo "PWD" + echo "PWD" pwd cd $SAMPLE_FOLDER python -m pip install --upgrade pip From 2049d58ae7a6784b342f84c95aa5fa391df077f1 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 1 Jul 2024 13:38:11 +0530 Subject: [PATCH 094/130] updated comments [no ci] --- .github/workflows/python-workflow.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 319da11b..d5d69777 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -24,11 +24,11 @@ jobs: - operating-system: macos-13 # Checking support for mac os with python 3.7 pyth-version: '3.7' exclude: - - operating-system: ubuntu-latest # python 3.7 is unavailable for mac os latest becuase 3.7 doesnt support arm 64 + - operating-system: ubuntu-latest #arm 64 doesn't support python ver 3.7 pyth-version: '3.6' - - operating-system: macos-latest # python 3.6 is unavailable for mac os latest becuase 3.6 doesnt support arm 64 + - operating-system: macos-latest #arm 64 doesn't support python ver 3.6 pyth-version: '3.6' - - operating-system: macos-latest # python 3.7 is unavailable for mac os latest becuase 3.7 doesnt support arm 64 + - operating-system: macos-latest #arm 64 doesn't support python ver 3.7 pyth-version: '3.7' runs-on: ${{matrix.operating-system}} steps: From e3fe97d14a894570bfa0f747e8d579f449eae453 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 3 Jul 2024 09:23:43 +0530 Subject: [PATCH 095/130] Added the custom github action --- .github/actions/generate-report/action.yml | 29 +++++++++++ .github/workflows/python-workflow.yml | 58 +++++++++++----------- 2 files changed, 59 insertions(+), 28 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..4b284e8a --- /dev/null +++ b/.github/actions/generate-report/action.yml @@ -0,0 +1,29 @@ +name: 'Generate the Report' +description: 'Generates the report using the output.log file' +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 + run : | + python --version + pwd + ls + # echo $VIRTUAL_ENV + # echo "Before Running Report Generation" + # echo "PWD" + # pwd + # cd $SAMPLE_FOLDER + # python -m pip install --upgrade pip + # pip install json2html + # pip install xhtml2pdf + # pip install bs4 + # cd Validation + # python sample_code_log_processor.py -l ../../$SAMPLE_FOLDER/output.log -o ../../$SAMPLE_FOLDER/python_actual_results.json + # python response_code_validator.py -e ExpectedResults/python_expected_results.json -a ../../$SAMPLE_FOLDER/python_actual_results.json -o python_validation_results.json + # python json_to_prettified_html.py -i python_validation_results.json -o python_validation_results.html + # cp python_validation_results.pdf ../ #copying the file to flaatten the directory of the upload artifact,Github Actions doesn't support that as of jun 2024 + shell: bash \ No newline at end of file diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index d5d69777..eb87c466 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -84,34 +84,36 @@ jobs: echo $VIRTUAL_ENV cd $SAMPLE_FOLDER pip install -e . - bash ./sample_code_runner.sh + # bash ./sample_code_runner.sh echo $VIRTUAL_ENV - - 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 --version - echo $VIRTUAL_ENV - echo "Before Running Report Generation" - echo "PWD" - pwd - cd $SAMPLE_FOLDER - python -m pip install --upgrade pip - pip install json2html - pip install xhtml2pdf - pip install bs4 - cd Validation - python sample_code_log_processor.py -l ../../$SAMPLE_FOLDER/output.log -o ../../$SAMPLE_FOLDER/python_actual_results.json - python response_code_validator.py -e ExpectedResults/python_expected_results.json -a ../../$SAMPLE_FOLDER/python_actual_results.json -o python_validation_results.json - python json_to_prettified_html.py -i python_validation_results.json -o python_validation_results.html - cp python_validation_results.pdf ../ #copying the file to flaatten the directory of the upload artifact,Github Actions doesn't support that as of jun 2024 - - name: Upload Test Reports - uses: actions/upload-artifact@v4 - with: - name: log-files-${{matrix.operating-system}}-python-ver-${{matrix.pyth-version}} - path: | - ${{env.SAMPLE_FOLDER}}/python_validation_results.pdf + - name: Using Custom Action + uses: ./.github/actions/generate-report + # - 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 --version + # echo $VIRTUAL_ENV + # echo "Before Running Report Generation" + # echo "PWD" + # pwd + # cd $SAMPLE_FOLDER + # python -m pip install --upgrade pip + # pip install json2html + # pip install xhtml2pdf + # pip install bs4 + # cd Validation + # python sample_code_log_processor.py -l ../../$SAMPLE_FOLDER/output.log -o ../../$SAMPLE_FOLDER/python_actual_results.json + # python response_code_validator.py -e ExpectedResults/python_expected_results.json -a ../../$SAMPLE_FOLDER/python_actual_results.json -o python_validation_results.json + # python json_to_prettified_html.py -i python_validation_results.json -o python_validation_results.html + # cp python_validation_results.pdf ../ #copying the file to flaatten the directory of the upload artifact,Github Actions doesn't support that as of jun 2024 + # - name: Upload Test Reports + # uses: actions/upload-artifact@v4 + # with: + # name: log-files-${{matrix.operating-system}}-python-ver-${{matrix.pyth-version}} + # path: | + # ${{env.SAMPLE_FOLDER}}/python_validation_results.pdf # Adding comment \ No newline at end of file From 9c951e2582b6a5f6904b40d0c37a176ffc9df2c0 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 3 Jul 2024 09:25:41 +0530 Subject: [PATCH 096/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index eb87c466..2a6773e7 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -87,7 +87,7 @@ jobs: # bash ./sample_code_runner.sh echo $VIRTUAL_ENV - name: Using Custom Action - uses: ./.github/actions/generate-report + uses: ./${{env.CLIENT_FOLDER}}/.github/actions/generate-report # - name: Setup Python v3.12 for report generation only # uses: actions/setup-python@v5 # with: From ca3b629d311dcafa68c9651699903c5586baa0ca Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 3 Jul 2024 09:27:14 +0530 Subject: [PATCH 097/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 2a6773e7..a0794845 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -87,7 +87,7 @@ jobs: # bash ./sample_code_runner.sh echo $VIRTUAL_ENV - name: Using Custom Action - uses: ./${{env.CLIENT_FOLDER}}/.github/actions/generate-report + uses: ${{env.CLIENT_FOLDER}}/.github/actions/generate-report # - name: Setup Python v3.12 for report generation only # uses: actions/setup-python@v5 # with: From e20efeecbcfea977a782992a14294dcf3a87f4f5 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 3 Jul 2024 09:28:16 +0530 Subject: [PATCH 098/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index a0794845..7c7ebeb6 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -87,7 +87,7 @@ jobs: # bash ./sample_code_runner.sh echo $VIRTUAL_ENV - name: Using Custom Action - uses: ${{env.CLIENT_FOLDER}}/.github/actions/generate-report + uses: ./cybersource-rest-client-python/.github/actions/generate-report # - name: Setup Python v3.12 for report generation only # uses: actions/setup-python@v5 # with: From e862b3adc56d11dd8a1cd8ec7d7bda0031417569 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 3 Jul 2024 09:43:16 +0530 Subject: [PATCH 099/130] Made changes to the composite action --- .github/actions/generate-report/action.yml | 40 ++++++++++++++-------- .github/workflows/python-workflow.yml | 3 ++ 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/.github/actions/generate-report/action.yml b/.github/actions/generate-report/action.yml index 4b284e8a..32251e81 100644 --- a/.github/actions/generate-report/action.yml +++ b/.github/actions/generate-report/action.yml @@ -1,5 +1,9 @@ name: 'Generate the Report' description: 'Generates the report using the output.log file' +inputs: + lang: + description: 'The language or framework in which SDK is written needs to be given as an input' + required: true runs: using: 'composite' steps: @@ -12,18 +16,24 @@ runs: python --version pwd ls - # echo $VIRTUAL_ENV - # echo "Before Running Report Generation" - # echo "PWD" - # pwd - # cd $SAMPLE_FOLDER - # python -m pip install --upgrade pip - # pip install json2html - # pip install xhtml2pdf - # pip install bs4 - # cd Validation - # python sample_code_log_processor.py -l ../../$SAMPLE_FOLDER/output.log -o ../../$SAMPLE_FOLDER/python_actual_results.json - # python response_code_validator.py -e ExpectedResults/python_expected_results.json -a ../../$SAMPLE_FOLDER/python_actual_results.json -o python_validation_results.json - # python json_to_prettified_html.py -i python_validation_results.json -o python_validation_results.html - # cp python_validation_results.pdf ../ #copying the file to flaatten the directory of the upload artifact,Github Actions doesn't support that as of jun 2024 - shell: bash \ No newline at end of file + echo $VIRTUAL_ENV + echo "Before Running Report Generation" + echo "PWD" + pwd + cd $SAMPLE_FOLDER + python -m pip install --upgrade pip + pip install json2html + pip install xhtml2pdf + pip install bs4 + cd Validation + python sample_code_log_processor.py -l ../../$SAMPLE_FOLDER/output.log -o ../../$SAMPLE_FOLDER/${{inputs.lang}}_actual_results.json + python response_code_validator.py -e ExpectedResults/${{inputs.lang}}_expected_results.json -a ../../$SAMPLE_FOLDER/${{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 + shell: bash + - name: Upload Test Reports + uses: actions/upload-artifact@v4 + with: + name: log-files-${{matrix.operating-system}}-python-ver-${{matrix.pyth-version}} + path: | + ${{env.SAMPLE_FOLDER}}/${{inputs.lang}}_validation_results.pdf \ No newline at end of file diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 7c7ebeb6..93daf3a9 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -85,9 +85,12 @@ jobs: cd $SAMPLE_FOLDER pip install -e . # bash ./sample_code_runner.sh + echo HI > output.log echo $VIRTUAL_ENV - name: Using Custom Action uses: ./cybersource-rest-client-python/.github/actions/generate-report + with: + lang: python # - name: Setup Python v3.12 for report generation only # uses: actions/setup-python@v5 # with: From 40de50db5e1798a8df419effab960eee85f0deab Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 3 Jul 2024 10:40:58 +0530 Subject: [PATCH 100/130] made changes --- .github/actions/generate-report/action.yml | 36 +++++++++++++--------- .github/workflows/python-workflow.yml | 14 +++++++-- 2 files changed, 32 insertions(+), 18 deletions(-) diff --git a/.github/actions/generate-report/action.yml b/.github/actions/generate-report/action.yml index 32251e81..fc785b2e 100644 --- a/.github/actions/generate-report/action.yml +++ b/.github/actions/generate-report/action.yml @@ -1,9 +1,19 @@ name: 'Generate the Report' -description: 'Generates the report using the output.log file' +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: @@ -12,28 +22,24 @@ runs: 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 python --version - pwd - ls - echo $VIRTUAL_ENV echo "Before Running Report Generation" - echo "PWD" - pwd - cd $SAMPLE_FOLDER + cd ${{inputs.sample-folder-name}} python -m pip install --upgrade pip pip install json2html pip install xhtml2pdf pip install bs4 cd Validation - python sample_code_log_processor.py -l ../../$SAMPLE_FOLDER/output.log -o ../../$SAMPLE_FOLDER/${{inputs.lang}}_actual_results.json - python response_code_validator.py -e ExpectedResults/${{inputs.lang}}_expected_results.json -a ../../$SAMPLE_FOLDER/${{inputs.lang}}_actual_results.json -o ${{inputs.lang}}_validation_results.json + 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 - - name: Upload Test Reports - uses: actions/upload-artifact@v4 - with: - name: log-files-${{matrix.operating-system}}-python-ver-${{matrix.pyth-version}} - path: | - ${{env.SAMPLE_FOLDER}}/${{inputs.lang}}_validation_results.pdf \ No newline at end of file + diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 93daf3a9..6ba31b90 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -84,13 +84,21 @@ jobs: echo $VIRTUAL_ENV cd $SAMPLE_FOLDER pip install -e . - # bash ./sample_code_runner.sh + #bash ./sample_code_runner.sh echo HI > output.log - echo $VIRTUAL_ENV - - name: Using Custom Action + - name: Using Report Generation Action + id: report-generation uses: ./cybersource-rest-client-python/.github/actions/generate-report with: lang: python + 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}}-python-ver-${{matrix.pyth-version}} + 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: From acf646652c71e2868c4fd5770aea93c33604f770 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 3 Jul 2024 10:42:54 +0530 Subject: [PATCH 101/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 6ba31b90..5bdde611 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -88,7 +88,7 @@ jobs: echo HI > output.log - name: Using Report Generation Action id: report-generation - uses: ./cybersource-rest-client-python/.github/actions/generate-report + uses: cybersource-rest-client-python/.github/actions/generate-report with: lang: python sample-folder-name: ${{env.SAMPLE_FOLDER}} From 0a8fe8e6d3b8f2d512e83cb8902ce9aab56c4c7f Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 3 Jul 2024 10:44:27 +0530 Subject: [PATCH 102/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 5bdde611..e0a20de1 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -88,7 +88,7 @@ jobs: echo HI > output.log - name: Using Report Generation Action id: report-generation - uses: cybersource-rest-client-python/.github/actions/generate-report + uses: ./$CLIENT_FOLDER/.github/actions/generate-report with: lang: python sample-folder-name: ${{env.SAMPLE_FOLDER}} From 775828b3a3c3f898cde4b0f190aab96698eb5855 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 3 Jul 2024 10:45:59 +0530 Subject: [PATCH 103/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index e0a20de1..6ba31b90 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -88,7 +88,7 @@ jobs: echo HI > output.log - name: Using Report Generation Action id: report-generation - uses: ./$CLIENT_FOLDER/.github/actions/generate-report + uses: ./cybersource-rest-client-python/.github/actions/generate-report with: lang: python sample-folder-name: ${{env.SAMPLE_FOLDER}} From 3c986014bd6b36f7aaeaa871ab2c7937460b7466 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 3 Jul 2024 10:48:59 +0530 Subject: [PATCH 104/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 6ba31b90..af9eb34c 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -87,7 +87,6 @@ jobs: #bash ./sample_code_runner.sh echo HI > output.log - name: Using Report Generation Action - id: report-generation uses: ./cybersource-rest-client-python/.github/actions/generate-report with: lang: python From 08eb3792e0e8bd8c30706d987c2c868b0d9a69d6 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 3 Jul 2024 10:51:12 +0530 Subject: [PATCH 105/130] made changes --- .github/actions/generate-report/action.yml | 2 +- .github/workflows/python-workflow.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/generate-report/action.yml b/.github/actions/generate-report/action.yml index fc785b2e..9daeb5df 100644 --- a/.github/actions/generate-report/action.yml +++ b/.github/actions/generate-report/action.yml @@ -13,7 +13,7 @@ inputs: outputs: result-pdf-name: description: 'the name of the final generated pdf report' - value: {steps.generate.outputs.pdfname} + value: ${{steps.generate.outputs.pdfname}} runs: using: 'composite' steps: diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index af9eb34c..6ba31b90 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -87,6 +87,7 @@ jobs: #bash ./sample_code_runner.sh echo HI > output.log - name: Using Report Generation Action + id: report-generation uses: ./cybersource-rest-client-python/.github/actions/generate-report with: lang: python From 7fefc3305b5ed95809226804f3e37c8170354aec Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 3 Jul 2024 10:53:02 +0530 Subject: [PATCH 106/130] made changes --- .github/actions/generate-report/action.yml | 4 ++-- .github/workflows/python-workflow.yml | 9 ++------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/actions/generate-report/action.yml b/.github/actions/generate-report/action.yml index 9daeb5df..0d04225d 100644 --- a/.github/actions/generate-report/action.yml +++ b/.github/actions/generate-report/action.yml @@ -24,9 +24,9 @@ runs: - name: Installing required python libraries and running the python programs to generate pdf report id: generate run : | - export EXPECTED_RES_LANG = ${{inputs.lang}} + export EXPECTED_RES_LANG=${{inputs.lang}} if[(${{inputs.lang}} == 'dotnet') || (${{inputs.lang}} == 'dotnetstandard')] then; - export EXPECTED_RES_LANG = csharp + export EXPECTED_RES_LANG=csharp fi python --version echo "Before Running Report Generation" diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 6ba31b90..f3de53dd 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -71,19 +71,14 @@ jobs: else echo "In Windows" source ve/Scripts/activate - # version=$(python3 --version 2>&1 | awk '{print $2}') - # if [[ $version == 3.7.* ]]; then - # pip install cryptography==41.0.7 - # fi - # # check if python version is 3.7 then "pip install cryptography==41.0.7" fi echo $VIRTUAL_ENV cd $CLIENT_FOLDER - pip install -e . + # pip install -e . cd .. echo $VIRTUAL_ENV cd $SAMPLE_FOLDER - pip install -e . + # pip install -e . #bash ./sample_code_runner.sh echo HI > output.log - name: Using Report Generation Action From 007b429b86a5727911eea45a2a45e21dc17b49a7 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 3 Jul 2024 10:56:44 +0530 Subject: [PATCH 107/130] Update action.yml --- .github/actions/generate-report/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/generate-report/action.yml b/.github/actions/generate-report/action.yml index 0d04225d..cabe7493 100644 --- a/.github/actions/generate-report/action.yml +++ b/.github/actions/generate-report/action.yml @@ -25,7 +25,7 @@ runs: id: generate run : | export EXPECTED_RES_LANG=${{inputs.lang}} - if[(${{inputs.lang}} == 'dotnet') || (${{inputs.lang}} == 'dotnetstandard')] then; + if [[ "${inputs.lang}" == "dotnet" ]] || [[ "${inputs.lang}" == "dotnetstandard" ]]; then export EXPECTED_RES_LANG=csharp fi python --version From a709a9072f28b0461345cc65072653b0e8f97672 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 3 Jul 2024 10:58:47 +0530 Subject: [PATCH 108/130] Update action.yml --- .github/actions/generate-report/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/generate-report/action.yml b/.github/actions/generate-report/action.yml index cabe7493..b757468d 100644 --- a/.github/actions/generate-report/action.yml +++ b/.github/actions/generate-report/action.yml @@ -25,7 +25,7 @@ runs: id: generate run : | export EXPECTED_RES_LANG=${{inputs.lang}} - if [[ "${inputs.lang}" == "dotnet" ]] || [[ "${inputs.lang}" == "dotnetstandard" ]]; then + if [[ "${{inputs.lang}}" == "dotnet" ]] || [[ "${{inputs.lang}}" == "dotnetstandard" ]]; then export EXPECTED_RES_LANG=csharp fi python --version From 8a2139b9b0c4ae38016f358e392e216359b84fdd Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 3 Jul 2024 11:00:56 +0530 Subject: [PATCH 109/130] Update action.yml --- .github/actions/generate-report/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/generate-report/action.yml b/.github/actions/generate-report/action.yml index b757468d..0c1beb0d 100644 --- a/.github/actions/generate-report/action.yml +++ b/.github/actions/generate-report/action.yml @@ -28,6 +28,7 @@ runs: 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}} @@ -36,7 +37,7 @@ runs: 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 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 From a64449a5706c76802de5e975e7ead1f368d5f67b Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 3 Jul 2024 11:05:54 +0530 Subject: [PATCH 110/130] Update action.yml --- .github/actions/generate-report/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/generate-report/action.yml b/.github/actions/generate-report/action.yml index 0c1beb0d..734fd751 100644 --- a/.github/actions/generate-report/action.yml +++ b/.github/actions/generate-report/action.yml @@ -28,7 +28,7 @@ runs: if [[ "${{inputs.lang}}" == "dotnet" ]] || [[ "${{inputs.lang}}" == "dotnetstandard" ]]; then export EXPECTED_RES_LANG=csharp fi - echo EXPECTED_RES_LANG + echo $EXPECTED_RES_LANG python --version echo "Before Running Report Generation" cd ${{inputs.sample-folder-name}} From a2b3cdbd722ba55ae8743916649b673b05f2355f Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 3 Jul 2024 11:10:17 +0530 Subject: [PATCH 111/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index f3de53dd..c0cf488f 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -74,18 +74,18 @@ jobs: fi echo $VIRTUAL_ENV cd $CLIENT_FOLDER - # pip install -e . + pip install -e . cd .. echo $VIRTUAL_ENV cd $SAMPLE_FOLDER - # pip install -e . - #bash ./sample_code_runner.sh + pip install -e . + bash ./sample_code_runner.sh echo HI > output.log - name: Using Report Generation Action id: report-generation uses: ./cybersource-rest-client-python/.github/actions/generate-report with: - lang: python + lang: dotnet sample-folder-name: ${{env.SAMPLE_FOLDER}} log-file-name: output.log - name: Upload Test Reports From 5ed36bc3f2b5bfbabe1ec1ec99f859e48344ba7f Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 3 Jul 2024 11:11:10 +0530 Subject: [PATCH 112/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index c0cf488f..711622dd 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -79,7 +79,7 @@ jobs: echo $VIRTUAL_ENV cd $SAMPLE_FOLDER pip install -e . - bash ./sample_code_runner.sh + # bash ./sample_code_runner.sh echo HI > output.log - name: Using Report Generation Action id: report-generation From 9dd090e0f59cdf8613ca79f02eee7c3eebfea38d Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 3 Jul 2024 12:27:43 +0530 Subject: [PATCH 113/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 711622dd..a8aa656a 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -79,11 +79,11 @@ jobs: echo $VIRTUAL_ENV cd $SAMPLE_FOLDER pip install -e . - # bash ./sample_code_runner.sh - echo HI > output.log + bash ./sample_code_runner.sh + # echo HI > output.log - name: Using Report Generation Action id: report-generation - uses: ./cybersource-rest-client-python/.github/actions/generate-report + uses: .//.github/actions/generate-report with: lang: dotnet sample-folder-name: ${{env.SAMPLE_FOLDER}} @@ -91,7 +91,7 @@ jobs: - name: Upload Test Reports uses: actions/upload-artifact@v4 with: - name: log-files-${{matrix.operating-system}}-python-ver-${{matrix.pyth-version}} + name: sample-run-report-${{matrix.operating-system}}-python-ver-${{matrix.pyth-version}} path: | ${{env.SAMPLE_FOLDER}}/${{steps.report-generation.outputs.result-pdf-name}} # - name: Setup Python v3.12 for report generation only From 827268ebfa3cfa95945c52a5f8330309872a16c4 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 3 Jul 2024 14:41:36 +0530 Subject: [PATCH 114/130] Remoced the Comments and doing a test run --- .github/workflows/python-workflow.yml | 31 +-------------------------- 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index a8aa656a..a9a22173 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -83,7 +83,7 @@ jobs: # echo HI > output.log - name: Using Report Generation Action id: report-generation - uses: .//.github/actions/generate-report + uses: ./cybersource-rest-client-python/.github/actions/generate-report with: lang: dotnet sample-folder-name: ${{env.SAMPLE_FOLDER}} @@ -94,32 +94,3 @@ jobs: name: sample-run-report-${{matrix.operating-system}}-python-ver-${{matrix.pyth-version}} 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 --version - # echo $VIRTUAL_ENV - # echo "Before Running Report Generation" - # echo "PWD" - # pwd - # cd $SAMPLE_FOLDER - # python -m pip install --upgrade pip - # pip install json2html - # pip install xhtml2pdf - # pip install bs4 - # cd Validation - # python sample_code_log_processor.py -l ../../$SAMPLE_FOLDER/output.log -o ../../$SAMPLE_FOLDER/python_actual_results.json - # python response_code_validator.py -e ExpectedResults/python_expected_results.json -a ../../$SAMPLE_FOLDER/python_actual_results.json -o python_validation_results.json - # python json_to_prettified_html.py -i python_validation_results.json -o python_validation_results.html - # cp python_validation_results.pdf ../ #copying the file to flaatten the directory of the upload artifact,Github Actions doesn't support that as of jun 2024 - # - name: Upload Test Reports - # uses: actions/upload-artifact@v4 - # with: - # name: log-files-${{matrix.operating-system}}-python-ver-${{matrix.pyth-version}} - # path: | - # ${{env.SAMPLE_FOLDER}}/python_validation_results.pdf - -# Adding comment \ No newline at end of file From 6f859dd5b2c735bd149652e03d18b4ed27279f72 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 3 Jul 2024 15:09:30 +0530 Subject: [PATCH 115/130] checking with new virtual env --- .github/actions/generate-report/action.yml | 11 +++++++++++ .github/workflows/python-workflow.yml | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/actions/generate-report/action.yml b/.github/actions/generate-report/action.yml index 734fd751..903d9510 100644 --- a/.github/actions/generate-report/action.yml +++ b/.github/actions/generate-report/action.yml @@ -33,6 +33,17 @@ runs: 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 pip install json2html pip install xhtml2pdf pip install bs4 diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index a9a22173..3e355f86 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -79,8 +79,8 @@ jobs: echo $VIRTUAL_ENV cd $SAMPLE_FOLDER pip install -e . - bash ./sample_code_runner.sh - # echo HI > output.log + # bash ./sample_code_runner.sh + echo HI > output.log - name: Using Report Generation Action id: report-generation uses: ./cybersource-rest-client-python/.github/actions/generate-report From 31cd2525684cfbcad5871c8849e0de0dbb1f8534 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 3 Jul 2024 15:10:48 +0530 Subject: [PATCH 116/130] Update action.yml --- .github/actions/generate-report/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/generate-report/action.yml b/.github/actions/generate-report/action.yml index 903d9510..b3787523 100644 --- a/.github/actions/generate-report/action.yml +++ b/.github/actions/generate-report/action.yml @@ -44,6 +44,7 @@ runs: echo "In Windows" source newve/Scripts/activate fi + echo $VIRTUAL_ENV pip install json2html pip install xhtml2pdf pip install bs4 From 40e6d61085a4719a0459d7c50a0ad5bfc09ab0ef Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 3 Jul 2024 15:12:58 +0530 Subject: [PATCH 117/130] running test with sample code --- .github/workflows/python-workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 3e355f86..a9a22173 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -79,8 +79,8 @@ jobs: echo $VIRTUAL_ENV cd $SAMPLE_FOLDER pip install -e . - # bash ./sample_code_runner.sh - echo HI > output.log + bash ./sample_code_runner.sh + # echo HI > output.log - name: Using Report Generation Action id: report-generation uses: ./cybersource-rest-client-python/.github/actions/generate-report From 7d77494a53657e2f885d93507061415c4322ca5c Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 3 Jul 2024 15:16:56 +0530 Subject: [PATCH 118/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index a9a22173..8ba9194d 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -85,7 +85,7 @@ jobs: id: report-generation uses: ./cybersource-rest-client-python/.github/actions/generate-report with: - lang: dotnet + lang: python sample-folder-name: ${{env.SAMPLE_FOLDER}} log-file-name: output.log - name: Upload Test Reports From 9d193ecb78f2f917d18c7d6972e0ac142dd5cfc0 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Wed, 10 Jul 2024 11:22:45 +0530 Subject: [PATCH 119/130] [no ci] --- .github/workflows/python-workflow.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 8ba9194d..cdecb49d 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -80,7 +80,6 @@ jobs: cd $SAMPLE_FOLDER pip install -e . bash ./sample_code_runner.sh - # echo HI > output.log - name: Using Report Generation Action id: report-generation uses: ./cybersource-rest-client-python/.github/actions/generate-report From d6d9d9be69b7cde6b15f0d66943198f3b14885bc Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 15 Jul 2024 12:54:22 +0530 Subject: [PATCH 120/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 205 +++++++++++++++----------- 1 file changed, 116 insertions(+), 89 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index cdecb49d..db938d5c 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -3,93 +3,120 @@ on: push: pull_request: workflow_dispatch: -env: - CLIENT_FOLDER: 'cybersource-rest-client-python' - SAMPLE_FOLDER: 'cybersource-rest-samples-python' +# env: +# CLIENT_FOLDER: 'cybersource-rest-client-python' +# SAMPLE_FOLDER: 'cybersource-rest-samples-python' +# jobs: +# workflow-job: +# defaults: +# run: +# shell: bash +# strategy: +# fail-fast: false +# matrix: +# operating-system: [ubuntu-latest,macos-latest,windows-latest] +# pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12'] +# include: +# - operating-system: ubuntu-20.04 # Checking support for ubuntu os with python 3.6 +# pyth-version: '3.6' +# - operating-system: macos-13 # Checking support for mac os with python 3.6 +# pyth-version: '3.6' +# - operating-system: macos-13 # Checking support for mac os with python 3.7 +# pyth-version: '3.7' +# exclude: +# - operating-system: ubuntu-latest #arm 64 doesn't support python ver 3.7 +# pyth-version: '3.6' +# - operating-system: macos-latest #arm 64 doesn't support python ver 3.6 +# pyth-version: '3.6' +# - operating-system: macos-latest #arm 64 doesn't support python ver 3.7 +# pyth-version: '3.7' +# runs-on: ${{matrix.operating-system}} +# steps: +# - run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append +# if: runner.os == 'Windows' +# shell: pwsh +# - run: vcpkg install openssl:x64-windows-static-md +# if: runner.os == 'Windows' +# shell: pwsh +# - name: Creating separate folders for checkout repos +# run: | +# rm -rf $CLIENT_FOLDER +# rm -rf $SAMPLE_FOLDER +# mkdir $CLIENT_FOLDER $SAMPLE_FOLDER +# - name: Checkout cybersource-rest-client-python repo +# uses: actions/checkout@v4 +# with: +# path: ${{env.CLIENT_FOLDER}} +# - name: Checkout cybersource-rest-samples-python repo +# uses: actions/checkout@v4 +# with: +# repository: 'CyberSource/cybersource-rest-samples-python' +# ref: 'testing-branch' # this is used for checking out a particular branch in repo +# path: ${{env.SAMPLE_FOLDER}} +# - name: Install Python +# uses: actions/setup-python@v5 +# with: +# python-version: ${{matrix.pyth-version}} +# - name: Building the projects and running the Test Cases +# run: | +# python --version +# python -m pip install --upgrade pip +# python -m venv ve +# if [[ "$(uname -s)" == "Linux" ]]; then +# echo "In LINUX" +# source ve/bin/activate +# elif [[ "$(uname -s)" == "Darwin" ]]; then +# echo "In MAC" +# source ve/bin/activate +# else +# echo "In Windows" +# source ve/Scripts/activate +# fi +# echo $VIRTUAL_ENV +# cd $CLIENT_FOLDER +# pip install -e . +# cd .. +# echo $VIRTUAL_ENV +# cd $SAMPLE_FOLDER +# pip install -e . +# bash ./sample_code_runner.sh +# - name: Using Report Generation Action +# id: report-generation +# uses: ./cybersource-rest-client-python/.github/actions/generate-report +# with: +# lang: python +# sample-folder-name: ${{env.SAMPLE_FOLDER}} +# log-file-name: output.log +# - name: Upload Test Reports +# uses: actions/upload-artifact@v4 +# with: +# name: sample-run-report-${{matrix.operating-system}}-python-ver-${{matrix.pyth-version}} +# path: | +# ${{env.SAMPLE_FOLDER}}/${{steps.report-generation.outputs.result-pdf-name}} + jobs: - workflow-job: - defaults: - run: - shell: bash - strategy: - fail-fast: false - matrix: - operating-system: [ubuntu-latest,macos-latest,windows-latest] - pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12'] - include: - - operating-system: ubuntu-20.04 # Checking support for ubuntu os with python 3.6 - pyth-version: '3.6' - - operating-system: macos-13 # Checking support for mac os with python 3.6 - pyth-version: '3.6' - - operating-system: macos-13 # Checking support for mac os with python 3.7 - pyth-version: '3.7' - exclude: - - operating-system: ubuntu-latest #arm 64 doesn't support python ver 3.7 - pyth-version: '3.6' - - operating-system: macos-latest #arm 64 doesn't support python ver 3.6 - pyth-version: '3.6' - - operating-system: macos-latest #arm 64 doesn't support python ver 3.7 - pyth-version: '3.7' - runs-on: ${{matrix.operating-system}} - steps: - - run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append - if: runner.os == 'Windows' - shell: pwsh - - run: vcpkg install openssl:x64-windows-static-md - if: runner.os == 'Windows' - shell: pwsh - - name: Creating separate folders for checkout repos - run: | - rm -rf $CLIENT_FOLDER - rm -rf $SAMPLE_FOLDER - mkdir $CLIENT_FOLDER $SAMPLE_FOLDER - - name: Checkout cybersource-rest-client-python repo - uses: actions/checkout@v4 - with: - path: ${{env.CLIENT_FOLDER}} - - name: Checkout cybersource-rest-samples-python repo - uses: actions/checkout@v4 - with: - repository: 'CyberSource/cybersource-rest-samples-python' - ref: 'testing-branch' # this is used for checking out a particular branch in repo - path: ${{env.SAMPLE_FOLDER}} - - name: Install Python - uses: actions/setup-python@v5 - with: - python-version: ${{matrix.pyth-version}} - - name: Building the projects and running the Test Cases - run: | - python --version - python -m pip install --upgrade pip - python -m venv ve - if [[ "$(uname -s)" == "Linux" ]]; then - echo "In LINUX" - source ve/bin/activate - elif [[ "$(uname -s)" == "Darwin" ]]; then - echo "In MAC" - source ve/bin/activate - else - echo "In Windows" - source ve/Scripts/activate - fi - echo $VIRTUAL_ENV - cd $CLIENT_FOLDER - pip install -e . - cd .. - echo $VIRTUAL_ENV - cd $SAMPLE_FOLDER - pip install -e . - bash ./sample_code_runner.sh - - name: Using Report Generation Action - id: report-generation - uses: ./cybersource-rest-client-python/.github/actions/generate-report - with: - lang: python - sample-folder-name: ${{env.SAMPLE_FOLDER}} - log-file-name: output.log - - name: Upload Test Reports - uses: actions/upload-artifact@v4 - with: - name: sample-run-report-${{matrix.operating-system}}-python-ver-${{matrix.pyth-version}} - path: | - ${{env.SAMPLE_FOLDER}}/${{steps.report-generation.outputs.result-pdf-name}} + + job: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12'] + allowed-fail: false + exclude: + - pyth-version: '3.12' + allowed-fail: false + include: + - pyth-version: '3.12' + allowed-fail: true + steps: + - name: Allowed to fail step + if: ${{matrix.allowed-fail}} + run: | + echo "In ALLOWED TO FAIL" + exit 1 + continue-on-error: true + - name: step2 + run: echo "Step 2" + + From dbaedf9a4263fd63d039308d59693aeb4f583529 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 15 Jul 2024 12:56:21 +0530 Subject: [PATCH 121/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index db938d5c..5eafd0f8 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -102,7 +102,7 @@ jobs: fail-fast: false matrix: pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12'] - allowed-fail: false + allowed-fail: [false] exclude: - pyth-version: '3.12' allowed-fail: false From 9aa9b2f6a08af1a72446df2d05f8d293348e41ed Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 15 Jul 2024 13:13:24 +0530 Subject: [PATCH 122/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 205 +++++++++++--------------- 1 file changed, 89 insertions(+), 116 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 5eafd0f8..cdecb49d 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -3,120 +3,93 @@ on: push: pull_request: workflow_dispatch: -# env: -# CLIENT_FOLDER: 'cybersource-rest-client-python' -# SAMPLE_FOLDER: 'cybersource-rest-samples-python' -# jobs: -# workflow-job: -# defaults: -# run: -# shell: bash -# strategy: -# fail-fast: false -# matrix: -# operating-system: [ubuntu-latest,macos-latest,windows-latest] -# pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12'] -# include: -# - operating-system: ubuntu-20.04 # Checking support for ubuntu os with python 3.6 -# pyth-version: '3.6' -# - operating-system: macos-13 # Checking support for mac os with python 3.6 -# pyth-version: '3.6' -# - operating-system: macos-13 # Checking support for mac os with python 3.7 -# pyth-version: '3.7' -# exclude: -# - operating-system: ubuntu-latest #arm 64 doesn't support python ver 3.7 -# pyth-version: '3.6' -# - operating-system: macos-latest #arm 64 doesn't support python ver 3.6 -# pyth-version: '3.6' -# - operating-system: macos-latest #arm 64 doesn't support python ver 3.7 -# pyth-version: '3.7' -# runs-on: ${{matrix.operating-system}} -# steps: -# - run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append -# if: runner.os == 'Windows' -# shell: pwsh -# - run: vcpkg install openssl:x64-windows-static-md -# if: runner.os == 'Windows' -# shell: pwsh -# - name: Creating separate folders for checkout repos -# run: | -# rm -rf $CLIENT_FOLDER -# rm -rf $SAMPLE_FOLDER -# mkdir $CLIENT_FOLDER $SAMPLE_FOLDER -# - name: Checkout cybersource-rest-client-python repo -# uses: actions/checkout@v4 -# with: -# path: ${{env.CLIENT_FOLDER}} -# - name: Checkout cybersource-rest-samples-python repo -# uses: actions/checkout@v4 -# with: -# repository: 'CyberSource/cybersource-rest-samples-python' -# ref: 'testing-branch' # this is used for checking out a particular branch in repo -# path: ${{env.SAMPLE_FOLDER}} -# - name: Install Python -# uses: actions/setup-python@v5 -# with: -# python-version: ${{matrix.pyth-version}} -# - name: Building the projects and running the Test Cases -# run: | -# python --version -# python -m pip install --upgrade pip -# python -m venv ve -# if [[ "$(uname -s)" == "Linux" ]]; then -# echo "In LINUX" -# source ve/bin/activate -# elif [[ "$(uname -s)" == "Darwin" ]]; then -# echo "In MAC" -# source ve/bin/activate -# else -# echo "In Windows" -# source ve/Scripts/activate -# fi -# echo $VIRTUAL_ENV -# cd $CLIENT_FOLDER -# pip install -e . -# cd .. -# echo $VIRTUAL_ENV -# cd $SAMPLE_FOLDER -# pip install -e . -# bash ./sample_code_runner.sh -# - name: Using Report Generation Action -# id: report-generation -# uses: ./cybersource-rest-client-python/.github/actions/generate-report -# with: -# lang: python -# sample-folder-name: ${{env.SAMPLE_FOLDER}} -# log-file-name: output.log -# - name: Upload Test Reports -# uses: actions/upload-artifact@v4 -# with: -# name: sample-run-report-${{matrix.operating-system}}-python-ver-${{matrix.pyth-version}} -# path: | -# ${{env.SAMPLE_FOLDER}}/${{steps.report-generation.outputs.result-pdf-name}} - +env: + CLIENT_FOLDER: 'cybersource-rest-client-python' + SAMPLE_FOLDER: 'cybersource-rest-samples-python' jobs: - - job: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12'] - allowed-fail: [false] - exclude: - - pyth-version: '3.12' - allowed-fail: false - include: - - pyth-version: '3.12' - allowed-fail: true - steps: - - name: Allowed to fail step - if: ${{matrix.allowed-fail}} - run: | - echo "In ALLOWED TO FAIL" - exit 1 - continue-on-error: true - - name: step2 - run: echo "Step 2" - - + workflow-job: + defaults: + run: + shell: bash + strategy: + fail-fast: false + matrix: + operating-system: [ubuntu-latest,macos-latest,windows-latest] + pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12'] + include: + - operating-system: ubuntu-20.04 # Checking support for ubuntu os with python 3.6 + pyth-version: '3.6' + - operating-system: macos-13 # Checking support for mac os with python 3.6 + pyth-version: '3.6' + - operating-system: macos-13 # Checking support for mac os with python 3.7 + pyth-version: '3.7' + exclude: + - operating-system: ubuntu-latest #arm 64 doesn't support python ver 3.7 + pyth-version: '3.6' + - operating-system: macos-latest #arm 64 doesn't support python ver 3.6 + pyth-version: '3.6' + - operating-system: macos-latest #arm 64 doesn't support python ver 3.7 + pyth-version: '3.7' + runs-on: ${{matrix.operating-system}} + steps: + - run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append + if: runner.os == 'Windows' + shell: pwsh + - run: vcpkg install openssl:x64-windows-static-md + if: runner.os == 'Windows' + shell: pwsh + - name: Creating separate folders for checkout repos + run: | + rm -rf $CLIENT_FOLDER + rm -rf $SAMPLE_FOLDER + mkdir $CLIENT_FOLDER $SAMPLE_FOLDER + - name: Checkout cybersource-rest-client-python repo + uses: actions/checkout@v4 + with: + path: ${{env.CLIENT_FOLDER}} + - name: Checkout cybersource-rest-samples-python repo + uses: actions/checkout@v4 + with: + repository: 'CyberSource/cybersource-rest-samples-python' + ref: 'testing-branch' # this is used for checking out a particular branch in repo + path: ${{env.SAMPLE_FOLDER}} + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: ${{matrix.pyth-version}} + - name: Building the projects and running the Test Cases + run: | + python --version + python -m pip install --upgrade pip + python -m venv ve + if [[ "$(uname -s)" == "Linux" ]]; then + echo "In LINUX" + source ve/bin/activate + elif [[ "$(uname -s)" == "Darwin" ]]; then + echo "In MAC" + source ve/bin/activate + else + echo "In Windows" + source ve/Scripts/activate + fi + echo $VIRTUAL_ENV + cd $CLIENT_FOLDER + pip install -e . + cd .. + echo $VIRTUAL_ENV + cd $SAMPLE_FOLDER + pip install -e . + bash ./sample_code_runner.sh + - name: Using Report Generation Action + id: report-generation + uses: ./cybersource-rest-client-python/.github/actions/generate-report + with: + lang: python + sample-folder-name: ${{env.SAMPLE_FOLDER}} + log-file-name: output.log + - name: Upload Test Reports + uses: actions/upload-artifact@v4 + with: + name: sample-run-report-${{matrix.operating-system}}-python-ver-${{matrix.pyth-version}} + path: | + ${{env.SAMPLE_FOLDER}}/${{steps.report-generation.outputs.result-pdf-name}} From 836ed6d7466a3f61f8a6052bbb3eef22f9d98745 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 15 Jul 2024 14:48:49 +0530 Subject: [PATCH 123/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index cdecb49d..6f873e8e 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -16,13 +16,26 @@ jobs: matrix: operating-system: [ubuntu-latest,macos-latest,windows-latest] pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12'] + allow-fail: [false] include: - operating-system: ubuntu-20.04 # Checking support for ubuntu os with python 3.6 pyth-version: '3.6' + allow-fail: false - operating-system: macos-13 # Checking support for mac os with python 3.6 pyth-version: '3.6' + allow-fail: false - operating-system: macos-13 # Checking support for mac os with python 3.7 pyth-version: '3.7' + allow-fail: false + - operating-system: ubuntu-latest #arm 64 doesn't support python ver 3.7 + pyth-version: '3.6' + allow-fail: true + - operating-system: macos-latest #arm 64 doesn't support python ver 3.6 + pyth-version: '3.6' + allow-fail: true + - operating-system: macos-latest #arm 64 doesn't support python ver 3.7 + pyth-version: '3.7' + allow-fail: true exclude: - operating-system: ubuntu-latest #arm 64 doesn't support python ver 3.7 pyth-version: '3.6' @@ -35,28 +48,34 @@ jobs: - run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append if: runner.os == 'Windows' shell: pwsh + continue-on-error: ${{matrix.allow-fail}} - run: vcpkg install openssl:x64-windows-static-md if: runner.os == 'Windows' shell: pwsh + continue-on-error: ${{matrix.allow-fail}} - name: Creating separate folders for checkout repos run: | rm -rf $CLIENT_FOLDER rm -rf $SAMPLE_FOLDER mkdir $CLIENT_FOLDER $SAMPLE_FOLDER + continue-on-error: ${{matrix.allow-fail}} - name: Checkout cybersource-rest-client-python repo uses: actions/checkout@v4 with: path: ${{env.CLIENT_FOLDER}} + continue-on-error: ${{matrix.allow-fail}} - name: Checkout cybersource-rest-samples-python repo uses: actions/checkout@v4 with: repository: 'CyberSource/cybersource-rest-samples-python' ref: 'testing-branch' # this is used for checking out a particular branch in repo path: ${{env.SAMPLE_FOLDER}} + continue-on-error: ${{matrix.allow-fail}} - name: Install Python uses: actions/setup-python@v5 with: python-version: ${{matrix.pyth-version}} + continue-on-error: ${{matrix.allow-fail}} - name: Building the projects and running the Test Cases run: | python --version @@ -80,6 +99,7 @@ jobs: cd $SAMPLE_FOLDER pip install -e . bash ./sample_code_runner.sh + continue-on-error: ${{matrix.allow-fail}} - name: Using Report Generation Action id: report-generation uses: ./cybersource-rest-client-python/.github/actions/generate-report @@ -87,9 +107,11 @@ jobs: lang: python sample-folder-name: ${{env.SAMPLE_FOLDER}} log-file-name: output.log + continue-on-error: ${{matrix.allow-fail}} - name: Upload Test Reports uses: actions/upload-artifact@v4 with: name: sample-run-report-${{matrix.operating-system}}-python-ver-${{matrix.pyth-version}} path: | ${{env.SAMPLE_FOLDER}}/${{steps.report-generation.outputs.result-pdf-name}} + continue-on-error: ${{matrix.allow-fail}} From 70a6a1184b29cea62d93cd2e62a85744e6b76bfd Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 15 Jul 2024 14:51:31 +0530 Subject: [PATCH 124/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 6f873e8e..1d014d95 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -98,7 +98,8 @@ jobs: echo $VIRTUAL_ENV cd $SAMPLE_FOLDER pip install -e . - bash ./sample_code_runner.sh + # bash ./sample_code_runner.sh + echo HI > output.log continue-on-error: ${{matrix.allow-fail}} - name: Using Report Generation Action id: report-generation From 69ef1040983aeba54b14ae07e0f38a3ee84ce3f8 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 15 Jul 2024 16:07:25 +0530 Subject: [PATCH 125/130] Revert "Update python-workflow.yml" This reverts commit 70a6a1184b29cea62d93cd2e62a85744e6b76bfd. --- .github/workflows/python-workflow.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 1d014d95..6f873e8e 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -98,8 +98,7 @@ jobs: echo $VIRTUAL_ENV cd $SAMPLE_FOLDER pip install -e . - # bash ./sample_code_runner.sh - echo HI > output.log + bash ./sample_code_runner.sh continue-on-error: ${{matrix.allow-fail}} - name: Using Report Generation Action id: report-generation From dd81760aeb50d253b90f042df5297fe7c24d0a95 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 15 Jul 2024 16:07:33 +0530 Subject: [PATCH 126/130] Revert "Update python-workflow.yml" This reverts commit 836ed6d7466a3f61f8a6052bbb3eef22f9d98745. --- .github/workflows/python-workflow.yml | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 6f873e8e..cdecb49d 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -16,26 +16,13 @@ jobs: matrix: operating-system: [ubuntu-latest,macos-latest,windows-latest] pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12'] - allow-fail: [false] include: - operating-system: ubuntu-20.04 # Checking support for ubuntu os with python 3.6 pyth-version: '3.6' - allow-fail: false - operating-system: macos-13 # Checking support for mac os with python 3.6 pyth-version: '3.6' - allow-fail: false - operating-system: macos-13 # Checking support for mac os with python 3.7 pyth-version: '3.7' - allow-fail: false - - operating-system: ubuntu-latest #arm 64 doesn't support python ver 3.7 - pyth-version: '3.6' - allow-fail: true - - operating-system: macos-latest #arm 64 doesn't support python ver 3.6 - pyth-version: '3.6' - allow-fail: true - - operating-system: macos-latest #arm 64 doesn't support python ver 3.7 - pyth-version: '3.7' - allow-fail: true exclude: - operating-system: ubuntu-latest #arm 64 doesn't support python ver 3.7 pyth-version: '3.6' @@ -48,34 +35,28 @@ jobs: - run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append if: runner.os == 'Windows' shell: pwsh - continue-on-error: ${{matrix.allow-fail}} - run: vcpkg install openssl:x64-windows-static-md if: runner.os == 'Windows' shell: pwsh - continue-on-error: ${{matrix.allow-fail}} - name: Creating separate folders for checkout repos run: | rm -rf $CLIENT_FOLDER rm -rf $SAMPLE_FOLDER mkdir $CLIENT_FOLDER $SAMPLE_FOLDER - continue-on-error: ${{matrix.allow-fail}} - name: Checkout cybersource-rest-client-python repo uses: actions/checkout@v4 with: path: ${{env.CLIENT_FOLDER}} - continue-on-error: ${{matrix.allow-fail}} - name: Checkout cybersource-rest-samples-python repo uses: actions/checkout@v4 with: repository: 'CyberSource/cybersource-rest-samples-python' ref: 'testing-branch' # this is used for checking out a particular branch in repo path: ${{env.SAMPLE_FOLDER}} - continue-on-error: ${{matrix.allow-fail}} - name: Install Python uses: actions/setup-python@v5 with: python-version: ${{matrix.pyth-version}} - continue-on-error: ${{matrix.allow-fail}} - name: Building the projects and running the Test Cases run: | python --version @@ -99,7 +80,6 @@ jobs: cd $SAMPLE_FOLDER pip install -e . bash ./sample_code_runner.sh - continue-on-error: ${{matrix.allow-fail}} - name: Using Report Generation Action id: report-generation uses: ./cybersource-rest-client-python/.github/actions/generate-report @@ -107,11 +87,9 @@ jobs: lang: python sample-folder-name: ${{env.SAMPLE_FOLDER}} log-file-name: output.log - continue-on-error: ${{matrix.allow-fail}} - name: Upload Test Reports uses: actions/upload-artifact@v4 with: name: sample-run-report-${{matrix.operating-system}}-python-ver-${{matrix.pyth-version}} path: | ${{env.SAMPLE_FOLDER}}/${{steps.report-generation.outputs.result-pdf-name}} - continue-on-error: ${{matrix.allow-fail}} From 19ee2cd745cb4d78dfcff09c0f3585e4a86dd072 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 15 Jul 2024 16:07:38 +0530 Subject: [PATCH 127/130] Revert "Update python-workflow.yml" This reverts commit 9aa9b2f6a08af1a72446df2d05f8d293348e41ed. --- .github/workflows/python-workflow.yml | 205 +++++++++++++++----------- 1 file changed, 116 insertions(+), 89 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index cdecb49d..5eafd0f8 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -3,93 +3,120 @@ on: push: pull_request: workflow_dispatch: -env: - CLIENT_FOLDER: 'cybersource-rest-client-python' - SAMPLE_FOLDER: 'cybersource-rest-samples-python' +# env: +# CLIENT_FOLDER: 'cybersource-rest-client-python' +# SAMPLE_FOLDER: 'cybersource-rest-samples-python' +# jobs: +# workflow-job: +# defaults: +# run: +# shell: bash +# strategy: +# fail-fast: false +# matrix: +# operating-system: [ubuntu-latest,macos-latest,windows-latest] +# pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12'] +# include: +# - operating-system: ubuntu-20.04 # Checking support for ubuntu os with python 3.6 +# pyth-version: '3.6' +# - operating-system: macos-13 # Checking support for mac os with python 3.6 +# pyth-version: '3.6' +# - operating-system: macos-13 # Checking support for mac os with python 3.7 +# pyth-version: '3.7' +# exclude: +# - operating-system: ubuntu-latest #arm 64 doesn't support python ver 3.7 +# pyth-version: '3.6' +# - operating-system: macos-latest #arm 64 doesn't support python ver 3.6 +# pyth-version: '3.6' +# - operating-system: macos-latest #arm 64 doesn't support python ver 3.7 +# pyth-version: '3.7' +# runs-on: ${{matrix.operating-system}} +# steps: +# - run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append +# if: runner.os == 'Windows' +# shell: pwsh +# - run: vcpkg install openssl:x64-windows-static-md +# if: runner.os == 'Windows' +# shell: pwsh +# - name: Creating separate folders for checkout repos +# run: | +# rm -rf $CLIENT_FOLDER +# rm -rf $SAMPLE_FOLDER +# mkdir $CLIENT_FOLDER $SAMPLE_FOLDER +# - name: Checkout cybersource-rest-client-python repo +# uses: actions/checkout@v4 +# with: +# path: ${{env.CLIENT_FOLDER}} +# - name: Checkout cybersource-rest-samples-python repo +# uses: actions/checkout@v4 +# with: +# repository: 'CyberSource/cybersource-rest-samples-python' +# ref: 'testing-branch' # this is used for checking out a particular branch in repo +# path: ${{env.SAMPLE_FOLDER}} +# - name: Install Python +# uses: actions/setup-python@v5 +# with: +# python-version: ${{matrix.pyth-version}} +# - name: Building the projects and running the Test Cases +# run: | +# python --version +# python -m pip install --upgrade pip +# python -m venv ve +# if [[ "$(uname -s)" == "Linux" ]]; then +# echo "In LINUX" +# source ve/bin/activate +# elif [[ "$(uname -s)" == "Darwin" ]]; then +# echo "In MAC" +# source ve/bin/activate +# else +# echo "In Windows" +# source ve/Scripts/activate +# fi +# echo $VIRTUAL_ENV +# cd $CLIENT_FOLDER +# pip install -e . +# cd .. +# echo $VIRTUAL_ENV +# cd $SAMPLE_FOLDER +# pip install -e . +# bash ./sample_code_runner.sh +# - name: Using Report Generation Action +# id: report-generation +# uses: ./cybersource-rest-client-python/.github/actions/generate-report +# with: +# lang: python +# sample-folder-name: ${{env.SAMPLE_FOLDER}} +# log-file-name: output.log +# - name: Upload Test Reports +# uses: actions/upload-artifact@v4 +# with: +# name: sample-run-report-${{matrix.operating-system}}-python-ver-${{matrix.pyth-version}} +# path: | +# ${{env.SAMPLE_FOLDER}}/${{steps.report-generation.outputs.result-pdf-name}} + jobs: - workflow-job: - defaults: - run: - shell: bash - strategy: - fail-fast: false - matrix: - operating-system: [ubuntu-latest,macos-latest,windows-latest] - pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12'] - include: - - operating-system: ubuntu-20.04 # Checking support for ubuntu os with python 3.6 - pyth-version: '3.6' - - operating-system: macos-13 # Checking support for mac os with python 3.6 - pyth-version: '3.6' - - operating-system: macos-13 # Checking support for mac os with python 3.7 - pyth-version: '3.7' - exclude: - - operating-system: ubuntu-latest #arm 64 doesn't support python ver 3.7 - pyth-version: '3.6' - - operating-system: macos-latest #arm 64 doesn't support python ver 3.6 - pyth-version: '3.6' - - operating-system: macos-latest #arm 64 doesn't support python ver 3.7 - pyth-version: '3.7' - runs-on: ${{matrix.operating-system}} - steps: - - run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append - if: runner.os == 'Windows' - shell: pwsh - - run: vcpkg install openssl:x64-windows-static-md - if: runner.os == 'Windows' - shell: pwsh - - name: Creating separate folders for checkout repos - run: | - rm -rf $CLIENT_FOLDER - rm -rf $SAMPLE_FOLDER - mkdir $CLIENT_FOLDER $SAMPLE_FOLDER - - name: Checkout cybersource-rest-client-python repo - uses: actions/checkout@v4 - with: - path: ${{env.CLIENT_FOLDER}} - - name: Checkout cybersource-rest-samples-python repo - uses: actions/checkout@v4 - with: - repository: 'CyberSource/cybersource-rest-samples-python' - ref: 'testing-branch' # this is used for checking out a particular branch in repo - path: ${{env.SAMPLE_FOLDER}} - - name: Install Python - uses: actions/setup-python@v5 - with: - python-version: ${{matrix.pyth-version}} - - name: Building the projects and running the Test Cases - run: | - python --version - python -m pip install --upgrade pip - python -m venv ve - if [[ "$(uname -s)" == "Linux" ]]; then - echo "In LINUX" - source ve/bin/activate - elif [[ "$(uname -s)" == "Darwin" ]]; then - echo "In MAC" - source ve/bin/activate - else - echo "In Windows" - source ve/Scripts/activate - fi - echo $VIRTUAL_ENV - cd $CLIENT_FOLDER - pip install -e . - cd .. - echo $VIRTUAL_ENV - cd $SAMPLE_FOLDER - pip install -e . - bash ./sample_code_runner.sh - - name: Using Report Generation Action - id: report-generation - uses: ./cybersource-rest-client-python/.github/actions/generate-report - with: - lang: python - sample-folder-name: ${{env.SAMPLE_FOLDER}} - log-file-name: output.log - - name: Upload Test Reports - uses: actions/upload-artifact@v4 - with: - name: sample-run-report-${{matrix.operating-system}}-python-ver-${{matrix.pyth-version}} - path: | - ${{env.SAMPLE_FOLDER}}/${{steps.report-generation.outputs.result-pdf-name}} + + job: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12'] + allowed-fail: [false] + exclude: + - pyth-version: '3.12' + allowed-fail: false + include: + - pyth-version: '3.12' + allowed-fail: true + steps: + - name: Allowed to fail step + if: ${{matrix.allowed-fail}} + run: | + echo "In ALLOWED TO FAIL" + exit 1 + continue-on-error: true + - name: step2 + run: echo "Step 2" + + From cf07b9af099edbeef1f4c97bd915b19ed995c2ad Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 15 Jul 2024 16:07:43 +0530 Subject: [PATCH 128/130] Revert "Update python-workflow.yml" This reverts commit dbaedf9a4263fd63d039308d59693aeb4f583529. --- .github/workflows/python-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index 5eafd0f8..db938d5c 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -102,7 +102,7 @@ jobs: fail-fast: false matrix: pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12'] - allowed-fail: [false] + allowed-fail: false exclude: - pyth-version: '3.12' allowed-fail: false From 35b20dac76cdb351a9daa9508a3f2e3e6153d7db Mon Sep 17 00:00:00 2001 From: aasgoel Date: Mon, 15 Jul 2024 16:07:48 +0530 Subject: [PATCH 129/130] Revert "Update python-workflow.yml" This reverts commit d6d9d9be69b7cde6b15f0d66943198f3b14885bc. --- .github/workflows/python-workflow.yml | 205 +++++++++++--------------- 1 file changed, 89 insertions(+), 116 deletions(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index db938d5c..cdecb49d 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -3,120 +3,93 @@ on: push: pull_request: workflow_dispatch: -# env: -# CLIENT_FOLDER: 'cybersource-rest-client-python' -# SAMPLE_FOLDER: 'cybersource-rest-samples-python' -# jobs: -# workflow-job: -# defaults: -# run: -# shell: bash -# strategy: -# fail-fast: false -# matrix: -# operating-system: [ubuntu-latest,macos-latest,windows-latest] -# pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12'] -# include: -# - operating-system: ubuntu-20.04 # Checking support for ubuntu os with python 3.6 -# pyth-version: '3.6' -# - operating-system: macos-13 # Checking support for mac os with python 3.6 -# pyth-version: '3.6' -# - operating-system: macos-13 # Checking support for mac os with python 3.7 -# pyth-version: '3.7' -# exclude: -# - operating-system: ubuntu-latest #arm 64 doesn't support python ver 3.7 -# pyth-version: '3.6' -# - operating-system: macos-latest #arm 64 doesn't support python ver 3.6 -# pyth-version: '3.6' -# - operating-system: macos-latest #arm 64 doesn't support python ver 3.7 -# pyth-version: '3.7' -# runs-on: ${{matrix.operating-system}} -# steps: -# - run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append -# if: runner.os == 'Windows' -# shell: pwsh -# - run: vcpkg install openssl:x64-windows-static-md -# if: runner.os == 'Windows' -# shell: pwsh -# - name: Creating separate folders for checkout repos -# run: | -# rm -rf $CLIENT_FOLDER -# rm -rf $SAMPLE_FOLDER -# mkdir $CLIENT_FOLDER $SAMPLE_FOLDER -# - name: Checkout cybersource-rest-client-python repo -# uses: actions/checkout@v4 -# with: -# path: ${{env.CLIENT_FOLDER}} -# - name: Checkout cybersource-rest-samples-python repo -# uses: actions/checkout@v4 -# with: -# repository: 'CyberSource/cybersource-rest-samples-python' -# ref: 'testing-branch' # this is used for checking out a particular branch in repo -# path: ${{env.SAMPLE_FOLDER}} -# - name: Install Python -# uses: actions/setup-python@v5 -# with: -# python-version: ${{matrix.pyth-version}} -# - name: Building the projects and running the Test Cases -# run: | -# python --version -# python -m pip install --upgrade pip -# python -m venv ve -# if [[ "$(uname -s)" == "Linux" ]]; then -# echo "In LINUX" -# source ve/bin/activate -# elif [[ "$(uname -s)" == "Darwin" ]]; then -# echo "In MAC" -# source ve/bin/activate -# else -# echo "In Windows" -# source ve/Scripts/activate -# fi -# echo $VIRTUAL_ENV -# cd $CLIENT_FOLDER -# pip install -e . -# cd .. -# echo $VIRTUAL_ENV -# cd $SAMPLE_FOLDER -# pip install -e . -# bash ./sample_code_runner.sh -# - name: Using Report Generation Action -# id: report-generation -# uses: ./cybersource-rest-client-python/.github/actions/generate-report -# with: -# lang: python -# sample-folder-name: ${{env.SAMPLE_FOLDER}} -# log-file-name: output.log -# - name: Upload Test Reports -# uses: actions/upload-artifact@v4 -# with: -# name: sample-run-report-${{matrix.operating-system}}-python-ver-${{matrix.pyth-version}} -# path: | -# ${{env.SAMPLE_FOLDER}}/${{steps.report-generation.outputs.result-pdf-name}} - +env: + CLIENT_FOLDER: 'cybersource-rest-client-python' + SAMPLE_FOLDER: 'cybersource-rest-samples-python' jobs: - - job: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12'] - allowed-fail: false - exclude: - - pyth-version: '3.12' - allowed-fail: false - include: - - pyth-version: '3.12' - allowed-fail: true - steps: - - name: Allowed to fail step - if: ${{matrix.allowed-fail}} - run: | - echo "In ALLOWED TO FAIL" - exit 1 - continue-on-error: true - - name: step2 - run: echo "Step 2" - - + workflow-job: + defaults: + run: + shell: bash + strategy: + fail-fast: false + matrix: + operating-system: [ubuntu-latest,macos-latest,windows-latest] + pyth-version: ['3.6','3.7','3.8','3.9','3.10','3.11','3.12'] + include: + - operating-system: ubuntu-20.04 # Checking support for ubuntu os with python 3.6 + pyth-version: '3.6' + - operating-system: macos-13 # Checking support for mac os with python 3.6 + pyth-version: '3.6' + - operating-system: macos-13 # Checking support for mac os with python 3.7 + pyth-version: '3.7' + exclude: + - operating-system: ubuntu-latest #arm 64 doesn't support python ver 3.7 + pyth-version: '3.6' + - operating-system: macos-latest #arm 64 doesn't support python ver 3.6 + pyth-version: '3.6' + - operating-system: macos-latest #arm 64 doesn't support python ver 3.7 + pyth-version: '3.7' + runs-on: ${{matrix.operating-system}} + steps: + - run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append + if: runner.os == 'Windows' + shell: pwsh + - run: vcpkg install openssl:x64-windows-static-md + if: runner.os == 'Windows' + shell: pwsh + - name: Creating separate folders for checkout repos + run: | + rm -rf $CLIENT_FOLDER + rm -rf $SAMPLE_FOLDER + mkdir $CLIENT_FOLDER $SAMPLE_FOLDER + - name: Checkout cybersource-rest-client-python repo + uses: actions/checkout@v4 + with: + path: ${{env.CLIENT_FOLDER}} + - name: Checkout cybersource-rest-samples-python repo + uses: actions/checkout@v4 + with: + repository: 'CyberSource/cybersource-rest-samples-python' + ref: 'testing-branch' # this is used for checking out a particular branch in repo + path: ${{env.SAMPLE_FOLDER}} + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: ${{matrix.pyth-version}} + - name: Building the projects and running the Test Cases + run: | + python --version + python -m pip install --upgrade pip + python -m venv ve + if [[ "$(uname -s)" == "Linux" ]]; then + echo "In LINUX" + source ve/bin/activate + elif [[ "$(uname -s)" == "Darwin" ]]; then + echo "In MAC" + source ve/bin/activate + else + echo "In Windows" + source ve/Scripts/activate + fi + echo $VIRTUAL_ENV + cd $CLIENT_FOLDER + pip install -e . + cd .. + echo $VIRTUAL_ENV + cd $SAMPLE_FOLDER + pip install -e . + bash ./sample_code_runner.sh + - name: Using Report Generation Action + id: report-generation + uses: ./cybersource-rest-client-python/.github/actions/generate-report + with: + lang: python + sample-folder-name: ${{env.SAMPLE_FOLDER}} + log-file-name: output.log + - name: Upload Test Reports + uses: actions/upload-artifact@v4 + with: + name: sample-run-report-${{matrix.operating-system}}-python-ver-${{matrix.pyth-version}} + path: | + ${{env.SAMPLE_FOLDER}}/${{steps.report-generation.outputs.result-pdf-name}} From 0e1dc836348a726cfd2b3f23e9bc69bb78f522e0 Mon Sep 17 00:00:00 2001 From: aasgoel Date: Tue, 16 Jul 2024 11:48:53 +0530 Subject: [PATCH 130/130] Update python-workflow.yml --- .github/workflows/python-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index cdecb49d..8e42cdc5 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -51,7 +51,7 @@ jobs: uses: actions/checkout@v4 with: repository: 'CyberSource/cybersource-rest-samples-python' - ref: 'testing-branch' # this is used for checking out a particular branch in repo + ref: 'master' # this is used for checking out a particular branch in repo path: ${{env.SAMPLE_FOLDER}} - name: Install Python uses: actions/setup-python@v5