diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5720254..0212a69 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,6 +6,10 @@ on: - release/** pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: dist: name: Create Distribution diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ce59e5e..ed8bdba 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.11.14", "3.12.13"] + python-version: ["3.13.1"] steps: - name: Configure git run: | @@ -29,7 +29,7 @@ jobs: - name: Install dependencies run: uv sync --python ${{ matrix.python-version }} - name: Run tests - run: uv run pytest --cov --junitxml=junit.xml -o junit_family=legacy + run: uv run pytest -n4 --cov --junitxml=junit.xml -o junit_family=legacy - name: Upload results to Codecov uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0 with: diff --git a/.python-version b/.python-version index 28d9a01..c10780c 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -3.12.13 +3.13.1 diff --git a/README.md b/README.md index 91fdfda..4ef98c5 100644 --- a/README.md +++ b/README.md @@ -173,5 +173,5 @@ networks: ```sh uv sync direnv allow -pytest +pytest -n4 ``` diff --git a/pyproject.toml b/pyproject.toml index 77026d7..058eb07 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,6 +6,7 @@ build-backend = "setuptools.build_meta" name = "devservices" version = "1.2.4" # 3.11 is just for internal pypi compat +# but we test/support on 3.13 requires-python = ">=3.11" dependencies = [ "pyyaml", @@ -21,13 +22,14 @@ dev = [ "freezegun", "mypy", "pre-commit", - "pytest", + "pytest>9", "pytest-cov", "ruff", "setuptools>=70", "shellcheck-py", "wheel", "types-PyYAML", + "pytest-xdist>=3.5.0", ] [project.scripts] @@ -40,7 +42,7 @@ find = {} url = "https://pypi.devinfra.sentry.io/simple" [tool.mypy] -python_version = "3.12" +python_version = "3.13" strict = true ignore_missing_imports = true diff --git a/uv.lock b/uv.lock index 704e70c..a08c52e 100644 --- a/uv.lock +++ b/uv.lock @@ -86,6 +86,7 @@ dev = [ { name = "pre-commit" }, { name = "pytest" }, { name = "pytest-cov" }, + { name = "pytest-xdist" }, { name = "ruff" }, { name = "setuptools" }, { name = "shellcheck-py" }, @@ -108,8 +109,9 @@ dev = [ { name = "freezegun" }, { name = "mypy" }, { name = "pre-commit" }, - { name = "pytest" }, + { name = "pytest", specifier = ">9" }, { name = "pytest-cov" }, + { name = "pytest-xdist", specifier = ">=3.5.0" }, { name = "ruff" }, { name = "setuptools", specifier = ">=70" }, { name = "shellcheck-py" }, @@ -125,6 +127,14 @@ wheels = [ { url = "https://pypi.devinfra.sentry.io/wheels/distlib-0.4.0-py2.py3-none-any.whl", hash = "sha256:9659f7d87e46584a30b5780e43ac7a2143098441670ff0a49d5f9034c54a6c16" }, ] +[[package]] +name = "execnet" +version = "2.0.2" +source = { registry = "https://pypi.devinfra.sentry.io/simple" } +wheels = [ + { url = "https://pypi.devinfra.sentry.io/wheels/execnet-2.0.2-py3-none-any.whl", hash = "sha256:88256416ae766bc9e8895c76a87928c0012183da3cc4fc18016e6f050e025f41" }, +] + [[package]] name = "filelock" version = "3.20.3" @@ -267,6 +277,14 @@ wheels = [ { url = "https://pypi.devinfra.sentry.io/wheels/pre_commit-4.2.0-py2.py3-none-any.whl", hash = "sha256:a009ca7205f1eb497d10b845e52c838a98b6cdd2102a6c8e4540e94ee75c58bd" }, ] +[[package]] +name = "pygments" +version = "2.19.2" +source = { registry = "https://pypi.devinfra.sentry.io/simple" } +wheels = [ + { url = "https://pypi.devinfra.sentry.io/wheels/pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b" }, +] + [[package]] name = "pyproject-hooks" version = "1.2.0" @@ -277,16 +295,17 @@ wheels = [ [[package]] name = "pytest" -version = "8.3.3" +version = "9.0.2" source = { registry = "https://pypi.devinfra.sentry.io/simple" } dependencies = [ { name = "colorama", marker = "sys_platform == 'win32'" }, { name = "iniconfig" }, { name = "packaging" }, { name = "pluggy" }, + { name = "pygments" }, ] wheels = [ - { url = "https://pypi.devinfra.sentry.io/wheels/pytest-8.3.3-py3-none-any.whl", hash = "sha256:a6853c7375b2663155079443d2e45de913a911a11d669df02a50814944db57b2" }, + { url = "https://pypi.devinfra.sentry.io/wheels/pytest-9.0.2-py3-none-any.whl", hash = "sha256:711ffd45bf766d5264d487b917733b453d917afd2b0ad65223959f59089f875b" }, ] [[package]] @@ -301,6 +320,18 @@ wheels = [ { url = "https://pypi.devinfra.sentry.io/wheels/pytest_cov-4.1.0-py3-none-any.whl", hash = "sha256:6ba70b9e97e69fcc3fb45bfeab2d0a138fb65c4d0d6a41ef33983ad114be8c3a" }, ] +[[package]] +name = "pytest-xdist" +version = "3.5.0" +source = { registry = "https://pypi.devinfra.sentry.io/simple" } +dependencies = [ + { name = "execnet" }, + { name = "pytest" }, +] +wheels = [ + { url = "https://pypi.devinfra.sentry.io/wheels/pytest_xdist-3.5.0-py3-none-any.whl", hash = "sha256:d075629c7e00b611df89f490a5063944bee7a4362a5ff11c7cc7824a03dfce24" }, +] + [[package]] name = "python-dateutil" version = "2.9.0.post0"