Skip to content

Commit

Permalink
Testing pytest action
Browse files Browse the repository at this point in the history
  • Loading branch information
ralequi committed Nov 13, 2024
1 parent bdc6611 commit ec699f0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 21 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,27 @@ on: push
jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
with:
fetch-depth: 0

- name: Set up Python 3.8
uses: actions/setup-python@v1
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.8

- name: Upgrade pip
run: python -m pip install --upgrade pip
python-version: "3.10"

- name: Install pypa/build
run: |
pip install build --user
pip install .
pip install .
- name: Install pypa/pdoc
run: >-
python -m
pip install
pdoc
.[dev]
--user
- name: Generate documentation with pdoc
run: python -m pdoc -o docs -n pysmart_exporter
Expand All @@ -39,10 +36,11 @@ jobs:
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
extra-args: --verbose
verbose: true
skip-existing: true

- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
if: startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/master'
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
18 changes: 8 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,10 @@ name = "pySMART-exporter"
description = "A Prometheus PySMART exporter"
readme = "README.md"
keywords = ["prometheus", "SMART", "exporter", "monitoring"]
license = {text = "BSD-3-Clause"}
dependencies = [
"prometheus-client",
"pySMART >=1.1.0"
]
license = { text = "BSD-3-Clause" }
dependencies = ["prometheus-client", "pySMART >=1.1.0"]
dynamic = ["version"]
authors = [
{ name = "Rafael Leira", email = "rafael.leira@naudit.es" }
]
authors = [{ name = "Rafael Leira", email = "rafael.leira@naudit.es" }]

classifiers = [
"Development Status :: 4 - Beta",
Expand All @@ -37,14 +32,17 @@ classifiers = [
"Programming Language :: Python :: 3",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules"
"Topic :: Software Development :: Libraries :: Python Modules",
]

[project.optional-dependencies]
dev = ['pytest', 'pytest-cov', 'mypy', 'types-tabulate', 'types-six', 'pdoc']

[project.urls]
homepage = "https://repo1.naudit.es/theseus/pysmart-exporter"

[project.entry-points."console_scripts"]
pysmart_exporter = "pysmart_exporter.__main__:main"

[tool.setuptools.dynamic]
version = {attr = "pysmart_exporter.__version__"}
version = { attr = "pysmart_exporter.__version__" }

0 comments on commit ec699f0

Please sign in to comment.