switch tests to build in conda env #23
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
# This workflow will use the build action to build the msyd python package, and call the CLI interface to check the install worked | |
name: Test build | |
on: | |
push: | |
branches: [ "main", "dev" ] | |
pull_request: | |
branches: [ "main", "dev" ] | |
# Cancel if a newer run is started | |
# taken from https://github.com/nf-core/modules/blob/master/.github/workflows/nf-test.yml | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
# use old install manually | |
# since switching to conda no longer supports different python version | |
# - name: Build msyd | |
# uses: schneebergerlab/msyd@main | |
# # with: | |
# # python-version: ${{ matrix.python-version }} | |
- name: Set up Python ${{ inputs.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ inputs.python-version }} | |
cache: pip | |
- name: Update pip | |
run: python -m pip install --upgrade pip setuptools | |
shell: bash | |
- name: Install SyRI manually | |
run: | | |
# manually install syris dependencies | |
# the python version spoofing requires the --no-deps flag, so this is necessary | |
pip install Cython numpy pandas scipy psutil igraph longestrunsubsequence pysam pulp | |
# manually use pip to install syri from github, as it isn't on pypi | |
# spoof python version to get around bounds check | |
pip install 'git+https://github.com/schneebergerlab/syri.git' --python-version '3.10' --no-deps --no-warn-conflicts --target $(python -m site --user-site) | |
shell: bash | |
- name: Install other dependencies | |
run: pip install -r requirements.txt | |
shell: bash | |
- name: Test installation | |
run: | | |
msyd --version | |
msyd -h | |
msyd call -h | |
msyd view -h |