Skip to content

Read the docs

Read the docs #301

Workflow file for this run

name: Run tutorials
on:
push:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
installer:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Free space
# HACK fixes 'No space left on device'
# see: https://github.com/orgs/community/discussions/25678#discussioncomment-5242449
# NOTE we don't use those, we use conda for everything anyway
run: rm -rf /opt/hostedtoolcache
- name: Checkout repository
uses: actions/checkout@v4
with:
sparse-checkout: |
docs
tests
sparse-checkout-cone-mode: false
lfs: false
# - name: Install conda environment dependencies
# uses: conda-incubator/setup-miniconda@v3
# with:
# miniforge-version: latest
# miniforge-variant: Miniforge3
# mamba-version: "*"
# use-mamba: true
# no-implicit-channels: true
# channels: conda-forge,bioconda
# channel-priority: strict
# activate-environment: JupyText
# auto-update-conda: true
# environment-file: tests/conda_tutorials_env.yaml
#
# - name: Setup Jupyter kernel
# run: |
# python -m ipykernel install --user
- name: Install python environment
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Run installation tutorial
working-directory: ./docs
# run: ./convert.sh --branch *_install.md
run: |
mkdir -p _test_tutorials
./convert.sh --version --branch --sralog --patch-only documentation/*.md tutorials/*.md
python extract_bash_code.py -o _test_tutorials documentation/*.md tutorials/*.md
cd _test_tutorials
bash installation.sh
- name: Create V-pipe installation archive
# HACK this acceleraters upload while preserving Unix-specifics (case sensitivity, file attributes).
run: tar --zstd -cvf vpipeinstallation.tar.zst ./docs/_test_tutorials/vp-analysis ./docs/_test_tutorials/*.sh
- name: Keep installation
uses: actions/upload-artifact@v4
with:
name: VPipeInstallation
path: vpipeinstallation.tar.zst
compression-level: 0 # no compression
if-no-files-found: error
# - name: Save notebooks
# uses: actions/upload-artifact@v4
# with:
# name: JupyterNotebooks-Install
# path: ./docs/*.ipynb
tutorial:
needs: installer
strategy:
max-parallel: 5
fail-fast: false
matrix:
virus: ["hiv"] #, "sarscov2"]
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Free space
# HACK fixes 'No space left on device'
# see: https://github.com/orgs/community/discussions/25678#discussioncomment-5242449
# NOTE we don't use those, we use conda for everything anyway
run: rm -rf /opt/hostedtoolcache
- name: Checkout repository
uses: actions/checkout@v4
with:
sparse-checkout: |
docs
tests
sparse-checkout-cone-mode: false
lfs: false
- name: Reuse installation
uses: actions/download-artifact@v4
with:
name: VPipeInstallation
- name: Extract V-pipe installation archive
run: tar --zstd -xvf vpipeinstallation.tar.zst
# - name: Install conda environment dependencies
# uses: conda-incubator/setup-miniconda@v3
# with:
# miniforge-version: latest
# miniforge-variant: Miniforge3
# python-version: "3.11"
# mamba-version: "*"
# use-mamba: true
# no-implicit-channels: true
# channels: conda-forge,bioconda
# channel-priority: strict
# activate-environment: JupyText
# auto-update-conda: true
# environment-file: tests/conda_tutorials_env.yaml
#
# - name: Setup Jupyter kernel
# run: |
# python -m ipykernel install --user
- name: Install python environment
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Run analysis tutorial
working-directory: ./docs
#run: ./convert.sh --version --branch --sralog tutorial*_${{ matrix.virus }}.md
run: |
cd _test_tutorials
bash tutorial_${{ matrix.virus }}.sh
- name: Save output
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: Tutorial_${{ matrix.virus }}
path: |
./docs/_test_tutorials/
!./docs/_test_tutorials/vp-analysis/work*/.snakemake/conda/*/
!./docs/_test_tutorials/vp-analysis/mini*/pkgs/
include-hidden-files: true
if-no-files-found: ignore
# - name: Save notebooks
# uses: actions/upload-artifact@v4
# with:
# name: JupyterNotebooks-${{ matrix.virus }}
# path: ./docs/*.ipynb
# - name: Publish
# uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./docs