Skip to content

Merge pull request #1398 from deeptools/cleanup #8

Merge pull request #1398 from deeptools/cleanup

Merge pull request #1398 from deeptools/cleanup #8

Workflow file for this run

name: tests_pytest
on: [push, pull_request, workflow_dispatch]
defaults:
run:
shell: bash -l {0}
jobs:
check_versions_matches:
name: Check deeptools version matches galaxy tools
runs-on: ubuntu-latest
if: github.base_ref == 'master'
steps:
- uses: actions/checkout@v4
- name: Check path
run: find /home/runner/work/deepTools/deepTools -name "pyproject.toml"
- name: Get Version of Deeptools
run: echo "deeptools_version=$(grep "version" /home/runner/work/deepTools/deepTools/pyproject.toml | awk '{print substr($NF, 2, length($NF) - 2)}')" >> $GITHUB_ENV
- name: Get Version of Galaxy tools
run: echo "galaxy_deeptools_version=$(grep "token.*TOOL_VERSION" /home/runner/work/deepTools/deepTools/galaxy/wrapper/deepTools_macros.xml | awk -F '>|<' '{print $3}')" >> $GITHUB_ENV
- name: Versions
run: |
echo deeptools version=${deeptools_version}
echo deeptools version in galaxy=${galaxy_deeptools_version}
- name: Fail PR if versions not matching
run: |
if [ -z $galaxy_deeptools_version ]; then
echo "galaxy_deeptools_version not defined change the github action"
exit 1
fi
if [ -z $deeptools_version ]; then
echo "deeptools_version not defined change the github action"
exit 1
fi
if [ "$galaxy_deeptools_version" != "$deeptools_version" ]; then
echo "versions do not match"
exit 1
fi
build-linux:
name: Test on Linux
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9','3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: build deeptools
run: |
python -m venv venv
source venv/bin/activate
pip install maturin
maturin develop --release --extras actions
- name: test deeptools
run: |
source venv/bin/activate
pytest -v
- name: build wheel
run: |
source venv/bin/activate
python -m build
- name: test wheel
run: |
source venv/bin/activate
pip install dist/*whl
build-osx:
name: Test on OSX
runs-on: macOS-latest
strategy:
matrix:
python-version: ['3.9','3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: build deeptools
run: |
python -m venv venv
source venv/bin/activate
pip install maturin
maturin develop --release --extras actions
- name: test deeptools
run: |
source venv/bin/activate
pytest -v
- name: build wheel
run: |
source venv/bin/activate
python -m build
- name: test wheel
run: |
source venv/bin/activate
pip install dist/*whl