Skip to content

Commit 1544a44

Browse files
author
Jon Palmer
committed
try conda for macos
1 parent d7acdda commit 1544a44

File tree

2 files changed

+30
-12
lines changed

2 files changed

+30
-12
lines changed

.github/workflows/test-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ jobs:
3939
runs-on: ${{ matrix.os }}
4040
strategy:
4141
matrix:
42-
os: [ubuntu-latest, macos-latest]
43-
python-version: ['3.9', '3.11'] # Test on min and stable versions (avoid mappy build issues)
42+
os: [ubuntu-latest] # Focus on Linux for release testing
43+
python-version: ['3.9', '3.11'] # Test on min and stable versions
4444

4545
steps:
4646
- name: Set up Python ${{ matrix.python-version }}

.github/workflows/tests.yml

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,13 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
os: [ubuntu-latest, macos-latest]
21+
os: [ubuntu-latest] # Temporarily disable macOS due to mappy build issues
2222
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
23-
exclude:
24-
# Exclude problematic combinations where mappy fails to build
23+
include:
24+
# Add one macOS test with conda-based installation
2525
- os: macos-latest
26-
python-version: '3.12'
27-
- os: macos-latest
28-
python-version: '3.13'
26+
python-version: '3.11'
27+
use_conda: true
2928

3029
steps:
3130
- uses: actions/checkout@v4
@@ -43,20 +42,39 @@ jobs:
4342
sudo apt-get install -y build-essential zlib1g-dev
4443
fi
4544
45+
- name: Setup conda (macOS only)
46+
if: matrix.use_conda == true
47+
uses: conda-incubator/setup-miniconda@v3
48+
with:
49+
miniforge-version: latest
50+
activate-environment: test
51+
python-version: ${{ matrix.python-version }}
52+
4653
- name: Install dependencies
4754
run: |
48-
python -m pip install --upgrade pip
49-
python -m pip install pytest pytest-cov
50-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
51-
python -m pip install -e .
55+
if [[ "${{ matrix.use_conda }}" == "true" ]]; then
56+
# Use conda for macOS to avoid mappy build issues
57+
conda install -c conda-forge -c bioconda mappy numpy pytest pytest-cov -y
58+
pip install natsort gfftk buscolite gapmm2 pyhmmer pyfastx requests gb-io json-repair pytantan
59+
pip install -e . --no-deps
60+
else
61+
# Linux - use pip as normal
62+
python -m pip install --upgrade pip
63+
python -m pip install pytest pytest-cov
64+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
65+
python -m pip install -e .
66+
fi
67+
shell: bash -l {0}
5268

5369
- name: Run unit tests
5470
run: |
5571
pytest tests/unit/ -v --cov=funannotate2 --cov-report=xml
72+
shell: bash -l {0}
5673

5774
- name: Run integration tests without external dependencies
5875
run: |
5976
pytest tests/integration/test_funannotate_cli.py -v
77+
shell: bash -l {0}
6078

6179
- name: Upload coverage reports to Codecov
6280
uses: codecov/codecov-action@v5

0 commit comments

Comments
 (0)