Skip to content

Point Source Spectral Fitting with Normalizing Flows Approximation for Response and Background #191

Point Source Spectral Fitting with Normalizing Flows Approximation for Response and Background

Point Source Spectral Fitting with Normalizing Flows Approximation for Response and Background #191

name: unit_tests_ml_macos
on: [push, pull_request]
jobs:
tests:
runs-on: macos-latest
strategy:
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v4
# Ideally we would like to install everything
# automatically with pip. However, there's a conflict
# between the OpenMP libraries shipped with healpy and
# pytorch. See https://github.com/pytorch/pytorch/issues/44282
- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: cosipy-env
python-version: ${{ matrix.python-version }}
auto-activate-base: true
- name: Install dependencies OpenMP
shell: bash -el {0}
run: |
conda install -c conda-forge healpy pytorch
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install
run: |
python -m pip install --upgrade pip
pip install ".[ml]"
- name: Tests
run: |
pip install pytest pytest-cov
pytest tests --junitxml=junit/test-results.xml --cov=cosipy --cov-report=xml --cov-report=html
- name: Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true