Skip to content

Raise error if first element returns inf in _minimize_local_discrete #443

Raise error if first element returns inf in _minimize_local_discrete

Raise error if first element returns inf in _minimize_local_discrete #443

name: CI Upstream
on:
push:
branches:
- main
pull_request:
branches:
- main
types: [opened, reopened, synchronize, labeled]
schedule:
- cron: "0 0 * * *" # Daily “At 00:00” UTC
# TODO: switch to weekly once I know this works
# - cron: "0 17 * * 1" # “At 17:00 on Monday” UTC
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
upstream-dev:
name: upstream-dev
runs-on: ubuntu-latest
if: |
always()
&& (
github.event_name == 'schedule'
|| contains( github.event.pull_request.labels.*.name, 'run-upstream')
)
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
- name: Set up conda environment
uses: mamba-org/setup-micromamba@v2
with:
environment-file: environment.yml
environment-name: mesmer-tests
create-args: >-
python=${{ matrix.python-version }}
pytest-reportlog
- name: Install upstream versions
run: |
bash ci/install-upstream-wheels.sh
- name: Install mesmer
run: |
python -m pip install --no-deps -e .
- name: Environment info
run: |
micromamba info
micromamba list
echo ""
echo "numpy.show_config()"
echo ""
python -c "import numpy; numpy.show_config()"
- name: Import mesmer
run: |
python -c 'import mesmer'
- name: Run Tests
if: success()
id: status
run: python -m pytest
-n 2
-rf
--all
--report-log output-${{ matrix.python-version }}-log.jsonl
- name: Generate and publish the report
if: |
failure()
&& steps.status.outcome == 'failure'
&& github.event_name == 'schedule'
&& github.repository_owner == 'MESMER-group'
uses: xarray-contrib/issue-from-pytest-log@v1
with:
log-path: output-${{ matrix.python-version }}-log.jsonl