Skip to content

Commit

Permalink
Add optional testing requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
ronald-jaepel committed Mar 22, 2024
1 parent 86d3744 commit 023a80f
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 4 deletions.
29 changes: 25 additions & 4 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,29 @@ jobs:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4

- name: Get Date
id: get-date
run: echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
shell: bash

- name: Setup Conda Environment
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
miniforge-variant: Mambaforge
use-mamba: true
activate-environment: cadet-process
channels: conda-forge,

- name: Cache conda
uses: actions/cache@v3
env:
# Increase this value to reset cache if environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ${{ env.CONDA }}/envs
key: python_${{ matrix.python-version }}-${{ steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER }}

- name: Test Wheel install and import
run: |
pip install wheel
Expand All @@ -28,5 +47,7 @@ jobs:
python -c "import cadet; print(cadet.__version__)"
- name: Test with pytest
run: |
pip install pytest
pip install .[testing]
mamba install cadet
mamba list
pytest tests --rootdir=tests -m "not slow"
7 changes: 7 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,12 @@
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
],
extras_require={
"testing": [
"pytest",
"matplotlib",
"pandas",
],
},
python_requires='>=3.7',
)

0 comments on commit 023a80f

Please sign in to comment.