Skip to content
Merged
Show file tree
Hide file tree
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
82 changes: 82 additions & 0 deletions .github/workflows/full-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: full workflow

on:
pull_request:
workflow_dispatch:

concurrency:
group: full-workflow-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
run-workflow:
name: pytest --run-workflow
runs-on: ubuntu-latest
timeout-minutes: 360
permissions:
contents: read
defaults:
run:
shell: bash -el {0}
env:
SNAKEMAKE_CONDA_FRONTEND: mamba
GITHUB_PAT: ${{ github.token }}
TEST_WORKFLOW_SNAKEMAKE_ARGS: >-
--resources mem_mb=8192
--set-resources
cellbender:mem_mb=3072
cellbender:runtime=30
tenx2seuratrds:mem_mb=2048
tenx2seuratrds:runtime=10
emptydrops:mem_mb=2048
emptydrops:runtime=10
soupx:mem_mb=2048
soupx:runtime=10
soupx_emptydrops:mem_mb=2048
soupx_emptydrops:runtime=10
cellbender2seurat:mem_mb=2048
cellbender2seurat:runtime=10
doubletfinder:mem_mb=2048
doubletfinder:runtime=10
doubletfinder_cellbender:mem_mb=2048
doubletfinder_cellbender:runtime=10
scdblfinder:mem_mb=3072
scdblfinder:runtime=10
scdblfinder_cellbender:mem_mb=3072
scdblfinder_cellbender:runtime=10
posthocfilter_mad:mem_mb=3072
posthocfilter_mad:runtime=10
posthocfilter_mad_cellbender:mem_mb=3072
posthocfilter_mad_cellbender:runtime=10
posthocfilter_threshold:mem_mb=2048
posthocfilter_threshold:runtime=10
posthocfilter_threshold_cellbender:mem_mb=2048
posthocfilter_threshold_cellbender:runtime=10
marker_manifest:mem_mb=1024
marker_manifest:runtime=5
find_markers:mem_mb=2048
find_markers:runtime=5
combine_markers:mem_mb=1024
combine_markers:runtime=5
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Create test environment
uses: mamba-org/setup-micromamba@v2
with:
environment-file: environment.yml
cache-environment: true
cache-downloads: true

- name: Cache Snakemake rule environments
uses: actions/cache@v4
with:
path: .snakemake/conda
key: snakemake-conda-full-${{ runner.os }}-${{ hashFiles('workflow/envs/*.yml') }}
restore-keys: |
snakemake-conda-full-${{ runner.os }}-
snakemake-conda-${{ runner.os }}-

- name: Run full test-data workflow
run: pytest tests --run-workflow -q
8 changes: 8 additions & 0 deletions tests/run_test_workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ set -euo pipefail

usage() {
echo "Usage: $0 [--conda-prefix PATH] [additional snakemake args...]"
echo "Set TEST_WORKFLOW_SNAKEMAKE_ARGS to append whitespace-delimited Snakemake args before command-line extras."
}

script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
Expand Down Expand Up @@ -61,6 +62,12 @@ if [[ -n "${snakemake_conda_prefix}" ]]; then
conda_prefix_args=(--conda-prefix "${snakemake_conda_prefix}")
fi

env_snakemake_args=()
if [[ -n "${TEST_WORKFLOW_SNAKEMAKE_ARGS:-}" ]]; then
# Intended for simple Snakemake CLI tokens, such as --set-resources entries.
read -r -a env_snakemake_args <<< "${TEST_WORKFLOW_SNAKEMAKE_ARGS}"
fi

snakemake --unlock "${common_args[@]}" "${conda_prefix_args[@]}"
rm -rf testdata/results

Expand All @@ -71,4 +78,5 @@ snakemake \
--retries 2 \
--jobs 200 \
--latency-wait 600 \
"${env_snakemake_args[@]}" \
"${extra_snakemake_args[@]}"
Loading