add venv to avoid pip install conflict #71
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
pull_request: | |
types: [opened] | |
jobs: | |
run-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Create virtual environment | |
run: python -m venv venv | |
- name: Upgrade pip in virtual environment | |
run: | | |
source venv/bin/activate | |
pip install --upgrade pip | |
- name: Install dependencies | |
run: | | |
source venv/bin/activate | |
pip install -e . | |
- name: Run Unit Tests | |
run: sudo python -m unittest | |
test-build-pypi: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install Twine and Build | |
run: sudo pip install twine build | |
- name: Create the distribution | |
run: | | |
git fetch --prune --unshallow --tags | |
sudo python -m build |