Skip to content

Commit

Permalink
Refactor Conda environment setup and activation in CI
Browse files Browse the repository at this point in the history
Separated conda environment creation from dependency installation. This allows for clearer steps and improves environment activation before running tests.
  • Loading branch information
iosefa committed Sep 20, 2024
1 parent cd6907f commit 05a19f5
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,19 @@ jobs:
python-version: 3.10
channels: conda-forge

- name: Create and install dependencies in Conda environment
- name: Create Conda environment with Python 3.10 and PDAL
run: |
conda create --name pyforestscan_env python=3.10 pdal -c conda-forge
conda run -n pyforestscan_env pip install -r requirements.txt
conda run -n pyforestscan_env pip install -r requirements-dev.txt
conda create --name pyforestscan_env python=3.10 pdal gdal -c conda-forge -v
- name: Activate Conda environment and install dependencies
shell: bash -l {0}
run: |
conda activate pyforestscan_env
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Run tests
shell: bash -l {0}
run: |
conda run -n pyforestscan_env pytest
conda activate pyforestscan_env
pytest

0 comments on commit 05a19f5

Please sign in to comment.