diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cf750c5..2a04bdc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,6 +7,10 @@ on: - main pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: FORCE_COLOR: "1" @@ -34,9 +38,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install test dependencies - run: | - python -m pip install --upgrade pip - pip install tox tox-gh-actions + run: pip install tox tox-gh-actions - name: Test packaging run: tox -e pkg @@ -44,14 +46,12 @@ jobs: - name: Run tests with PyTest 6 run: tox env: - PLATFORM: ${{ matrix.os }} PYTEST_MAJOR_VERSION: 6 PYTEST_PLUGINS: pytest_github_actions_annotate_failures - name: Run tests with PyTest 7 run: tox env: - PLATFORM: ${{ matrix.os }} PYTEST_MAJOR_VERSION: 7 PYTEST_PLUGINS: pytest_github_actions_annotate_failures diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 159aa53..091ecc2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: "v4.4.0" + rev: "v5.0.0" hooks: - id: check-added-large-files - id: check-case-conflict @@ -13,13 +13,8 @@ repos: - id: requirements-txt-fixer - id: trailing-whitespace -- repo: https://github.com/mgedmin/check-manifest - rev: "0.49" - hooks: - - id: check-manifest - - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.0.262" + rev: "v0.7.0" hooks: - id: ruff args: ["--fix", "--show-fixes"] diff --git a/pyproject.toml b/pyproject.toml index 8361efe..2acae3e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,9 +52,8 @@ changelog = "https://github.com/pytest-dev/pytest-github-actions-annotate-failur pytest_github_actions_annotate_failures = "pytest_github_actions_annotate_failures.plugin" -[tool.ruff] -select = [ - "E", "F", "W", # flake8 +[tool.ruff.lint] +extend-select = [ "B", # flake8-bugbear "I", # isort "ARG", # flake8-unused-arguments @@ -74,17 +73,11 @@ select = [ "YTT", # flake8-2020 "EXE", # flake8-executable ] -extend-ignore = [ +ignore = [ "PLR", # Design related pylint codes - "E501", # Line too long "PT004", # Use underscore for non-returning fixture (use usefixture instead) ] -target-version = "py37" -unfixable = [ - "T20", # Removes print statements - "F841", # Removes unused variables -] isort.required-imports = ["from __future__ import annotations"] -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] "tests/**" = ["T20"] diff --git a/tox.ini b/tox.ini index 0536448..9fa1583 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - py{37,38,39,310,311,312}-pytest{6,7}-{linux,windows} + py{37,38,39,310,311,312}-pytest{6,7,8} pkg [gh-actions] @@ -13,21 +13,19 @@ python = 3.12: py312 [gh-actions:env] -PLATFORM = - ubuntu-latest: linux - windows-latest: windows - PYTEST_MAJOR_VERSION = 6: pytest6 7: pytest7 + 8: pytest8 [testenv] deps = -rrequirements.txt pytest6: pytest>=6.0.0,<7.0.0 pytest7: pytest>=7.0.0,<7.4.0 + pytest8: pytest>=8.0.0,<9.0.0 -commands = {envpython} -m pytest +commands = {envpython} -m pytest {posargs} [testenv:pkg] skip_install = true