Add method for fetching info of API and demo it (#10) #26
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 package | |
on: [push, pull_request] | |
jobs: | |
test-job: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install .[dev] | |
- name: Test with pytest | |
run: | | |
pytest | |
build-and-publish-job: | |
needs: test-job | |
runs-on: ubuntu-22.04 | |
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
- name: Build distribution | |
run: | | |
python -m pip install wheel | |
python setup.py sdist bdist_wheel | |
- name: Publish distribution | |
uses: pypa/gh-action-pypi-publish@release/v1.8 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |