Skip to content

Commit

Permalink
Add test for version code
Browse files Browse the repository at this point in the history
  • Loading branch information
eltos committed Jan 20, 2025
1 parent 98b61ec commit 0a6aade
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,24 @@ jobs:
with:
extra_args: --all-files --hook-stage=manual

versioning:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: |
# Determine version
pip install -e .
VERSION=$(python3 -c "from xplt import __version__;print('v' + __version__)")
echo "Xplt version: $VERSION"
# Ensure it is unique
TAG=$(git tag -l $VERSION)
echo "Matching git tag: $TAG"
if [[ $TAG ]]; then
echo "Version is not unique. Please update it in `xplt/__init__.py`"
exit 1
fi

0 comments on commit 0a6aade

Please sign in to comment.