Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 72 additions & 7 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,80 @@ on:
jobs:
Testing:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0} # Required for Conda environments to activate properly

steps:
- name: Checkout repository with submodules
# 1. Clear disk space (Crucial for Apptainer + DeepVariant)
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true

- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Test workflow
uses: snakemake/snakemake-github-action@v1.22.0

# 2. Install Apptainer on the Host
- name: Setup Apptainer
uses: eWaterCycle/setup-apptainer@v2
with:
directory: .test
snakefile: .test/Snakefile
args: "--configfile .test/config/config.yaml --use-conda --show-failed-logs --cores 2 --conda-cleanup-pkgs cache"

apptainer-version: '1.2.5'

# 3. Install Snakemake using Mamba (Faster/Native approach)
- name: Setup Mamba/Conda and Install Snakemake
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
activate-environment: snakemake
# Installing snakemake directly here
environment-config: >
name: snakemake
channels:
- conda-forge
- bioconda
- nodefaults
dependencies:
- snakemake
- python=3.10

# 4. Prepare your data (Files & Downloads)
- name: Prepare Test Data and Models
run: |
gzip -d .test/test_data/chr6_cdna.fa.gz
gzip -d .test/test_data/genome_chr6.fa.gz
mv .test/test_data/genome_chr6.fa.gz.fai .test/test_data/genome_chr6.fa.fai

mkdir -p workflow/supplementary_res/deepvariant_rna_model
BASE_URL="https://storage.googleapis.com/deepvariant/models/DeepVariant/1.4.0/DeepVariant-inception_v3-1.4.0+data-rnaseq_standard"

wget -q -P workflow/supplementary_res/deepvariant_rna_model "$BASE_URL/model.ckpt.data-00000-of-00001"
wget -q -P workflow/supplementary_res/deepvariant_rna_model "$BASE_URL/model.ckpt.example_info.json"
wget -q -P workflow/supplementary_res/deepvariant_rna_model "$BASE_URL/model.ckpt.index"
wget -q -P workflow/supplementary_res/deepvariant_rna_model "$BASE_URL/model.ckpt.meta"

echo "Data preparation complete."

# 5. Run Snakemake directly
- name: Test workflow
env:
# Save disk space by preventing Apptainer from caching the huge SIF files
APPTAINER_DISABLE_CACHE: "true"
run: |
snakemake \
--directory .test \
--snakefile .test/Snakefile \
--configfile .test/config/config.yaml \
--use-apptainer \
--use-conda \
--show-failed-logs \
--cores 2 \
--conda-cleanup-pkgs cache
Loading