Skip to content

Migrate from conda/micromamba to pixi #2519

Migrate from conda/micromamba to pixi

Migrate from conda/micromamba to pixi #2519

Workflow file for this run

---
name: main
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
push:
branches:
- main
pull_request:
branches:
- '*'
jobs:
run-tests-linux:
name: Run tests on ubuntu-latest py${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- '312'
- '313'
- '314'
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.9.4
with:
pixi-version: v0.65.0
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
frozen: true
environments: test-linux-py${{ matrix.python-version }}
- name: Run pytest
shell: bash -el {0}
run: pixi run -e test-linux-py${{ matrix.python-version }} tests-with-cov
- name: Upload coverage report.
if: matrix.python-version == '312'
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
run-tests-win-and-mac:
name: Run tests on ${{ matrix.os }} py${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- windows-latest
python-version:
- '312'
- '313'
- '314'
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.9.4
with:
pixi-version: v0.65.0
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
frozen: true
environments: test-py${{ matrix.python-version }}
- name: Run pytest
shell: bash -el {0}
run: pixi run -e test-py${{ matrix.python-version }} tests-fast
run-tests-with-old-plotly:
name: Run tests on ubuntu-latest with plotly < 6
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.9.4
with:
pixi-version: v0.65.0
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
frozen: true
environments: test-old-plotly
- name: Run pytest
shell: bash -el {0}
run: pixi run -e test-old-plotly tests-fast
run-tests-nevergrad:
name: Run nevergrad tests py${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- '312'
- '313'
- '314'
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.9.4
with:
pixi-version: v0.65.0
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
frozen: true
environments: test-nevergrad-py${{ matrix.python-version }}
- name: Run pytest
shell: bash -el {0}
run: >-
pixi run -e test-nevergrad-py${{ matrix.python-version }}
pytest tests/optimagic/optimizers/test_nevergrad.py
code-in-docs:
name: Run code snippets in documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.9.4
with:
pixi-version: v0.65.0
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
frozen: true
environments: test-linux-py314
- name: Run doctest
shell: bash -el {0}
run: >-
pixi run -e test-linux-py314
python -m doctest -v docs/source/how_to/how_to_constraints.md
run-mypy:
name: Run mypy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.9.4
with:
pixi-version: v0.65.0
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
frozen: true
environments: typecheck
- name: Run mypy
shell: bash -el {0}
run: pixi run -e typecheck mypy