Fix filter with uppercase GPU or provider name (#80) #31
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: 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 | |
- name: Run isort | |
uses: isort/isort-action@master | |
with: | |
isort-version: 5.13 | |
configuration: "--settings-file pyconfig.toml --check-only --diff" | |
sort-paths: "src" | |
- name: Run black | |
uses: psf/black@stable | |
with: | |
options: "--config pyconfig.toml --check --verbose" | |
src: "./src" | |
version: "~= 24.4" | |
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/* |