Skip to content

Commit

Permalink
Added unit tests to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
OliverSchmitz committed Nov 5, 2024
1 parent 75fbe0c commit 176cc94
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 22 deletions.
27 changes: 19 additions & 8 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,31 @@ jobs:
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: campo
environment-file: environment/configuration/conda_environment.yaml
activate-environment: campo_dev
environment-file: environment/configuration/campo_dev.yaml
python-version: 3.11
auto-activate-base: false

- name: Build
- name: Configure Campo
shell: bash -l {0}
run: |
mkdir ${{ env.build-directory }}
cd ${{ env.build-directory }}
cmake ${{ env.source-directory }} -DCAMPO_BUILD_WHEEL=ON
make documentation
make install
rm -f package/dist/*gz
cmake \
-S ${{ env.source-directory }} \
-B ${{ env.build-directory }} \
-D CAMPO_BUILD_WHEEL=ON
- name: Build Campo
shell: bash -l {0}
run: |
cmake --build ${{ env.build-directory }} --target documentation
cmake --build ${{ env.build-directory }} --target install
rm -f ${{ env.build-directory }}/package/dist/*gz
- name: Test Campo
shell: bash -l {0}
run: |
ctest --test-dir ${{ env.build-directory }} --output-on-failure
- name: Deploy wheel
if: github.repository == 'computationalgeography/campo'
Expand Down
12 changes: 6 additions & 6 deletions environment/configuration/campo_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ channels:
- conda-forge
- nodefaults
dependencies:
- python=3.10
- python=3.11
- numpy
- lue>0.3.6
- hpx=1.9.0
- pcraster
- sphinx=5.3
- cmake
- sphinx-autodoc-typehints
- pandas
# - hpx=1.9.0
- pcraster
- xarray
- gdal
- networkx
- ipython

- cmake
# - ipython
9 changes: 1 addition & 8 deletions environment/configuration/conda_environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,9 @@ channels:
- conda-forge
- nodefaults
dependencies:
- cmake
- python=3.11
- numpy
- sphinx=5.3
- sphinx-autodoc-typehints
- pandas
- lue>0.3.6
- hpx=1.9.0
- pcraster
- xarray
- gdal
- networkx
- campo

0 comments on commit 176cc94

Please sign in to comment.