Skip to content

Merge pull request #58 from routeviews/dependabot/pip/python-client/g… #43

Merge pull request #58 from routeviews/dependabot/pip/python-client/g…

Merge pull request #58 from routeviews/dependabot/pip/python-client/g… #43

Workflow file for this run

name: python-client
on:
push:
paths:
- 'python-client/**'
- '.github/workflows/python-client.yml'
branches:
- main
pull_request:
paths:
- 'python-client/**'
- '.github/workflows/python-client.yml'
jobs:
test-and-deploy:
runs-on: ubuntu-latest
timeout-minutes: 10
defaults:
run:
shell: bash
working-directory: python-client
steps:
- name: Checkout source code
uses: actions/checkout@v4
# Setup Python (faster than using Python container)
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install pinned dependencies
run: |
pip install -r requirements.txt
- name: Install
run: |
pip install -e .
- name: Install plugin that annotates test results
run: pip install pytest-github-actions-annotate-failures
- name: Test
run: |
pytest
- name: Package 📦
if: github.ref == 'refs/heads/main'
run: |
python setup.py sdist
# This job requires access to the UO NTS Jenkins server.
# If we want to publish to pypi, we'll need to find an
# alternate build server.
#
# - name: Publish 📦 to PyPI
# if: github.ref == 'refs/heads/main'
# uses: pypa/gh-action-pypi-publish@release/v1.5
# with:
# user: __token__
# password: ${{ secrets.NTSJENKINS_PYPI }}
# packages_dir: python-client/dist