diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 9d3b859..5419f33 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -8,18 +8,20 @@ on: - "releases" jobs: - tox: - name: "Tox (${{ matrix.os.name }})" + code: + name: + "Code (${{ + (startswith(matrix.runner, 'ubuntu') && 'Linux') + || (startswith(matrix.runner, 'macos') && 'macOS') + || (startswith(matrix.runner, 'windows') && 'Windows') + }})" strategy: matrix: - os: - - name: "Linux" - runner: "ubuntu-latest" - - name: "macOS" - runner: "macos-latest" - - name: "Windows" - runner: "windows-latest" + runner: + - "ubuntu-latest" + - "macos-latest" + - "windows-latest" # Each operating system should test all Python interpreters simultaneously. # This nested-list syntax accomplishes that goal @@ -42,49 +44,10 @@ jobs: - "3.10" fail-fast: false - runs-on: "${{ matrix.os.runner }}" - steps: - - name: "Checkout the repository" - uses: "actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b" # v4.1.4 - - - name: "Setup Pythons" - uses: "actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d" # v5.1.0 - with: - python-version: "${{ - format( - '{0}\n{1}\n{2}', - format('pypy{0}', join(matrix.pypys, '\npypy')), - matrix.cpython-beta, - join(matrix.cpythons, '\n') - ) - }}" - allow-prereleases: true - - - name: "Detect Pythons" - uses: "./" - - - name: "Restore cache" - id: "restore-cache" - uses: "actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319" # v4.0.1 - with: - path: | - .tox/ - .venv - key: "tox-os=${{ matrix.os.runner }}-hash=${{ hashFiles('.python-identifiers', 'tox.ini') }}" - - - name: "Identify .venv path" - shell: "bash" - run: "echo 'venv-path=.venv/${{ runner.os == 'Windows' && 'Scripts' || 'bin' }}' >> $GITHUB_ENV" - - - name: "Create a virtual environment" - if: "steps.restore-cache.outputs.cache-hit == false" - run: | - python -m venv .venv - ${{ env.venv-path }}/python -m pip install --upgrade pip setuptools wheel - ${{ env.venv-path }}/pip install tox + uses: "kurtmckee/github-workflows/.github/workflows/tox.yaml@73024397dba10c866931a1d26cc2a0e7d223472f" # v0.2 + with: + config: "${{ toJSON(matrix) }}" - - name: "Run the test suite" - run: "${{ env.venv-path }}/tox" inputs: name: "Inputs (${{ matrix.os.name }})" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 86d1e32..fc2382c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -38,7 +38,7 @@ repos: hooks: - id: "flake8" additional_dependencies: - - "flake8-bugbear==24.1.17" + - "flake8-bugbear==24.4.26" - repo: "https://github.com/editorconfig-checker/editorconfig-checker.python" rev: "2.7.3" @@ -66,7 +66,7 @@ repos: pass_filenames: false - repo: "https://github.com/python-jsonschema/check-jsonschema" - rev: "0.28.2" + rev: "0.28.3" hooks: - id: "check-github-workflows" - id: "check-dependabot" diff --git a/tox.ini b/tox.ini index 06b842d..6ad9544 100644 --- a/tox.ini +++ b/tox.ini @@ -3,11 +3,13 @@ min_version = 4.3.5 envlist = coverage_erase - py{313, 312, 311, 310, 39, 38, py310, py39, py38} + py{3.13, 3.12, 3.11, 3.10, 3.9, 3.8, py3.10, py3.9, py3.8} coverage_report skip_missing_interpreters = True isolated_build = True +labels = + update=update [testenv] @@ -15,7 +17,7 @@ package = wheel wheel_build_env = build_wheel depends = - py{313, 312, 311, 310, 39, 38, py310, py39, py38}: coverage_erase + py{3.13, 3.12, 3.11, 3.10, 3.9, 3.8, py3.10, py3.9, py3.8}: coverage_erase deps = coverage[toml] pytest @@ -33,7 +35,7 @@ commands = coverage erase [testenv:coverage_report] depends = - py{313, 312, 311, 310, 39, 38, py310, py39, py38} + py{3.13, 3.12, 3.11, 3.10, 3.9, 3.8, py3.10, py3.9, py3.8} skipsdist = true skip_install = true deps = coverage[toml] @@ -44,17 +46,20 @@ commands = coverage report [testenv:update] +description = Update tool versions +base_python = py3.12 +recreate = true +skip_install = true deps = pre-commit upadup -skip_install = true commands = # Update pre-commit hooks and additional dependencies. pre-commit autoupdate upadup - # Run pre-commit. - pre-commit run --all-files + # Run pre-commit immediately, but ignore its exit code. + - pre-commit run -a [flake8]