Skip to content

Commit

Permalink
update github workflow files
Browse files Browse the repository at this point in the history
  • Loading branch information
ioannis-vm committed Oct 9, 2023
1 parent 82f59d7 commit b89c5c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 83 deletions.
43 changes: 0 additions & 43 deletions .github/workflows/build_docs.yaml

This file was deleted.

47 changes: 7 additions & 40 deletions .github/workflows/test_and_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,43 +21,10 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
run: tox

deploy:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Check the current version on PyPi
id: version_step_pypi
run: |
python -m pip install osmg --upgrade
latest=$(pip show osmg | grep 'Version:' | awk '{print $2}')
echo "Latest Version found on PyPi: $latest"
echo "::set-output name=latest_version::$latest"
- name: Check the current version on setup.cfg
id: version_step_setupcfg
run: |
version=$(grep '^version' setup.cfg | awk -F= '{print $2}' | tr -d '[:space:]')
echo "Version found in setup.cfg: $version"
echo "::set-output name=setupcfg_version::$version"
- name: Prepare package
run: |
python -m pip install --upgrade pip setuptools wheel twine
python setup.py sdist bdist_wheel
python -m twine check dist/*
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist
- name: Deploy
if: ${{ steps.version_step_pypi.outputs.latest_version != steps.version_step_setupcfg.outputs.setupcfg_version }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}
python -m pip install -r requirements_dev.txt
- name: Run flake8
run: flake8 src
- name: Run mypy
run: mypy src
- name: Run tests
run: python -m pytest --doctest-modules src/osmg/

0 comments on commit b89c5c1

Please sign in to comment.