Skip to content

Commit

Permalink
add version check to ci (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjubes authored Oct 16, 2021
1 parent 2918c59 commit e620665
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/scipts/check-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

set -e
EXEC_VER=$(./run.py --version | awk '{print $3'})
PYPI_VER=$(poetry version | awk '{print $2'})

if [[ "$EXEC_VER" == "$PYPI_VER" ]]; then
echo "PyPi and Executable versions match"
echo "Version: $PYPI_VER"
exit 0
fi

echo "Pypi version: $PYPI_VER"
echo "Executable version: $EXEC_VER"
echo "Version mismatch"
exit 1;
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ jobs:
poetry config virtualenvs.create false
poetry install
pip install pytest-cov
- name: Version Check
run: |
./.github/scipts/check-version.sh
- name: Run Tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit e620665

Please sign in to comment.