diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 46df914a..b65f9c35 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -6,7 +6,6 @@ name: CI_TEST on: push: paths: - - 'requirements.txt' - '**.py' - '**.yml' pull_request: @@ -51,11 +50,14 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 + - name: Install uv + uses: astral-sh/setup-uv@v5 with: python-version: ${{ matrix.python-version }} - cache: 'pip' # caching pip dependencies + enable-cache: true + + - name: Install python + run: uv python install - name: setup java 17 uses: actions/setup-java@v3 @@ -66,16 +68,14 @@ jobs: - name: Install dependencies run: | sudo apt-get install libkrb5-dev - python -m pip install -r test-requirements.txt - python -m pip install -r requirements.txt - name: Lint with flake8 run: | - flake8 jenkinsapi/ --count --select=E9,F63,F7,F82 --ignore F821,W503,W504 --show-source --statistics - flake8 jenkinsapi/ --count --exit-zero --max-complexity=10 --max-line-length=79 --statistics + uv run flake8 jenkinsapi/ --count --select=E9,F63,F7,F82 --ignore F821,W503,W504 --show-source --statistics + uv run flake8 jenkinsapi/ --count --exit-zero --max-complexity=10 --max-line-length=79 --statistics - name: Test with pytest env: JENKINS_VERSION: ${{ matrix.token }} run: | - pytest -sv --cov=jenkinsapi --cov-report=term-missing --cov-report=xml jenkinsapi_tests + uv run pytest -sv --cov=jenkinsapi --cov-report=term-missing --cov-report=xml jenkinsapi_tests diff --git a/pyproject.toml b/pyproject.toml index 513a55f4..b3418a82 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,19 +34,17 @@ classifiers = [ "Topic :: Software Development :: Testing", "Topic :: Utilities", ] -requires_python = ">=3.8" +requires-python = ">=3.8" dynamic = ["version"] dependencies = [ "pytz>=2014.4", "requests>=2.3.0", - "six>=1.10.0" + "six>=1.10.0", ] -[tool.files] -packages = """ -jenkinsapi -jenkinsapi_utils -jenkinsapi_tests""" +[tool.setuptools] +packages = ["jenkinsapi", "jenkinsapi_utils", "jenkinsapi_tests"] +include-package-data = false [tool.pbr] warnerrors = "True" @@ -70,5 +68,18 @@ universal = 1 exclude = ".tox,doc/source/conf.py,build,.venv,.eggs" max-line-length = "99" -[tool.setuptools] -include-package-data = false +[dependency-groups] +dev = [ + "pytest-mock>=3.14.0", + "pytest>=8.3.4", + "pytest-cov>=4.0.0", + "pycodestyle>=2.3.1", + "astroid>=1.4.8", + "pylint>=1.7.1", + "tox>=2.3.1", + "mock>=5.1.0", + "myst-parser>=3.0.0", + "codecov>=2.1.13", + "requests-kerberos>=0.15.0", + "flake8>=5.0.0", +] diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index da330e69..00000000 --- a/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pytz>=2014.4 -requests>=2.3.0