Update Hatch matrix specification, properly add Python 3.11

This commit is contained in:
Oleh Prypin
2023-07-07 15:15:09 +02:00
parent 65c0590e22
commit fad2926760
2 changed files with 7 additions and 17 deletions

View File

@@ -10,16 +10,6 @@ jobs:
python-version: [3.7, 3.8, 3.9, '3.10', '3.11', pypy-3.9-v7.x]
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- python-version: 3.7
py: py37
- python-version: 3.8
py: py38
- python-version: 3.9
py: py39
- python-version: '3.10'
py: py310
- python-version: '3.11'
py: py311
- python-version: pypy-3.9-v7.x
py: pypy3
# Just to slim down the test matrix:
@@ -46,10 +36,10 @@ jobs:
python -m pip install --upgrade hatch
- name: Run tests
run: |
hatch run +py=${{ matrix.py }} +type= test:with-coverage
hatch run +py=${{ matrix.py || matrix.python-version }} test:with-coverage
- name: Run integration tests
run: |
hatch run +py=${{ matrix.py }} +type= integration:test
hatch run +py=${{ matrix.py || matrix.python-version }} integration:test
shell: bash
- name: Upload Codecov Results
if: success()
@@ -57,7 +47,7 @@ jobs:
with:
file: ./coverage.xml
flags: unittests
name: ${{ matrix.os }}/${{ matrix.py }}
name: ${{ matrix.os }}/${{ matrix.python-version }}
fail_ci_if_error: false
lint:

View File

@@ -108,7 +108,7 @@ all = [
"hatch run test:test",
"hatch run style:check",
"hatch run lint:check",
"hatch run +type=default +py= integration:test",
"hatch run +type=default integration:test",
]
[tool.hatch.envs.test]
@@ -121,7 +121,7 @@ test = "coverage run --source=mkdocs --omit 'mkdocs/tests/*' -m unittest discove
_coverage = ["test", "coverage xml", "coverage report --show-missing"]
with-coverage = "test"
[[tool.hatch.envs.test.matrix]]
python = ["py37", "py38", "py39", "py310", "pypy3"]
python = ["3.7", "3.8", "3.9", "3.10", "3.11", "pypy3"]
type = ["default", "min-req"]
[tool.hatch.envs.test.overrides]
matrix.type.features = [
@@ -136,7 +136,7 @@ template = "docs"
[tool.hatch.envs.integration.scripts]
test = "python -m mkdocs.tests.integration"
[[tool.hatch.envs.integration.matrix]]
python = ["py37", "py38", "py39", "py310", "pypy3"]
python = ["3.7", "3.8", "3.9", "3.10", "3.11", "pypy3"]
type = ["default", "no-babel"]
[tool.hatch.envs.integration.overrides]
matrix.type.features = [
@@ -204,7 +204,7 @@ dependencies = [
[tool.black]
line-length = 100
target-version = ["py37"]
target-version = ["py37"] # 3.7
skip-string-normalization = true
[tool.isort]