diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 8454e6e..b6da44f 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -5,8 +5,14 @@ name: status on: push: branches: [ main ] + paths: + - '**/*.py' + - '.github/workflows/*' pull_request: branches: [ main ] + paths: + - '**/*.py' + - '.github/workflows/*' schedule: # * is a special character in YAML so you have to quote this string - cron: '25 9 * * 2' @@ -28,8 +34,8 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install flake8 pytest if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + pip install flake8 pip install -e .[testing] - name: Lint with flake8 run: | diff --git a/README.md b/README.md index 1d0a984..b2bdf02 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,14 @@ pip install nuVeto This will install [MCEq](https://github.com/afedynitch/MCEq). -Extras are `pip install nuVeto[plotting, resources]` which will install some packages for plotting and generating muon reaching probabilities. +Since v2.3.1, a suite of tests is also installed with an optional dependency on `pytest`. The follow command should test if the installation worked as expected. + +```bash +pip install nuVeto[testing] +pytest --pyargs nuVeto +``` + +Extras are `pip install nuVeto[plotting, resources]` which will install some packages for making example plots and generating muon reaching probabilities. ### Usage diff --git a/tests/test_app.py b/nuVeto/tests/test_app.py similarity index 100% rename from tests/test_app.py rename to nuVeto/tests/test_app.py