add more tests #1359
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
| name: build | |
| on: | |
| schedule: | |
| - cron: "0 12 * * 1" | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| name: build (${{ matrix.os }}, ${{ matrix.python-version }}) | |
| if: "!contains(github.event.head_commit.message, 'ci skip')" | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| max-parallel: 4 | |
| fail-fast: false | |
| matrix: | |
| os: [macos-latest, ubuntu-latest] | |
| python-version: ['3.9', '3.10'] | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@v2 | |
| with: | |
| submodules: 'true' | |
| - name: Set up miniconda | |
| uses: conda-incubator/setup-miniconda@v2 | |
| with: | |
| miniconda-version: "latest" | |
| auto-update-conda: true | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| shell: bash -l {0} | |
| run: | | |
| pip install pytest nbconvert ipykernel | |
| - name: Install spinsfast for macos | |
| if: matrix.os == 'macos-latest' | |
| run: | | |
| brew install fftw | |
| CFLAGS=" -L/opt/homebrew/lib " python -m pip install spinsfast | |
| - name: Install spinsfast for ubuntu | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| sudo apt-get update && sudo apt-get install -y libfftw3-dev | |
| pip install spinsfast | |
| - name: Install extra dependencies for macos | |
| if: matrix.os == 'macos-latest' | |
| run: | | |
| brew install libconfig | |
| brew install gsl | |
| - name: Install GSL for ubuntu | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libgsl-dev | |
| - name: Install Teobresums-Dali for ubuntu | |
| if: matrix.os == 'ubuntu-latest' | |
| shell: bash -l {0} | |
| run: | | |
| git clone https://bitbucket.org/teobresums/teobresums.git $HOME/teobresums | |
| cd $HOME/teobresums/Python | |
| git checkout Dali | |
| pip install numpy | |
| python setup.py build_ext --inplace | |
| - name: Install Teobresums-Dali for macos | |
| if: matrix.os == 'macos-latest' | |
| shell: bash -l {0} | |
| run: | | |
| git clone https://bitbucket.org/teobresums/teobresums.git $HOME/teobresums | |
| cd $HOME/teobresums/Python | |
| git checkout Dali | |
| pip install numpy | |
| CFLAGS="-I/opt/homebrew/include -L/opt/homebrew/lib" \ | |
| LDFLAGS="-L/opt/homebrew/lib" \ | |
| python setup.py build_ext --inplace | |
| - name: Install pyseobnr | |
| run: | | |
| pip install pyseobnr | |
| - name: Install pipenv | |
| shell: bash -l {0} | |
| run: | | |
| pip install . | |
| - name: Download SXS NR data for precessing tests | |
| if: matrix.python-version != '3.9' | |
| shell: bash -l {0} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| python - <<'EOF' | |
| from gw_eccentricity.load_data import download_sxs_waveform | |
| download_sxs_waveform("SXS:BBH:2859", 4, "/tmp/gwecc_test_data", | |
| catalog_tag="v3.0.0") | |
| EOF | |
| - name: Run test suite | |
| shell: bash -l {0} | |
| run: | | |
| export PYTHONPATH=$HOME/teobresums/Python:$PYTHONPATH | |
| py.test test |