Skip to content

gcp: remove tpu- prefix, set vendor (#88) #33

gcp: remove tpu- prefix, set vendor (#88)

gcp: remove tpu- prefix, set vendor (#88) #33

Workflow file for this run

name: Release
on:
push:
tags:
- '*'
env:
PIP_DISABLE_PIP_VERSION_CHECK: on
PIP_DEFAULT_TIMEOUT: 10
PIP_PROGRESS_BAR: off
jobs:
python-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12
- run: python -m pip install pre-commit
- run: pre-commit run -a --show-diff-on-failure
python-test:
needs: [python-lint]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install '.[all,dev]'
- name: Run doctest
run: |
pytest --doctest-modules src/gpuhunt
- name: Run pytest
run: |
pytest src/tests
pypi-upload:
needs: [ python-test ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
run: |
pip install pip -U
pip install build wheel twine
- name: Upload pypi package
run: |
VERSION=${GITHUB_REF#refs/tags/}
echo "__version__ = \"$VERSION\"" > src/gpuhunt/version.py
python -m build
python -m twine upload --repository pypi --username ${{ secrets.PYPI_USERNAME }} --password ${{ secrets.PYPI_PASSWORD }} dist/*