Skip to content

Commit

Permalink
Merge pull request #4 from luhipi/ci_enhancement
Browse files Browse the repository at this point in the history
Ci enhancement
  • Loading branch information
DaRa42 authored Aug 8, 2024
2 parents aade773 + 1d53e25 commit 69af070
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 29 deletions.
71 changes: 43 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: CI

on:
push:
branches:
- main
- githubci
on: [push, pull_request]

env:
SKIP: true
Expand Down Expand Up @@ -47,15 +43,18 @@ jobs:
python-version: '3.x'

- name: Run tests
if: env.SKIP == 'false'
run: |
conda init bash
source ~/.bashrc
source activate ci_env
conda create -n ci_temp_env --clone ci_env
wget https://raw.githubusercontent.com/insarlab/MiaplPy/main/conda-env.yml
conda-merge conda-env.yml tests/CI_docker/context/environment_sarvey.yml > env.yml
mamba update -n ci_temp_env -f env.yml
source activate ci_temp_env
rm -rf tests/testdata
wget -c https://seafile.projekt.uni-hannover.de/f/4b3be399dffa488e98db/?dl=1 -P tests/
unzip tests/testdata.zip
ls tests/testdata
wget -nv -c -O testdata.zip https://seafile.projekt.uni-hannover.de/f/4b3be399dffa488e98db/?dl=1
unzip testdata.zip
mv testdata tests/
make pytest
shell: bash

Expand Down Expand Up @@ -168,24 +167,40 @@ jobs:
with:
python-version: '3.x'

- name: Install dependencies
run: |
conda init bash
source ~/.bashrc
mamba update -n base mamba conda
mamba info
mamba env remove --name sarvey_testinstall --yes || echo "Environment sarvey_testinstall does not exist"
pip install conda-merge
wget https://raw.githubusercontent.com/insarlab/MiaplPy/main/conda-env.yml
conda-merge conda-env.yml tests/CI_docker/context/environment_sarvey.yml > env.yml
mamba env create --name sarvey_testinstall -f env.yml
source activate sarvey_testinstall
pip install git+https://github.com/insarlab/MiaplPy.git
pip install .
pip check
cd ..
python -c "import sarvey; print(sarvey)"
shell: bash
- name: Install Miniconda
run: |
if [ -d "$HOME/miniconda" ]; then
echo "Updating existing Miniconda installation."
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -u -p $HOME/miniconda
else
echo "Installing Miniconda."
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
fi
echo "$HOME/miniconda/bin" >> $GITHUB_PATH
source $HOME/miniconda/bin/activate
conda init bash
source ~/.bashrc
- name: Install dependencies
run: |
source $HOME/miniconda/bin/activate
conda install mamba -n base -c conda-forge
mamba update -n base mamba conda
mamba info
mamba env remove --name sarvey_testinstall --yes || echo "Environment sarvey_testinstall does not exist"
pip install conda-merge
wget https://raw.githubusercontent.com/insarlab/MiaplPy/main/conda-env.yml
conda-merge conda-env.yml tests/CI_docker/context/environment_sarvey.yml > env.yml
mamba env create --name sarvey_testinstall -f env.yml
source activate sarvey_testinstall
pip install git+https://github.com/insarlab/MiaplPy.git
pip install .
pip check
cd ..
python -c "import sarvey; print(sarvey)"
shell: bash

deploy_pages:
runs-on: self-hosted
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/config_test.json
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"general": {
"input_path": "tests/testdata/inputs",
"output_path": "tests/testdata/output/",
"output_path": "tests/testdata/output",
"num_cores": 50,
"num_patches": 1,
"apply_temporal_unwrapping": true,
Expand Down

0 comments on commit 69af070

Please sign in to comment.