Skip to content

Update test files and ensure that tests work with both conda and pip installs #3

Update test files and ensure that tests work with both conda and pip installs

Update test files and ensure that tests work with both conda and pip installs #3

name: Build and Test using pip (PR)
on:
pull_request:
branches: [ '**' ]
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# Need to clone everything to determine version from git.
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: "setup.cfg"
- name: Build and install
run: |
python -m pip install --upgrade pip setuptools
python -m pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install .
- name: Run tests
run: |
cd tests
pytest