From 5bffdbea93753aba269c14d0d5cd62074768c6e2 Mon Sep 17 00:00:00 2001 From: Anna Moeller Date: Fri, 19 Jun 2026 09:57:38 +0200 Subject: [PATCH] Modernise CI workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Switch from setup-miniconda to mamba-org/setup-micromamba (faster, built-in environment caching) - Update actions/checkout v2 → v4 - Add pull_request trigger and pyproject.toml to watched paths - Add fail-fast: false so one Python version failure doesn't cancel others - Install package with pip install -e ".[test]" to get pytest and pytest-cov - Replace python tests/test_mwe.py with pytest -m "not slow" Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/python-package-conda.yml | 49 ++++++++++++---------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 480629d..debddd0 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -1,42 +1,45 @@ -name: Test MWE with Python 3.9-3.13 +name: CI on: push: paths: - 'scxmatch/**' - 'tests/**' + - 'pyproject.toml' + - '.github/workflows/**' + pull_request: + paths: + - 'scxmatch/**' + - 'tests/**' + - 'pyproject.toml' - '.github/workflows/**' - jobs: - test-bioconda-install: + test: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - - name: Checkout repo - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - name: Set up Miniconda - uses: conda-incubator/setup-miniconda@v2 + - name: Set up Micromamba + uses: mamba-org/setup-micromamba@v2 with: - miniconda-version: 'latest' - channels: conda-forge, bioconda - auto-activate-base: true + environment-name: test-env + create-args: >- + python=${{ matrix.python-version }} + graph-tool + channels: conda-forge + cache-environment: true + + - name: Install package with test dependencies + shell: bash -el {0} + run: pip install -e ".[test]" - - name: Install dependencies and run test - shell: bash -l {0} - run: | - conda create -n test-environment -y \ - python=${{ matrix.python-version }} \ - pip - - conda install -n test-environment -y -c conda-forge graph-tool - - conda run -n test-environment python -m pip install --upgrade pip - conda run -n test-environment python -m pip install . - - conda run -n test-environment python tests/test_mwe.py + - name: Run tests + shell: bash -el {0} + run: pytest -m "not slow"