Add autodetect cadetpath functionality from CADET-Process to CADET-Python #89
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: pipeline | |
on: | |
push: | |
branches: | |
- master | |
- dev | |
pull_request: | |
jobs: | |
test-job: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
- 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: | |
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: | | |
mamba create -n testing python==${{ matrix.python-version }} | |
conda activate testing | |
pip install wheel | |
which pip | |
which mamba | |
python setup.py bdist_wheel | |
cd dist | |
pip install CADET_Python*.whl | |
python -c "import cadet; print(cadet.__version__)" | |
cd .. | |
- name: Test with pytest | |
run: | | |
pip install .[testing] | |
mamba install cadet -c conda-forge | |
mamba list | |
which cadet-cli | |
pytest tests --rootdir=tests -m "not slow" |