Skip to content

Commit

Permalink
use poetry and don't publish if it failed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ZihengSun committed Jul 21, 2024
1 parent a5f572d commit 99777c2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Publish PyGeoweaver Python 🐍 distributions 📦 to PyPI and TestPyPI

on: push
on:
workflow_run:
workflows: ["Run Tests"]
types:
- completed

jobs:
test-installation:
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,18 @@ jobs:
with:
python-version: '3.9' # specify the Python version you need

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
export PATH="$HOME/.local/bin:$PATH"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest
poetry install
- name: Run tests
run: |
pytest tests/
poetry run pytest tests/
- name: Upload pytest results
if: always()
Expand Down

0 comments on commit 99777c2

Please sign in to comment.