Skip to content

Commit

Permalink
Explain commented out CI steps
Browse files Browse the repository at this point in the history
  • Loading branch information
rmodrak committed Jul 27, 2023
1 parent 7d8b653 commit 183651a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 14 deletions.
30 changes: 20 additions & 10 deletions .github/workflows/python-app.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will install Python dependencies and run tests
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python application

on:
Expand All @@ -12,31 +9,44 @@ on:
jobs:
build:

runs-on: ubuntu-latest
# we find that CPU/memory limits are less often exceeded using this
# specific version of Ubuntu
runs-on: ubuntu-20.04

#runs-on: ubuntu-latest


steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: pip installation test

- name: pip installation
# test pip installation first (much faster than conda)
run: |
pip install --upgrade pip
pip install -e .
- name: Basic checks
- name: Basic tests
run: |
python tests/check_import.py
python tests/check_entry_points.py
bash tests/check_examples.bash
- name: Integration tests
- name: Advanced tests
run: |
bash data/examples/unpack.bash
bash data/tests/unpack.bash
python tests/benchmark_cap_vs_mtuq.py --no_figures
python tests/test_grid_search_mt.py --no_figures
python tests/test_grid_search_mt_depth.py --no_figures
# - name: Conda installation tests
# run: |
# bash tests/conda_install.bash
# unfortunately, these Conda installation tests exceed the resource limits
# for GitHub workflows
# (https://github.com/actions/runner-images/issues/6680)
# (https://github.com/conda/conda/issues/8650)
#- name: conda installation
# timeout-minutes: 60
# run: |
# bash tests/conda_install.bash

1 change: 1 addition & 0 deletions env.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
dependencies:
- conda-build
- python=3
- numpy
- scipy
- obspy
Expand Down
7 changes: 3 additions & 4 deletions tests/conda_install.bash
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ MTUQ_PATH=$(dirname ${BASH_SOURCE[0]})/..
# mtuq/docs/install/env_conda.rst
#
PYTHON_VERSION=3
DEPENDENCIES="conda-build numpy scipy obspy instaseis pandas xarray netCDF4 h5py mpi4py retry"


#
Expand Down Expand Up @@ -89,15 +88,15 @@ conda_update $CONDA_PATH >> tests/log1
echo SUCCESS
echo

echo "Testing mtuq installation without PyGMT"
conda env create -q --name env_step2 python=$PYTHON_VERSION --file env.yaml > tests/log2
echo "Testing mtuq installation"
conda env create -q --name env_step2 --file env.yaml > tests/log2
conda activate env_step2
conda deactivate
echo SUCCESS
echo

echo "Testing mtuq installation with PyGMT"
conda env create -q --name env_step3 python=$PYTHON_VERSION --file env.yaml > tests/log3
conda env create -q --name env_step3 --file env.yaml > tests/log3
conda activate env_step3
conda install pygmt >> tests/log3
conda deactivate
Expand Down

0 comments on commit 183651a

Please sign in to comment.