Skip to content

Minor changes to refelect updates to correlator routines #810

Minor changes to refelect updates to correlator routines

Minor changes to refelect updates to correlator routines #810

# This workflow is setup by Fei Zhang to use Github Actions 2020-09-14
# Updated by Melyn Roberts 2025 June to run tests using Anaconda3-2021.11 and Python and package versions designated in linux startup script
name: hiperseis_main_ci
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: openmpi-bin libopenmpi-dev libhdf5-dev
version: 1.0
- name: Cache dependencies
id: cache-dependencies
uses: actions/cache@main
with:
path: |
/home/runner/work/hiperseis
/usr/share/miniconda/envs/hiperseis
key: anaconda
- 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
- 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: Running pytest
run: |
eval "$(conda shell.bash hook)"
conda init
conda activate hiperseis
coverage run -m pytest tests
coverage xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@main
with:
token: ${{ secrets.CODECOV_TOKEN }}