diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c29a794..9e73731 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,68 +30,43 @@ jobs: strategy: fail-fast: false matrix: - include: - - platform: ubuntu-latest - python-version: 3.8 - py: py38 - - platform: ubuntu-latest - python-version: 3.9 - py: py39 - - platform: ubuntu-latest - python-version: "3.10" - py: py310 - - platform: ubuntu-latest - python-version: "3.11" - py: py311 - - platform: ubuntu-latest - python-version: "3.12" - py: py312 - - platform: macos-latest - python-version: 3.8 - py: py38 - - platform: macos-latest - python-version: 3.9 - py: py39 - - platform: macos-latest - python-version: "3.10" - py: py310 - - platform: macos-latest - python-version: "3.11" - py: py311 - - platform: macos-latest - python-version: "3.12" - py: py312 - - platform: windows-latest - python-version: 3.8 - py: py38 - - platform: windows-latest - python-version: 3.9 - py: py39 - - platform: windows-latest - python-version: "3.10" - py: py310 - - platform: windows-latest - python-version: "3.11" - py: py311 - - platform: windows-latest - python-version: "3.12" - py: py312 + py: + - 3.9 + - "3.10" + - "3.11" + - "3.12" + - "3.13" + platform: + - ubuntu-latest + - macos-latest + - windows-latest steps: - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + - name: Pick environment to run + id: env + shell: python + run: | + import codecs, os, sys + env = f"py=py3{sys.version_info[1]}\n" + print(f"Picked {env.split('=')[1].strip()} for {sys.version}") + with codecs.open(os.environ["GITHUB_OUTPUT"], "a", "utf-8") as file_handler: + file_handler.write(env) - name: Install Hatch run: pip install -U hatch - name: Run tests - run: hatch run +py=${{ matrix.py }} tests:all + run: hatch run +py=${{ steps.env.outputs.py }} tests:all - name: Convert coverage to XML run: | pip install coverage covdefaults coverage xml - name: Upload coverage uses: codecov/codecov-action@v4 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} build-dist: if: startsWith(github.ref, 'refs/tags/') diff --git a/pyproject.toml b/pyproject.toml index 210b29d..33edafd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,10 @@ [project] name = "importlib-metadata-argparse-version" -version = "2.1.0" +version = "3.0.0" description = "Argparse action to define CLI version with a delayed call to importlib.metadata" readme = "README.md" license = "BSD-3-Clause" -requires-python = ">=3.8" +requires-python = ">=3.9" authors = [{ name = "Álvaro Mondéjar Rubio", email = "mondejar1994@gmail.com" }] classifiers = [ "Development Status :: 5 - Production/Stable", @@ -14,7 +14,6 @@ classifiers = [ "Topic :: Software Development :: Libraries", "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -64,7 +63,7 @@ cov = [ ] [[tool.hatch.envs.tests.matrix]] -python = ["py38", "py39", "py310", "py311", "py312", "py313"] +python = ["py39", "py310", "py311", "py312", "py313"] [tool.project-config] cache = "2 days" @@ -87,7 +86,7 @@ exclude_lines = [ [tool.ruff] line-length = 80 -target-version = "py38" +target-version = "py39" [tool.ruff.lint] select = [