Anaconda-1 #710
Workflow file for this run
This file contains hidden or 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
| # This workflow is setup by Fei Zhang to use Github Actions 2020-09-14 | |
| name: hiperseis_main_ci | |
| on: [push] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@main | |
| - name: Restore dependencies | |
| id: cache-dependencies | |
| uses: actions/cache/restore@main | |
| with: | |
| path: | | |
| /home/runner | |
| /usr/share/miniconda/envs/hiperseis | |
| key: anaconda-1 | |
| - name: Setting up environment | |
| if: steps.cache-dependencies.outputs.cache-hit != 'true' | |
| run: | | |
| wget -q https://repo.anaconda.com/archive/Anaconda3-2021.11-Linux-x86_64.sh -O anaconda.sh | |
| bash anaconda.sh -b -p $HOME/anaconda3 > /dev/null 2>&1 | |
| export PATH="$HOME/anaconda3/bin:$PATH" | |
| conda init bash | |
| source ~/.bashrc | |
| sudo apt-get install openmpi-bin libopenmpi-dev | |
| sudo apt-get install libhdf5-dev | |
| - name: Install dependencies | |
| if: steps.cache-dependencies.outputs.cache-hit != 'true' | |
| run: | | |
| git submodule update --init --recursive | |
| source setup_scripts/conda_env_linux.sh hiperseis | |
| - name: Always save cache | |
| id: cache-dependencies-save | |
| if: always() | |
| uses: actions/cache/save@main | |
| with: | |
| key: ${{ steps.cache-dependencies.outputs.cache-primary-key }} | |
| path: | | |
| /home/runner/work/hiperseis | |
| /usr/share/miniconda/envs/hiperseis | |
| - name: Running pytest | |
| shell: bash -el {0} | |
| run: | | |
| eval "$(conda shell.bash hook)" | |
| conda init | |
| conda activate hiperseis | |
| sudo apt-get install openmpi-bin libopenmpi-dev | |
| sudo apt-get install libhdf5-dev | |
| pip install -r tests/requirements.txt | |
| coverage run -m pytest ./tests | |
| coverage xml | |
| - name: Coveralls GitHub Action | |
| uses: coverallsapp/github-action@main | |
| with: | |
| format: cobertura |