From b6e1f3fb6854b2af627c24eb891b04355c0db5d4 Mon Sep 17 00:00:00 2001 From: Iason Krommydas Date: Wed, 27 Mar 2024 22:17:35 -0500 Subject: [PATCH] ci: use micromamba and uv and also install ROOT (#69) * use conda in ci and install root * comment out root install for now * attempt micromamba * attempt fix * let's try root * probably like this * fix? * do not upgrade pip * add root import and version print * is this needed? * sanity check * use correct shell * remove root version check * add default shell * try uv * maybe this will work * i don't understand this * I'm done with uv * Revert "I'm done with uv" This reverts commit ecbd0169cd65da18002ff3b4805c4971edce34fb. * oh it needs editable mode --- .github/workflows/ci.yml | 46 +++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76df85f..f0e8333 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,13 @@ on: types: - published +defaults: + run: + # The login shell is necessary for the setup-micromamba setup + # to work in subsequent jobs. + # https://github.com/mamba-org/setup-micromamba#about-login-shells + shell: bash -e -l {0} + jobs: tests_graph: runs-on: ubuntu-latest @@ -30,21 +37,25 @@ jobs: name: JIT compiled tests for Python ${{ matrix.python-version }} steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5.0.0 - name: Set up Python ${{ matrix.python-version }} - + - uses: mamba-org/setup-micromamba@v1 + name: Set up Micromamba environment with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies + environment-name: test-env + create-args: >- + python=${{ matrix.python-version }} + pip + root + - name: Install Python dependencies run: | - python -m pip install --upgrade pip - pip install .[dev] + which python + python -V + python -m pip install uv + python -m uv pip install -e ".[dev]" - name: Test with pytest run: | coverage run --source=. --omit=".tox/*" --branch -m pytest . coverage report - tests_eager: runs-on: ubuntu-latest timeout-minutes: 150 @@ -56,15 +67,20 @@ jobs: name: Eager mode tests for Python ${{ matrix.python-version }} steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5.0.0 - name: Set up Python ${{ matrix.python-version }} - + - uses: mamba-org/setup-micromamba@v1 + name: Set up Micromamba environment with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies + environment-name: test-env + create-args: >- + python=${{ matrix.python-version }} + pip + root + - name: Install Python dependencies run: | - python -m pip install --upgrade pip - pip install .[dev] + which python + python -V + python -m pip install uv + python -m uv pip install -e ".[dev]" - name: Test with pytest run: | ZFIT_DO_JIT=0