Skip to content

Commit

Permalink
Merge pull request #11 from frack113/update-python
Browse files Browse the repository at this point in the history
Update python version
  • Loading branch information
thomaspatzke authored Nov 13, 2024
2 parents 19f0e70 + 942a5db commit 8af3334
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
8 changes: 4 additions & 4 deletions {{ cookiecutter.package_name }}/.github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ on:

jobs:
build-and-publish:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.9
- name: Verify versioning
run: |
[ "$(poetry version -s)" == "${GITHUB_REF#refs/tags/v}" ]
Expand Down
10 changes: 5 additions & 5 deletions {{ cookiecutter.package_name }}/.github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ jobs:
test:
strategy:
matrix:
os: [ 'ubuntu-20.04' ]
python-version: [ '3.8', '3.9', '3.10', '3.11' ]
os: ["ubuntu-24.04", "windows-2022", "macos-14"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
runs-on: {{ '${{ matrix.os }}' }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: {{ '${{ matrix.python-version }}' }}
- name: Install dependencies
Expand All @@ -30,7 +30,7 @@ jobs:
run: poetry run python print-coverage.py >> $GITHUB_ENV
- name: Create coverage badge
if: {{ '${{' }} github.repository == '{{ cookiecutter.github_account }}/{{ cookiecutter.package_name }}' && github.event_name == 'push' && runner.os == 'Linux' }}
uses: schneegans/dynamic-badges-action@v1.1.0
uses: schneegans/dynamic-badges-action@1.7.0
with:
auth: {{ '${{ secrets.GIST_SECRET }}' }}
gistID: {{ cookiecutter.coverage_gist }}
Expand Down
4 changes: 2 additions & 2 deletions {{ cookiecutter.package_name }}/print-coverage.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Prints code testing coverage as percentage for badge generation.
import xml.etree.ElementTree as et
from defusedxml.ElementTree import parse

tree = et.parse("cov.xml")
tree = parse("cov.xml")
root = tree.getroot()
coverage = float(root.attrib["line-rate"]) * 100
print(f"COVERAGE={coverage:3.4}%")
Expand Down
5 changes: 3 additions & 2 deletions {{ cookiecutter.package_name }}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ packages = [
]

[tool.poetry.dependencies]
python = "^3.8"
python = "^3.9"

[tool.poetry.dev-dependencies]
defusedxml = "^0.7"

[build-system]
requires = ["poetry-core>=1.0.0"]
requires = ["poetry-core>=1.8.1"]
build-backend = "poetry.core.masonry.api"

0 comments on commit 8af3334

Please sign in to comment.