Skip to content

Commit

Permalink
Use virtual environment when creating requirements file (#410)
Browse files Browse the repository at this point in the history
* Remove locally-created package before publishing.

* Use virtual environment when creating requirements file
  • Loading branch information
delucchi-cmu authored Oct 17, 2024
1 parent 7e098c3 commit 43ddae9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,14 @@ jobs:
run: |
sudo apt-get update
python -m pip install --upgrade pip
pip install .
- name: Create lock requirements file
- name: Create lock requirements file in virtual environment
run: |
pip list --format=freeze --exclude "hats-import" > requirements.txt
pip uninstall -y hats-import
. .venv/bin/activate
python -m pip install .
python -m pip list --format=freeze --exclude "hats-import" > requirements.txt
python -m pip install .[dev]
python -m pytest tests
python -m pip uninstall -y hats-import
- name: Install build tools
run: pip install build
- name: Build package
Expand Down

0 comments on commit 43ddae9

Please sign in to comment.