Skip to content

Commit

Permalink
improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
augray committed Dec 16, 2024
1 parent cfbea9e commit 45c5865
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
source .venv/bin/activate
pytest
- name: Check Schemas
run: make migrate_up_sqlite && make update-schema && git diff --exit-code
run: git checkout . && make migrate_up_sqlite && make update-schema && git diff --exit-code
- name: Wheel
run: |
make ui
Expand Down
15 changes: 15 additions & 0 deletions sematic/tests/test_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,21 @@ def test_helm_chart():
assert values_version == CURRENT_VERSION, message


def test_pyproject():
with open("pyproject.toml", "r") as fp:
matches = [re.match(r"version = \"([^\"]+)\"", line.strip()) for line in fp]

matches = [match for match in matches if match is not None]
assert len(matches) >= 1, "No version found in pyproject.toml"
version_str = matches[0][1]
pyproject_version = string_version_to_tuple(version_str)
message = (
f"Latest version in 'pyproject.toml' {pyproject_version} doesn't "
f"match the version in 'versions.py' {CURRENT_VERSION}."
)
assert pyproject_version == CURRENT_VERSION, message


def test_pypi_badge():
badge_version = None
with open("README.md", "r") as fp:
Expand Down
4 changes: 2 additions & 2 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 45c5865

Please sign in to comment.