Skip to content

Commit

Permalink
Add tests for 'miniver ver' command
Browse files Browse the repository at this point in the history
  • Loading branch information
jbweston committed Apr 24, 2021
1 parent 73a26a7 commit 5b3d38b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,16 @@ jobs:
- name: Test versioning of dummy project
run: |
python -c "import my_package; assert my_package.__version__ == '0.0.0'"
[[ $(miniver ver my_package) = "0.0.0" ]] || exit 1
cd ../my_package
echo "# Extra comment" >> setup.py
python -c "import my_package; assert my_package.__version__.endswith('dirty')"
[[ $(miniver ver my_package) =~ dirty$ ]] || exit 1
python -c "import my_package; assert my_package.__version__.startswith('0.0.0')"
[[ $(miniver ver my_package) =~ ^0\.0\.0 ]] || exit 1
git commit -a -m "new comment"
python -c "import my_package; assert my_package.__version__.startswith('0.0.0.dev1')"
[[ $(miniver ver my_package) =~ ^0\.0\.0\.dev1 ]] || exit 1
git tag -a 0.0.1 -m "0.0.1"
python -c "import my_package; assert my_package.__version__ == '0.0.1'"
[[ $(miniver ver my_package) = '0.0.1' ]] || exit 1

0 comments on commit 5b3d38b

Please sign in to comment.