Skip to content

Commit

Permalink
Add a new job for test installation for publishing to pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhaoTianPu committed Apr 18, 2024
1 parent 7a75050 commit 65b606c
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/publish_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,33 @@ jobs:
name: python-package-distributions
path: dist/

test-installation:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.10]
steps:
- uses: actions/checkout@v2
with:
ref: 'master'
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Create and activate virtual environment
run: |
python -m venv venv
source venv/bin/activate
- name: Install dependencies and QFit
run: |
pip install --upgrade pip
pip install -r requirements.txt
pip install .
- name: Test installation
run: |
python -c "from qfit import Fit; print('Installation successful')"
publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
Expand Down

0 comments on commit 65b606c

Please sign in to comment.