try adding sleep while starting prism #75
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python Build, Lint | |
on: | |
push: | |
jobs: | |
build-test-lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout xero-python repo | |
uses: actions/checkout@v4 | |
with: | |
repository: XeroAPI/xero-python | |
path: xero-python | |
- name: Set up Python environment | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.8' | |
cache: 'pip' | |
- name: Install dependencies | |
run: | | |
python -m venv venv | |
source venv/bin/activate | |
pip install --upgrade pip | |
pip install black | |
sudo pip install flake8 | |
sudo pip install pip-audit | |
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: Run Flake8 | |
run: flake8 xero_python | |
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 | |
with: | |
node-version: 20 | |
- name: Install Prism | |
run: npm install -g @stoplight/prism-cli | |
- name: Start PRISM Server | |
run: | | |
./start-prism.sh & sleep 10 | |
# & echo $! > prism_pid.txt | |
# sleep 15 | |
working-directory: xero-python/tests/utils | |
- name: Run Test | |
run: | | |
# python -m venv venv | |
source venv/bin/activate | |
pytest -v | |
working-directory: xero-python | |
- name: Stop PRISM | |
if: success() || failure() | |
run: pkill -f prism | |
working-directory: xero-python |