Skip to content

Add PYTHONBUFFERED=1 to Dockerfile.{cpu,gpu} #42

Add PYTHONBUFFERED=1 to Dockerfile.{cpu,gpu}

Add PYTHONBUFFERED=1 to Dockerfile.{cpu,gpu} #42

Workflow file for this run

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