From adecacafff37f56c9f885f0378d79af8c886271e Mon Sep 17 00:00:00 2001 From: "Lars B. Rollik" Date: Thu, 2 Jul 2026 22:35:33 +0100 Subject: [PATCH] chore(ci): modernize CI to standard pattern - ci.yml: restrict push trigger to main; test matrix 3.12/3.13 - add tests/test_version.py verifying importlib.metadata version Tests: +1 (114 total). Bump: patch. --- .github/workflows/ci.yml | 4 ++-- tests/test_version.py | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 tests/test_version.py diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d1ab65..9dc7cd4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: CI on: push: - branches: ["**"] + branches: [main] tags-ignore: ["v*"] pull_request: branches: [main] @@ -41,7 +41,7 @@ jobs: fail-fast: false matrix: - python-version: ["3.11", "3.13"] + python-version: ["3.12", "3.13"] steps: - uses: actions/checkout@v6 diff --git a/tests/test_version.py b/tests/test_version.py new file mode 100644 index 0000000..8b495a5 --- /dev/null +++ b/tests/test_version.py @@ -0,0 +1,9 @@ +"""Package version is discoverable via importlib.metadata.""" + +from importlib.metadata import version + + +def test_version_is_non_empty_str() -> None: + v = version("ttl-barcoder") + assert isinstance(v, str) + assert v