Skip to content

Commit

Permalink
Partial rework of GH actions for setuptools
Browse files Browse the repository at this point in the history
  • Loading branch information
peterspackman committed Oct 16, 2023
1 parent ef4d39b commit 0d96439
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,28 +46,27 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Install poetry
- name: Install python build module
run: |
python -m pip install --upgrade pip
python -m pip install poetry
python -m pip install --upgrade pip build flake8 pytest
- name: Install dependencies
- name: Build the project
run: |
python -m poetry build --format wheel
python -m poetry install
python -m build
pip install dist/chmpy*.whl
- name: Lint (flake8)
run: |
# stop the build if there are Python syntax errors or undefined names
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
python -m flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
python -m flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run tests
run: |
poetry run pytest
python -m pytest
- name: Publish package to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: |
python -m poetry publish -u __token__ -p ${{ secrets.PYPI_TOKEN }}
python -m publish -u __token__ -p ${{ secrets.PYPI_TOKEN }}

0 comments on commit 0d96439

Please sign in to comment.