v2.0.1 #191
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: Latest Release | |
on: | |
release: | |
types: [published] | |
jobs: | |
test_minimal_app: | |
name: Test Minimal Application with Base Dependencies | |
runs-on: ubuntu-latest | |
env: | |
python_version: "3.11" | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Install App Dependencies | |
run: poetry install --no-interaction --only main | |
- name: Install Test Dependencies | |
run: poetry run python -m pip install pytest pytest-asyncio httpx trio time-machine | |
- name: Set pythonpath | |
run: echo "PYTHONPATH=$PWD" >> $GITHUB_ENV | |
- name: Test | |
run: mv tests/examples/test_hello_world.py test_hello_world.py && poetry run pytest test_hello_world.py | |
publish-release: | |
# needs: | |
# - test_minimal_app | |
if: always() | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set up python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Install dependencies | |
run: poetry install --no-interaction --no-root --no-dev | |
- name: publish | |
shell: bash | |
run: | | |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }} | |
poetry publish --build --no-interaction |