diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cf94f7d..5ace4c5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,8 +4,11 @@ on: merge_group: push: branches-ignore: - # disabled for jaraco/skeleton#103 - # - gh-readonly-queue/** # Temporary merge queue-related GH-made branches + # temporary GH branches relating to merge queues (jaraco/skeleton#93) + - gh-readonly-queue/** + tags: + # required if branches-ignore is supplied (jaraco/skeleton#103) + - '**' pull_request: permissions: @@ -28,10 +31,10 @@ env: jobs: test: strategy: + # https://blog.jaraco.com/efficient-use-of-ci-resources/ matrix: python: - "3.8" - - "3.11" - "3.12" platform: - ubuntu-latest @@ -42,10 +45,12 @@ jobs: platform: ubuntu-latest - python: "3.10" platform: ubuntu-latest + - python: "3.11" + platform: ubuntu-latest - python: pypy3.10 platform: ubuntu-latest runs-on: ${{ matrix.platform }} - continue-on-error: ${{ matrix.python == '3.13' }} + continue-on-error: ${{ matrix.python == '3.13' || (matrix.python == '3.8' || matrix.python == '3.9') && matrix.platform == 'macos-latest' }} steps: - uses: actions/checkout@v4 - name: Setup Python diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 6848906..85dfea9 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -10,3 +10,7 @@ build: os: ubuntu-lts-latest tools: python: latest + # post-checkout job to ensure the clone isn't shallow jaraco/skeleton#114 + jobs: + post_checkout: + - git fetch --unshallow || true diff --git a/pyproject.toml b/pyproject.toml index 2e01adf..435db9b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,9 @@ classifiers = [ "Programming Language :: Python :: 3 :: Only", ] requires-python = ">=3.8" -dependencies = ["yg.lockfile"] +dependencies = [ + "yg.lockfile", +] dynamic = ["version"] [project.urls] @@ -26,10 +28,10 @@ Homepage = "https://github.com/jaraco/jaraco.apt" [project.optional-dependencies] testing = [ # upstream - "pytest >= 6", + "pytest >= 6, != 8.1.*", "pytest-checkdocs >= 2.4", "pytest-cov", - 'pytest-mypy; python_implementation != "PyPy"', # workaround for jaraco/skeleton#22 + "pytest-mypy", "pytest-enabler >= 2.2", "pytest-ruff >= 0.2.1", @@ -38,8 +40,6 @@ testing = [ docs = [ # upstream "sphinx >= 3.5", - # workaround for sphinx/sphinx-doc#11662 - "sphinx < 7.2.5", "jaraco.packaging >= 9.3", "rst.linker >= 1.9", "furo", diff --git a/pytest.ini b/pytest.ini index 022a723..9a0f3bc 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,6 +1,9 @@ [pytest] norecursedirs=dist build .tox .eggs -addopts=--doctest-modules +addopts= + --doctest-modules + --import-mode importlib +consider_namespace_packages=true filterwarnings= ## upstream diff --git a/ruff.toml b/ruff.toml index e61ca8b..7061298 100644 --- a/ruff.toml +++ b/ruff.toml @@ -1,4 +1,8 @@ [lint] +extend-select = [ + "C901", + "W", +] ignore = [ # https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules "W191", diff --git a/tox.ini b/tox.ini index 331eeed..4c39a5b 100644 --- a/tox.ini +++ b/tox.ini @@ -12,6 +12,7 @@ extras = [testenv:diffcov] description = run tests and check that diff from main is covered deps = + {[testenv]deps} diff-cover commands = pytest {posargs} --cov-report xml