Skip to content

Commit

Permalink
Merge branch 'master' into PETOSS-576-slack-alert-python
Browse files Browse the repository at this point in the history
  • Loading branch information
sangeet-joy-tw authored Oct 23, 2024
2 parents d5ef7bd + 7a8f410 commit 33dd69d
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 13 deletions.
28 changes: 22 additions & 6 deletions .github/workflows/build-test-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,25 @@ 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: Set up Node environment
uses: actions/setup-node@v2
with:
node-version: 20

- name: Install Prism
run: npm install -g @stoplight/prism-cli

- name: Start PRISM Server
run: ./start-prism.sh & sleep 15
working-directory: xero-python/tests/utils

- name: Run Test
run: |
source venv/bin/activate
pytest -v
working-directory: xero-python

- name: Stop PRISM
if: success() || failure()
run: pkill -f prism
working-directory: xero-python
12 changes: 6 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ jobs:
run: python setup.py sdist
working-directory: xero-python

# - name: Publish to PyPi
# env:
# TWINE_USERNAME: __token__
# # TWINE_PASSWORD: ${{ secrets.PYPI_APIKEY }}
# run: twine upload --repository-url https://test.pypi.org/legacy/ dist/*
# working-directory: xero-python
- name: Publish to PyPi
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_APIKEY }}
run: twine upload dist/*
working-directory: xero-python

notify-slack-on-success:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions tests/utils/start-prism.sh
Original file line number Diff line number Diff line change
@@ -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 &
Expand Down

0 comments on commit 33dd69d

Please sign in to comment.