Skip to content

weekly tests

weekly tests #76

Workflow file for this run

name: weekly tests
on:
schedule:
# every Sunday at 0:00
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12)
# │ │ │ │ ┌───────────── day of the week (0 - 6)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
- cron: "0 0 * * 0"
env:
cache-version: "cache-v1"
jobs:
tests:
timeout-minutes: 720
defaults:
run:
shell: bash -l {0}
strategy:
max-parallel: 10
matrix:
config:
- { python-version: 3.9, os: ubuntu-latest }
- { python-version: "3.10", os: ubuntu-latest }
- { python-version: "3.11", os: ubuntu-latest }
- { python-version: 3.9, os: macos-latest }
- { python-version: "3.10", os: macos-latest }
- { python-version: "3.11", os: macos-latest }
# disabled until it's fixed.
runs-on: ${{ matrix.config.os }}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
NOT_CRAN: true
TZ: UTC
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Install ubuntu system dependencies
if: matrix.config.os == 'ubuntu-latest'
run: |
sudo apt-get install libcurl4-openssl-dev
sudo apt-get update -y && sudo apt-get install -y zlib1g-dev libglpk-dev libgmp3-dev libxml2-dev libicu-dev libhdf5-serial-dev libcurl4-gnutls-dev
- name: Install macOS system dependencies
if: matrix.config.os == 'macos-latest'
run: |
brew install cairo pkg-config autoconf automake libtool
- name: Cache conda
uses: actions/cache@v3
env:
# Increase this value to reset cache if etc/example-environment.yml has not changed
CACHE_NUMBER: 2
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('environment.yml') }}
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-activate-base: true
auto-update-conda: true
activate-environment: dandelion
channels: conda-forge, bioconda, anaconda, defaults
channel-priority: true
python-version: ${{ matrix.config.python-version }}
environment-file: environment.yml
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
- name: Display Python version
run: |
python --version
which python
- name: Setup blast and igblast
# just in case this happens again in the future
# conda install -c bioconda igblast blast ncbi-vdb=2.11.0
# https://github.com/bioconda/bioconda-recipes/issues/33479
run: |
conda install -c bioconda "igblast>=1.17.0" blast
- name: Test if blast works
run: |
blastn -h
- name: Test if igblast works
run: |
igblastn -h
- id: R
name: Check R version
run: |
R --version > VERSION
echo "version=$(head -1 VERSION | awk '{print $3}')" >> $GITHUB_OUTPUT
echo "mainbiocversion=$(Rscript -e 'cat(unlist(tools:::.BioC_version_associated_with_R_version()))' | awk '{print $1}')" >> $GITHUB_OUTPUT
echo "subbiocversion=$(Rscript -e 'cat(unlist(tools:::.BioC_version_associated_with_R_version()))' | awk '{print $2}')" >> $GITHUB_OUTPUT
echo "biocversion=$(Rscript -e 'cat(as.character(tools:::.BioC_version_associated_with_R_version()))' | awk '{print $1}')" >> $GITHUB_OUTPUT
shell: bash -l {0}
- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ steps.R.outputs.version}}
- name: Cache ubuntu R packages
if: "!contains(github.event.head_commit.message, '/nocache') && matrix.config.os == 'ubuntu-latest'"
uses: actions/cache@v3
with:
path: /home/runner/work/_temp/Library
key: ${{ env.cache-version }}-${{ matrix.config.os }}-biocversion-RELEASE_${{ steps.R.outputs.mainbiocversion}}_${{ steps.R.outputs.subbiocversion}}-r-${{ steps.R.outputs.version}}-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ env.cache-version }}-${{ matrix.config.os }}-biocversion-RELEASE_${{ steps.R.outputs.mainbiocversion}}_${{ steps.R.outputs.subbiocversion}}-r-${{ steps.R.outputs.version}}-
- name: Cache macOS R packages
if: "!contains(github.event.head_commit.message, '/nocache') && matrix.config.os != 'ubuntu-latest'"
uses: actions/cache@v3
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ env.cache-version }}-${{ matrix.config.os }}-biocversion-RELEASE_${{ steps.R.outputs.mainbiocversion}}_${{ steps.R.outputs.subbiocversion}}-r-${{ steps.R.outputs.version}}-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ env.cache-version }}-${{ matrix.config.os }}-biocversion-RELEASE_${{ steps.R.outputs.mainbiocversion}}_${{ steps.R.outputs.subbiocversion}}-r-${{ steps.R.outputs.version}}-
- name: Setup r-lib/remotes
run: |
options(install.packages.compile.from.source = "never")
install.packages(c('remotes', 'optparse', 'RCurl', 'XML','matrixStats', 'stringi'))
shell: Rscript {0}
- name: Install Dandelion
run: |
python -m pip install git+https://github.com/emdann/milopy.git
python -m pip install palantir
python -m pip install ".[scirpy]"
- name: Install ubuntu R dependencies
if: matrix.config.os == 'ubuntu-latest'
run: |
options(install.packages.compile.from.source = "never")
remotes::install_cran("BiocManager")
BiocManager::install(c('Biostrings', 'GenomicAlignments', 'IRanges'))
install.packages(c('shazam', 'alakazam', 'tigger', 'optparse'))
shell: Rscript {0}
- name: Install macOS R dependencies
if: matrix.config.os != 'ubuntu-latest'
run: |
options(install.packages.compile.from.source = "never")
remotes::install_cran("BiocManager")
BiocManager::install(c('Biostrings', 'GenomicAlignments', 'IRanges'))
install.packages(c('shazam', 'alakazam', 'tigger', 'optparse'))
shell: Rscript {0}
- name: Test if R dependencies are installed properly
run: |
Rscript tests/r_dependencies.R
shell: bash -l {0}
- name: Test with pytest
run: |
python -m pytest --cov=dandelion --cov-report=xml --ignore=container -rP -W ignore::DeprecationWarning -W ignore::PendingDeprecationWarning -W ignore::FutureWarning
- name: Show coverage
run: |
coverage report