Point Source Spectral Fitting with Normalizing Flows Approximation for Response and Background #191
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: 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 | |