Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/smoke_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Smoke Tests

on: [push, pull_request]

jobs:
git-url:
# see the following for valid dependency specifiers
# https://packaging.python.org/en/latest/specifications/dependency-specifiers/#dependency-specifiers
# we construct from the GitHub Actions context
name: Install and import from git url
runs-on: ubuntu-latest
steps:
- uses: astral-sh/setup-uv@v7
with:
ignore-empty-workdir: "true" # resolve warning about "Empty workdir detected. This may cause unexpected behavior. You can enable ignore-empty-workdir to mute this warning."
cache-dependency-glob: "" # resolve warning about "No file matched to ... The cache will never get invalidated. Make sure you have checked out the target repository and configured the cache-dependency-glob input correctly."
- run: uv init --bare --name smoke-test
- run: uv add "scheil @ git+https://github.com/${{ github.repository }}.git@${{ github.sha }}"
- run: uv run python -c "import scheil; print(scheil.__version__)"
10 changes: 4 additions & 6 deletions scheil/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@
# source control management system at the project root.
__version__ = get_version(root='..', relative_to=__file__)
del get_version
except ImportError:
except (ImportError, LookupError):
# Fall back on the metadata of the installed package
try:
from importlib.metadata import version
except ImportError:
# backport for Python<3.8
from importlib_metadata import version
# ImportError occurs if there's no ._dev
# LookupError occurs if get_version fails
from importlib.metadata import version
__version__ = version("scheil")
del version