diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 58f6635..93bfbbd 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -1,4 +1,4 @@ -name: Pylint and Pytest +name: Pylint, Pytest and Build on: [push] @@ -29,3 +29,5 @@ jobs: with: name: junit-test-results-python-${{ matrix.python-version }} path: junit + - name: Build package + run: python -m build diff --git a/.gitignore b/.gitignore index 10c6039..b49271b 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ myenv/ junit/ .DS_Store *.egg-info/ -build/ \ No newline at end of file +build/ +dist/ \ No newline at end of file diff --git a/README.md b/README.md index 2a6646a..166585d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Python Scripts [![Pylint and Pytest](https://github.com/hofiorg/python_scripts/actions/workflows/pylint.yml/badge.svg)](https://github.com/hofiorg/python_scripts/actions/workflows/pylint.yml) +# Python Scripts [![Pylint, Pytest and Build](https://github.com/hofiorg/python_scripts/actions/workflows/pylint.yml/badge.svg)](https://github.com/hofiorg/python_scripts/actions/workflows/pylint.yml) check_urls, hello_world and other stuff. @@ -29,6 +29,12 @@ pylint $(git ls-files '*.py') pytest tests --junitxml=junit/test-results.xml --html=junit/test-results.html ``` +## Build + +```sh +python -m build +``` + ## [check_urls.py](./scripts/check_urls.py) This script checks URLs defined in a JSON file. For each URL, it verifies if the response diff --git a/requirements.txt b/requirements.txt index c7f95ee..a91e3a7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ astroid==3.1.0 +build==1.1.1 certifi==2024.2.2 charset-normalizer==3.3.2 coverage==7.4.4 @@ -13,6 +14,7 @@ packaging==24.0 platformdirs==4.2.0 pluggy==1.4.0 pylint==3.1.0 +pyproject_hooks==1.0.0 pytest==8.1.1 pytest-cov==4.1.0 pytest-html==4.1.1 diff --git a/setup.py b/setup.py index d643ab0..f9612de 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,8 @@ 'pytest', 'pytest-cov', 'pytest-html', - 'setuptools' + 'setuptools', + 'build' ], scripts=[ 'scripts/check_urls.py',