Add PYTHONBUFFERED=1
to Dockerfile.{cpu,gpu}
#42
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
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
paths: | |
- .github/workflows/workflow.yml | |
- src/** | |
- tests/** | |
release: | |
types: | |
- published | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
check-quality: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: setup-python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: install-dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install ".[quality]" | |
- name: check-quality | |
run: | | |
ruff check src tests | |
ruff format --check src tests | |
mypy src | |
run-tests: | |
needs: check-quality | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: setup-python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: install-dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install ".[tests]" | |
- name: run-tests | |
run: pytest --cov=vertex_ai_huggingface_inference_toolkit --cov-report=term-missing tests/ -s --durations 0 | |
deploy-docs: | |
needs: run-tests | |
if: github.event_name == 'release' | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: setup-python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: install-dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e ".[docs]" | |
- name: deploy-to-gh-pages | |
run: mkdocs gh-deploy --force | |
pypi-publish: | |
needs: deploy-docs | |
if: github.event_name == 'release' | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
packages: write | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: setup-python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: install-dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install hatch | |
- name: build-package | |
run: hatch build | |
- name: publish-package | |
uses: pypa/gh-action-pypi-publish@release/v1 |