diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 1842374..0fa991c 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -12,7 +12,7 @@ - [ ] Is this a feature addition? Briefly describe. - [ ] Did you modify QuaC-Watch config file? If so, did you modify multiqc template `configs/multiqc_config_template.jinja2` and script `src/quac_watch/create_mutliqc_configs.py` as necessary? -- [ ] Did you perform system-level testing manually as described in master readme doc? Did it pass completely? If not why? +- [ ] Did you perform system-level testing manually, using `--subtasks_slurm` flag, as described in the [documentation](https://quac.readthedocs.io/en/stable/system_testing/)? Did it pass completely? If not why? - [ ] Updated `Changelog.md` file with change logs in recommended format? diff --git a/.github/workflows/system_testing.yml b/.github/workflows/system_testing.yml new file mode 100644 index 0000000..4fd80cf --- /dev/null +++ b/.github/workflows/system_testing.yml @@ -0,0 +1,138 @@ +name: system_testing +on: + push: + paths: + - ".github/workflows/system_testing.yml" + - ".test/**" + - "configs/**" + - "src/**" + - "workflow/**" + pull_request: + paths: + - ".github/workflows/system_testing.yml" + - ".test/**" + - "configs/**" + - "src/**" + - "workflow/**" + types: + - opened + # - synchronize + - reopened + - ready_for_review + - converted_to_draft + workflow_dispatch: + +jobs: + system-testing: + name: System testing - QuaC + runs-on: ubuntu-20.04 + defaults: + run: + shell: bash -l {0} + + steps: + - name: Frees Disk Space (Ubuntu) + # For more info about this task, see https://github.com/uab-cgds-worthey/quac/issues/78 + uses: jlumbroso/free-disk-space@v1.2.0 + with: + # this might remove tools that are actually needed, when set to "true" + tool-cache: true + + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Create quac environment + uses: conda-incubator/setup-miniconda@v2 + with: + mamba-version: "*" + channels: conda-forge,bioconda,defaults + auto-activate-base: false + activate-environment: quac + environment-file: configs/env/quac.yaml + + - name: Check conda solution + run: | + mamba env export + + - name: Check snakemake exists in conda env + run: | + which snakemake + snakemake --version + + - uses: eWaterCycle/setup-singularity@v7 + with: + singularity-version: 3.8.3 + + - name: Check singularity is working + run: | + singularity --version + + - name: Set up dependencies for QuaC + run: | + bash src/setup_dependency_datasets.sh + + - name: Run QuaC system testing - WGS mode AND no prior QC data + run: | + PROJECT_CONFIG="project_2samples" + PRIOR_QC_STATUS="no_priorQC" + USE_SLURM="" + python src/run_quac.py \ + --project_name test_project \ + --projects_path ".test/ngs-data/" \ + --pedigree ".test/configs/${PRIOR_QC_STATUS}/${PROJECT_CONFIG}.ped" \ + --outdir "data/quac/results/test_${PROJECT_CONFIG}_wgs-${PRIOR_QC_STATUS}/analysis" \ + --quac_watch_config "configs/quac_watch/wgs_quac_watch_config.yaml" \ + --workflow_config "configs/workflow.yaml" \ + $USE_SLURM \ + || df -h + + - name: Run QuaC system testing - Exome mode AND no prior QC data + run: | + PROJECT_CONFIG="project_2samples" + PRIOR_QC_STATUS="no_priorQC" + USE_SLURM="" + python src/run_quac.py \ + --project_name test_project \ + --projects_path ".test/ngs-data/" \ + --pedigree ".test/configs/${PRIOR_QC_STATUS}/${PROJECT_CONFIG}.ped" \ + --outdir "data/quac/results/test_${PROJECT_CONFIG}_exome-${PRIOR_QC_STATUS}/analysis" \ + --quac_watch_config "configs/quac_watch/exome_quac_watch_config.yaml" \ + --workflow_config "configs/workflow.yaml" \ + --exome \ + $USE_SLURM \ + || df -h + + - name: Run QuaC system testing - WGS mode AND uses prior QC data + run: | + PROJECT_CONFIG="project_2samples" + PRIOR_QC_STATUS="include_priorQC" + USE_SLURM="" + python src/run_quac.py \ + --project_name test_project \ + --projects_path ".test/ngs-data/" \ + --pedigree ".test/configs/${PRIOR_QC_STATUS}/${PROJECT_CONFIG}.ped" \ + --outdir "data/quac/results/test_${PROJECT_CONFIG}_wgs-${PRIOR_QC_STATUS}/analysis" \ + --quac_watch_config "configs/quac_watch/wgs_quac_watch_config.yaml" \ + --include_prior_qc \ + --allow_sample_renaming \ + --workflow_config "configs/workflow.yaml" \ + $USE_SLURM \ + || df -h + + - name: Run QuaC system testing - Exome mode AND uses prior QC data + run: | + PROJECT_CONFIG="project_2samples" + PRIOR_QC_STATUS="include_priorQC" + USE_SLURM="" + python src/run_quac.py \ + --project_name test_project \ + --projects_path ".test/ngs-data/" \ + --pedigree ".test/configs/${PRIOR_QC_STATUS}/${PROJECT_CONFIG}.ped" \ + --outdir "data/quac/results/test_${PROJECT_CONFIG}_exome-${PRIOR_QC_STATUS}/analysis" \ + --quac_watch_config "configs/quac_watch/exome_quac_watch_config.yaml" \ + --exome \ + --include_prior_qc \ + --allow_sample_renaming \ + --workflow_config "configs/workflow.yaml" \ + $USE_SLURM \ + || df -h diff --git a/README.md b/README.md index 6049207..2f5e6ad 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ [![Snakemake](https://img.shields.io/badge/snakemake-6.0.5-brightgreen.svg?style=flat)](https://snakemake.readthedocs.io) [![ReadTheDocs](https://readthedocs.org/projects/quac/badge/?version=latest)](https://quac.readthedocs.io/en/stable/) [![DOI](https://zenodo.org/badge/593702083.svg)](https://zenodo.org/badge/latestdoi/593702083) - +[![system_testing](https://github.com/uab-cgds-worthey/quac/actions/workflows/system_testing.yml/badge.svg)](https://github.com/uab-cgds-worthey/quac/actions/workflows/system_testing.yml) # QuaC diff --git a/docs/Changelog.md b/docs/Changelog.md index a28a660..e9513ee 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -12,6 +12,11 @@ YYYY-MM-DD John Doe ``` --- +2023-05-31 Manavalan Gajapathy + +* Adds system testing as github actions workflow + + 2023-05-18 Manavalan Gajapathy * Constructs snakemake's `sbatch` command using args and values from cluster config file supplied via `--cluster_config`.