This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
chore(deps-dev): bump distlib from 0.3.7 to 0.3.8 #1149
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: main | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- "*" | |
tags: | |
- "[0-9]+.[0-9]+.[0-9]+" | |
- "[0-9]+.[0-9]+.[0-9]+-rc[0-9]+" | |
jobs: | |
publish: | |
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && github.repository == 'duffelhq/duffel-api-python' | |
runs-on: ubuntu-latest | |
needs: [integration-test, test, types] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: pip install build tox tox-gh-actions | |
- name: Build package | |
run: python -m build | |
- name: Test publishing package to PyPI | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
user: __token__ | |
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
repository_url: https://test.pypi.org/legacy/ | |
- name: Publish package to PyPI | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
integration-test: | |
runs-on: ubuntu-latest | |
env: | |
DUFFEL_ACCESS_TOKEN: ${{ secrets.DUFFEL_ACCESS_TOKEN }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install local version of package | |
run: pip install --editable . | |
- name: Run search and book example | |
run: python examples/search-and-book.py | |
- name: Run hold and pay later example | |
run: python examples/hold-and-pay-later.py | |
- name: Run book with seat example | |
run: python examples/book-with-seat.py | |
- name: Run book and change example | |
run: python examples/book-and-change.py | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.8', '3.9', '3.10', '3.11'] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dev dependencies | |
run: pip install -r requirements-dev.txt | |
- name: Install tox | |
run: pip install tox-gh-actions | |
- name: Test using tox | |
run: tox | |
- name: Linting | |
run: tox -e linting | |
- name: Check code documentation | |
run: tox -e doc | |
- name: Check formatting | |
run: tox -e format -- --check | |
types: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: pip install tox tox-gh-actions | |
- name: Check with pyright | |
run: tox -e pyright | |
- name: Check with mypy | |
run: tox -e mypy |