Add pixi support #253
This file contains 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: install-example-projects | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
jobs: | |
pip-install: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] # skips 3.7 (unsupported on GH Actions) | |
platform: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.platform }} | |
env: | |
PYTHONIOENCODING: "utf8" # https://gist.github.com/NodeJSmith/e7e37f2d3f162456869f015f842bcf15 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Update pyproject.toml | |
run: | | |
python .github/use-local-unidep.py | |
- name: Install example packages | |
run: | | |
set -ex | |
# Loop over all folders in `./example` and install them | |
for d in ./example/*/ ; do | |
pip install -e "$d" | |
pkg=$(basename $d) | |
python -c "import $pkg" | |
pip list | |
done | |
shell: bash | |
micromamba-install: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] # skips 3.7 (unsupported on GH Actions) | |
platform: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.platform }} | |
env: | |
PYTHONIOENCODING: "utf8" # https://gist.github.com/NodeJSmith/e7e37f2d3f162456869f015f842bcf15 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: mamba-org/setup-micromamba@v2 | |
with: | |
environment-name: unidep | |
create-args: >- | |
python=${{ matrix.python-version }} | |
- name: Install unidep | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e ".[toml]" | |
shell: bash -el {0} | |
- name: Update pyproject.toml | |
run: | | |
python .github/use-local-unidep.py | |
shell: bash -el {0} | |
- name: Install example packages | |
run: | | |
set -ex | |
# Loop over all folders in `./example` and install them | |
for d in ./example/*/ ; do | |
unidep install -e "$d" | |
pkg=$(basename $d) | |
python -c "import $pkg" | |
micromamba list | |
done | |
shell: bash -el {0} | |
miniconda-install: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.12"] # Just testing the oldest and newest supported versions | |
platform: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.platform }} | |
env: | |
PYTHONIOENCODING: "utf8" # https://gist.github.com/NodeJSmith/e7e37f2d3f162456869f015f842bcf15 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
- name: Conda info | |
shell: bash -el {0} | |
run: conda info | |
- name: Install unidep | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e ".[toml]" | |
shell: bash -el {0} | |
- name: Update pyproject.toml | |
run: | | |
python .github/use-local-unidep.py | |
shell: bash -el {0} | |
- name: Install example packages | |
run: | | |
set -ex | |
# Loop over all folders in `./example` and install them | |
for d in ./example/*/ ; do | |
unidep install -e "$d" | |
pkg=$(basename $d) | |
python -c "import $pkg" | |
conda list | |
done | |
shell: bash -el {0} |