From 9bc7862e159afa3ddfe7d5b0fdb9e1e6ddd53be5 Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Fri, 11 Oct 2024 12:25:26 +0530 Subject: [PATCH 01/27] increase alpha version for testing --- .github/workflows/publish.yml | 1 + setup.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8d4bd879..aef205bc 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,6 +2,7 @@ name: Publish on: release: types: [published] + push: jobs: publish: diff --git a/setup.py b/setup.py index c85f5e42..03edc9ce 100644 --- a/setup.py +++ b/setup.py @@ -48,5 +48,5 @@ def read_file(filename): keywords="xero python sdk API oAuth", name="xero_python", packages=find_packages(include=["xero_python", "xero_python.*"]), - version="6.3.0", + version="6.3.0-alpha.6", ) From cc72c3b3d3d5c31acf003525f3352fb7bdf0b954 Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Fri, 11 Oct 2024 12:58:41 +0530 Subject: [PATCH 02/27] adds verbose --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index aef205bc..cf691a98 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -36,5 +36,5 @@ jobs: env: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_APIKEY }} - run: twine upload --repository-url https://test.pypi.org/legacy/ dist/* + run: twine upload --repository-url https://test.pypi.org/legacy/ dist/* --verbose working-directory: xero-python From 22e9cf26b9d5e8179aadf3e76786d7a64bfca65c Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Tue, 22 Oct 2024 14:56:38 +0530 Subject: [PATCH 03/27] verify publish with the new token --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 03edc9ce..2475ed78 100644 --- a/setup.py +++ b/setup.py @@ -48,5 +48,5 @@ def read_file(filename): keywords="xero python sdk API oAuth", name="xero_python", packages=find_packages(include=["xero_python", "xero_python.*"]), - version="6.3.0-alpha.6", + version="6.3.0-alpha.7", ) From 651e4e38f65811a4886ec41d2383c5f0f9bcefa1 Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Tue, 22 Oct 2024 16:09:15 +0530 Subject: [PATCH 04/27] adds if case to publish either to pypi or testpypi --- .github/workflows/publish.yml | 9 ++++++--- setup.py | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index cf691a98..5fbec6e8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,7 +2,6 @@ name: Publish on: release: types: [published] - push: jobs: publish: @@ -35,6 +34,10 @@ jobs: - name: Publish to PyPi env: TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_APIKEY }} - run: twine upload --repository-url https://test.pypi.org/legacy/ dist/* --verbose + run: | + if [[ "${{ github.event.release.name }}" == *"alpha"* || "${{ github.event.release.name }}" == *"beta"* ]]; then + TWINE_PASSWORD: ${{ secrets.PYPI_APIKEY }} twine upload --repository-url https://test.pypi.org/legacy/ dist/* --verbose + else + TWINE_PASSWORD: ${{ secrets.PYPI_APIKEY }} twine upload dist/* --verbose + fi working-directory: xero-python diff --git a/setup.py b/setup.py index 2475ed78..aecde582 100644 --- a/setup.py +++ b/setup.py @@ -48,5 +48,5 @@ def read_file(filename): keywords="xero python sdk API oAuth", name="xero_python", packages=find_packages(include=["xero_python", "xero_python.*"]), - version="6.3.0-alpha.7", + version="6.3.0-alpha.8", ) From 1de299aa9e9e3d0fe592a0d365b62101cacf5e40 Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Tue, 22 Oct 2024 16:13:14 +0530 Subject: [PATCH 05/27] update publish script --- .github/workflows/publish.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5fbec6e8..68ace87d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -34,10 +34,12 @@ jobs: - name: Publish to PyPi env: TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_APIKEY }} run: | if [[ "${{ github.event.release.name }}" == *"alpha"* || "${{ github.event.release.name }}" == *"beta"* ]]; then TWINE_PASSWORD: ${{ secrets.PYPI_APIKEY }} twine upload --repository-url https://test.pypi.org/legacy/ dist/* --verbose else - TWINE_PASSWORD: ${{ secrets.PYPI_APIKEY }} twine upload dist/* --verbose + TWINE_PASSWORD: ${{ secrets.PYPI_APIKEY }} + twine upload dist/* --verbose fi working-directory: xero-python From 65a9aa27be098028bd248dd0df1640f0ea1f68e9 Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Tue, 22 Oct 2024 16:16:59 +0530 Subject: [PATCH 06/27] deploy to pypi instead of test instance --- .github/workflows/publish.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 68ace87d..10f9e1bd 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,6 +2,7 @@ name: Publish on: release: types: [published] + push: jobs: publish: @@ -35,11 +36,5 @@ jobs: env: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_APIKEY }} - run: | - if [[ "${{ github.event.release.name }}" == *"alpha"* || "${{ github.event.release.name }}" == *"beta"* ]]; then - TWINE_PASSWORD: ${{ secrets.PYPI_APIKEY }} twine upload --repository-url https://test.pypi.org/legacy/ dist/* --verbose - else - TWINE_PASSWORD: ${{ secrets.PYPI_APIKEY }} - twine upload dist/* --verbose - fi + run: twine upload dist/* --verbose working-directory: xero-python From 8473d38aab3d632e7bc9315db076fa31d594acca Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Tue, 22 Oct 2024 16:18:16 +0530 Subject: [PATCH 07/27] removed unwanted changes --- .github/workflows/publish.yml | 1 - setup.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 10f9e1bd..5b70cbab 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,7 +2,6 @@ name: Publish on: release: types: [published] - push: jobs: publish: diff --git a/setup.py b/setup.py index aecde582..c85f5e42 100644 --- a/setup.py +++ b/setup.py @@ -48,5 +48,5 @@ def read_file(filename): keywords="xero python sdk API oAuth", name="xero_python", packages=find_packages(include=["xero_python", "xero_python.*"]), - version="6.3.0-alpha.8", + version="6.3.0", ) From 7a1632ea2760d3babf7d70cd6b55fa3f336f5543 Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Tue, 22 Oct 2024 16:31:07 +0530 Subject: [PATCH 08/27] removed the verbose flag --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5b70cbab..6127c9cf 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -35,5 +35,5 @@ jobs: env: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_APIKEY }} - run: twine upload dist/* --verbose + run: twine upload dist/* working-directory: xero-python From 26d6e2ff56c53fb984920b0c6e2cdc4d2cbcec7d Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Tue, 22 Oct 2024 17:59:08 +0530 Subject: [PATCH 09/27] start and stop prism for running tests --- .github/workflows/build-test-lint.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-test-lint.yml b/.github/workflows/build-test-lint.yml index b2cdbcf3..ae2c1562 100644 --- a/.github/workflows/build-test-lint.yml +++ b/.github/workflows/build-test-lint.yml @@ -43,9 +43,16 @@ jobs: run: python setup.py sdist working-directory: xero-python - # - name: Run Test - # run: | - # source venv/bin/activate - # pip install -r requirements/test.txt - # pytest -v - # working-directory: xero-python + - name: Start PRISM Server + run: sudo ./start-prism.sh + working-directory: xero-python/tests/utils + + - name: Run Test + run: | + source venv/bin/activate + pytest -v + working-directory: xero-python + + - name: Stop PRISM + run: pkill -f prism + working-directory: xero-python From d20a509a94c016e889b1a73c0a5bb8ba1e8ff184 Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Tue, 22 Oct 2024 18:01:05 +0530 Subject: [PATCH 10/27] install prism --- .github/workflows/build-test-lint.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/build-test-lint.yml b/.github/workflows/build-test-lint.yml index ae2c1562..11b0737c 100644 --- a/.github/workflows/build-test-lint.yml +++ b/.github/workflows/build-test-lint.yml @@ -43,6 +43,14 @@ jobs: run: python setup.py sdist working-directory: xero-python + - name: Install Node.js + uses: actions/setup-node@v2 + with: + node-version: 20 + + - name: Install Prism + run: npm install -g @stoplight/prism-cli + - name: Start PRISM Server run: sudo ./start-prism.sh working-directory: xero-python/tests/utils From 41fd22a34980abe16ffe56d219755aca99a4b691 Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Tue, 22 Oct 2024 18:11:48 +0530 Subject: [PATCH 11/27] check if prism is installed properly --- .github/workflows/build-test-lint.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build-test-lint.yml b/.github/workflows/build-test-lint.yml index 11b0737c..26543f37 100644 --- a/.github/workflows/build-test-lint.yml +++ b/.github/workflows/build-test-lint.yml @@ -51,6 +51,9 @@ jobs: - name: Install Prism run: npm install -g @stoplight/prism-cli + - name: CHeck PRISM + run: prism --version + - name: Start PRISM Server run: sudo ./start-prism.sh working-directory: xero-python/tests/utils From e3e7fce2ff645e97abc2939aea79bac1d7ff821b Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Tue, 22 Oct 2024 18:15:59 +0530 Subject: [PATCH 12/27] corrected start script --- tests/utils/start-prism.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/utils/start-prism.sh b/tests/utils/start-prism.sh index 92b55f1d..7a29b941 100755 --- a/tests/utils/start-prism.sh +++ b/tests/utils/start-prism.sh @@ -1,3 +1,5 @@ +#!/bin/bash + prism mock https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/refs/heads/master/xero_accounting.yaml --host 127.0.0.1 --port 4010 & prism mock https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/refs/heads/master/xero-app-store.yaml --host 127.0.0.1 --port 4011 & prism mock https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/refs/heads/master/xero_assets.yaml --host 127.0.0.1 --port 4012 & From b672e73a456faaeec43d2c3985df6c19b65008b7 Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Tue, 22 Oct 2024 18:17:58 +0530 Subject: [PATCH 13/27] removed sudo --- .github/workflows/build-test-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test-lint.yml b/.github/workflows/build-test-lint.yml index 26543f37..3c7aba08 100644 --- a/.github/workflows/build-test-lint.yml +++ b/.github/workflows/build-test-lint.yml @@ -55,7 +55,7 @@ jobs: run: prism --version - name: Start PRISM Server - run: sudo ./start-prism.sh + run: ./start-prism.sh working-directory: xero-python/tests/utils - name: Run Test From 7834c276dfeee886d7e630d5d6a9767b381b3549 Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Tue, 22 Oct 2024 18:20:34 +0530 Subject: [PATCH 14/27] adds nohup --- .github/workflows/build-test-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test-lint.yml b/.github/workflows/build-test-lint.yml index 3c7aba08..b6789395 100644 --- a/.github/workflows/build-test-lint.yml +++ b/.github/workflows/build-test-lint.yml @@ -55,7 +55,7 @@ jobs: run: prism --version - name: Start PRISM Server - run: ./start-prism.sh + run: nohup ./start-prism.sh working-directory: xero-python/tests/utils - name: Run Test From ec413b6e0c8e1eda4ff6f395856361e161da0acb Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Wed, 23 Oct 2024 08:49:32 +0530 Subject: [PATCH 15/27] adds disown --- .github/workflows/build-test-lint.yml | 23 ++++++++++------------- tests/utils/start-prism.sh | 2 ++ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-test-lint.yml b/.github/workflows/build-test-lint.yml index b6789395..e290dab0 100644 --- a/.github/workflows/build-test-lint.yml +++ b/.github/workflows/build-test-lint.yml @@ -31,17 +31,17 @@ jobs: pip install -r requirements.txt -r requirements/dev.txt working-directory: xero-python - - name: Check vulnerable packages - run: pip-audit -r requirements.txt -r requirements/dev.txt - working-directory: xero-python + # - name: Check vulnerable packages + # run: pip-audit -r requirements.txt -r requirements/dev.txt + # working-directory: xero-python - - name: Run Flake8 - run: flake8 xero_python - working-directory: xero-python + # - name: Run Flake8 + # run: flake8 xero_python + # working-directory: xero-python - - name: Build package - run: python setup.py sdist - working-directory: xero-python + # - name: Build package + # run: python setup.py sdist + # working-directory: xero-python - name: Install Node.js uses: actions/setup-node@v2 @@ -51,11 +51,8 @@ jobs: - name: Install Prism run: npm install -g @stoplight/prism-cli - - name: CHeck PRISM - run: prism --version - - name: Start PRISM Server - run: nohup ./start-prism.sh + run: ./start-prism.sh working-directory: xero-python/tests/utils - name: Run Test diff --git a/tests/utils/start-prism.sh b/tests/utils/start-prism.sh index 7a29b941..454594a4 100755 --- a/tests/utils/start-prism.sh +++ b/tests/utils/start-prism.sh @@ -9,3 +9,5 @@ prism mock https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/refs/heads/mas prism mock https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/refs/heads/master/xero-payroll-nz.yaml --host 127.0.0.1 --port 4016 & prism mock https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/refs/heads/master/xero-payroll-au.yaml --host 127.0.0.1 --port 4017 & prism mock https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/refs/heads/master/xero-projects.yaml --host 127.0.0.1 --port 4018 + +disown From bea1f9d2fdde809385a64273bd599e4a265f3121 Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Wed, 23 Oct 2024 09:26:51 +0530 Subject: [PATCH 16/27] adds continue-on-error --- .github/workflows/build-test-lint.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-test-lint.yml b/.github/workflows/build-test-lint.yml index e290dab0..068f5ef2 100644 --- a/.github/workflows/build-test-lint.yml +++ b/.github/workflows/build-test-lint.yml @@ -52,7 +52,8 @@ jobs: run: npm install -g @stoplight/prism-cli - name: Start PRISM Server - run: ./start-prism.sh + run: | + ./start-prism.sh & echo $! > prism_pid.txt working-directory: xero-python/tests/utils - name: Run Test @@ -60,7 +61,9 @@ jobs: source venv/bin/activate pytest -v working-directory: xero-python + continue-on-error: true - name: Stop PRISM + if: success() || failure() run: pkill -f prism working-directory: xero-python From 15f4f5177707f664076f211032235bee6d75d70f Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Wed, 23 Oct 2024 09:28:42 +0530 Subject: [PATCH 17/27] uncommented and adds sleep --- .github/workflows/build-test-lint.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-test-lint.yml b/.github/workflows/build-test-lint.yml index 068f5ef2..fa06ee26 100644 --- a/.github/workflows/build-test-lint.yml +++ b/.github/workflows/build-test-lint.yml @@ -31,17 +31,17 @@ jobs: pip install -r requirements.txt -r requirements/dev.txt working-directory: xero-python - # - name: Check vulnerable packages - # run: pip-audit -r requirements.txt -r requirements/dev.txt - # working-directory: xero-python + - name: Check vulnerable packages + run: pip-audit -r requirements.txt -r requirements/dev.txt + working-directory: xero-python - # - name: Run Flake8 - # run: flake8 xero_python - # working-directory: xero-python + - name: Run Flake8 + run: flake8 xero_python + working-directory: xero-python - # - name: Build package - # run: python setup.py sdist - # working-directory: xero-python + - name: Build package + run: python setup.py sdist + working-directory: xero-python - name: Install Node.js uses: actions/setup-node@v2 @@ -54,6 +54,7 @@ jobs: - name: Start PRISM Server run: | ./start-prism.sh & echo $! > prism_pid.txt + sleep 10 working-directory: xero-python/tests/utils - name: Run Test From 234066df4180d009b874e8823adf4fdeaceb169a Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Wed, 23 Oct 2024 09:32:00 +0530 Subject: [PATCH 18/27] commented source activation --- .github/workflows/build-test-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test-lint.yml b/.github/workflows/build-test-lint.yml index fa06ee26..d807f8cf 100644 --- a/.github/workflows/build-test-lint.yml +++ b/.github/workflows/build-test-lint.yml @@ -59,7 +59,7 @@ jobs: - name: Run Test run: | - source venv/bin/activate + # source venv/bin/activate pytest -v working-directory: xero-python continue-on-error: true From 0b9cc88c738939635d08df75b42fc5d90c65ba18 Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Wed, 23 Oct 2024 09:35:14 +0530 Subject: [PATCH 19/27] adds environment --- .github/workflows/build-test-lint.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-test-lint.yml b/.github/workflows/build-test-lint.yml index d807f8cf..7321d3b8 100644 --- a/.github/workflows/build-test-lint.yml +++ b/.github/workflows/build-test-lint.yml @@ -59,7 +59,8 @@ jobs: - name: Run Test run: | - # source venv/bin/activate + python -m venv venv + source venv/bin/activate pytest -v working-directory: xero-python continue-on-error: true From 0b05dd374eaae820217341b46d2de8a9a1420dbc Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Wed, 23 Oct 2024 09:40:39 +0530 Subject: [PATCH 20/27] removed version for urllib3 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 7be89c5b..f1163e77 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ # make sure content of this file can be parsed by setup.load_requirements python-dateutil>=2.7 -urllib3>=2.2.3 +urllib3 certifi setuptools>=75.1.0 From 20873cd2ec8504bb6a788d92d328f061bec7344b Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Wed, 23 Oct 2024 10:05:47 +0530 Subject: [PATCH 21/27] increase sleep timing --- .github/workflows/build-test-lint.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-test-lint.yml b/.github/workflows/build-test-lint.yml index 7321d3b8..94d50534 100644 --- a/.github/workflows/build-test-lint.yml +++ b/.github/workflows/build-test-lint.yml @@ -54,7 +54,7 @@ jobs: - name: Start PRISM Server run: | ./start-prism.sh & echo $! > prism_pid.txt - sleep 10 + sleep 15 working-directory: xero-python/tests/utils - name: Run Test @@ -63,7 +63,6 @@ jobs: source venv/bin/activate pytest -v working-directory: xero-python - continue-on-error: true - name: Stop PRISM if: success() || failure() From 94a8f5fb9eaee82076fffe4b35392e2a280ffe7a Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Wed, 23 Oct 2024 10:10:27 +0530 Subject: [PATCH 22/27] commented echo statemenet --- .github/workflows/build-test-lint.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test-lint.yml b/.github/workflows/build-test-lint.yml index 94d50534..faf86837 100644 --- a/.github/workflows/build-test-lint.yml +++ b/.github/workflows/build-test-lint.yml @@ -53,13 +53,14 @@ jobs: - name: Start PRISM Server run: | - ./start-prism.sh & echo $! > prism_pid.txt + ./start-prism.sh + # & echo $! > prism_pid.txt sleep 15 working-directory: xero-python/tests/utils - name: Run Test run: | - python -m venv venv + # python -m venv venv source venv/bin/activate pytest -v working-directory: xero-python From 3797926d4eeab16a52c6786ac5c1c6cd26466503 Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Wed, 23 Oct 2024 10:13:40 +0530 Subject: [PATCH 23/27] try adding sleep while starting prism --- .github/workflows/build-test-lint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test-lint.yml b/.github/workflows/build-test-lint.yml index faf86837..08546cb2 100644 --- a/.github/workflows/build-test-lint.yml +++ b/.github/workflows/build-test-lint.yml @@ -53,9 +53,9 @@ jobs: - name: Start PRISM Server run: | - ./start-prism.sh + ./start-prism.sh & sleep 10 # & echo $! > prism_pid.txt - sleep 15 + # sleep 15 working-directory: xero-python/tests/utils - name: Run Test From c0b657b75c3cbc19f1ffa3f0b7f7d9fd419610d7 Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Wed, 23 Oct 2024 10:15:22 +0530 Subject: [PATCH 24/27] increase sleep timer --- .github/workflows/build-test-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test-lint.yml b/.github/workflows/build-test-lint.yml index 08546cb2..8a3f365c 100644 --- a/.github/workflows/build-test-lint.yml +++ b/.github/workflows/build-test-lint.yml @@ -53,7 +53,7 @@ jobs: - name: Start PRISM Server run: | - ./start-prism.sh & sleep 10 + ./start-prism.sh & sleep 15 # & echo $! > prism_pid.txt # sleep 15 working-directory: xero-python/tests/utils From d6b63e21d02cf63c192a7781943f5ae0bbc2d452 Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Wed, 23 Oct 2024 10:19:18 +0530 Subject: [PATCH 25/27] try removing disown --- .github/workflows/build-test-lint.yml | 2 -- tests/utils/start-prism.sh | 2 -- 2 files changed, 4 deletions(-) diff --git a/.github/workflows/build-test-lint.yml b/.github/workflows/build-test-lint.yml index 8a3f365c..219b4853 100644 --- a/.github/workflows/build-test-lint.yml +++ b/.github/workflows/build-test-lint.yml @@ -54,8 +54,6 @@ jobs: - name: Start PRISM Server run: | ./start-prism.sh & sleep 15 - # & echo $! > prism_pid.txt - # sleep 15 working-directory: xero-python/tests/utils - name: Run Test diff --git a/tests/utils/start-prism.sh b/tests/utils/start-prism.sh index 454594a4..7a29b941 100755 --- a/tests/utils/start-prism.sh +++ b/tests/utils/start-prism.sh @@ -9,5 +9,3 @@ prism mock https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/refs/heads/mas prism mock https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/refs/heads/master/xero-payroll-nz.yaml --host 127.0.0.1 --port 4016 & prism mock https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/refs/heads/master/xero-payroll-au.yaml --host 127.0.0.1 --port 4017 & prism mock https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/refs/heads/master/xero-projects.yaml --host 127.0.0.1 --port 4018 - -disown From 217a7efde14dbf2b67e9f7665f2ffbe909e32be9 Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Wed, 23 Oct 2024 10:27:35 +0530 Subject: [PATCH 26/27] clanup commit --- .github/workflows/build-test-lint.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-test-lint.yml b/.github/workflows/build-test-lint.yml index 219b4853..e3fbf26e 100644 --- a/.github/workflows/build-test-lint.yml +++ b/.github/workflows/build-test-lint.yml @@ -43,7 +43,7 @@ jobs: run: python setup.py sdist working-directory: xero-python - - name: Install Node.js + - name: Set up Node environment uses: actions/setup-node@v2 with: node-version: 20 @@ -58,7 +58,6 @@ jobs: - name: Run Test run: | - # python -m venv venv source venv/bin/activate pytest -v working-directory: xero-python From b8eb6d87e8ad1c3760a40d878420516bf7bfa797 Mon Sep 17 00:00:00 2001 From: vigneshk-tw Date: Wed, 23 Oct 2024 10:48:39 +0530 Subject: [PATCH 27/27] final cleanup --- .github/workflows/build-test-lint.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-test-lint.yml b/.github/workflows/build-test-lint.yml index e3fbf26e..6b403c9d 100644 --- a/.github/workflows/build-test-lint.yml +++ b/.github/workflows/build-test-lint.yml @@ -52,8 +52,7 @@ jobs: run: npm install -g @stoplight/prism-cli - name: Start PRISM Server - run: | - ./start-prism.sh & sleep 15 + run: ./start-prism.sh & sleep 15 working-directory: xero-python/tests/utils - name: Run Test