Skip to content
Snippets Groups Projects
Commit d2b80f76 authored by Jeremy Mathews's avatar Jeremy Mathews
Browse files

add simple and detailed tests

parent c0e59b31
Branches
Tags
4 merge requests!53Develop,!51Resolve "Add pytest to CI",!50Resolve "Add pytest to CI",!49Resolve "Add pytest to CI"
Pipeline #4471 failed
......@@ -3,12 +3,16 @@ before_script:
- module load python/3.6.1-2-anaconda
- pip install --user pytest-pythonpath==0.7.1 pytest-cov==2.5.1
- module load nextflow/0.31.1_Ignite
- mkdir test_data/hu.v3s1r500
- mkdir test_data/mu.v3s1r500
- mkdir test_data/hu.v2s1r500
- mkdir -p test_data/mu.v2s2r10k
- mkdir -p test_data/hu.v3s2r10k
- mkdir test_data/hu.v3s2r10k
- mkdir test_data/mu.v3s2r10k
- ln -sfn /project/shared/bicf_workflow_ref/workflow_testdata/cellranger/cellranger_count/hu.v3s1r500/* test_data/hu.v3s1r500/
- ln -sfn /project/shared/bicf_workflow_ref/workflow_testdata/cellranger/cellranger_count/mu.v3s1r500/* test_data/mu.v3s1r500/
- ln -sfn /project/shared/bicf_workflow_ref/workflow_testdata/cellranger/cellranger_count/hu.v2s1r500/* test_data/hu.v2s1r500/
- ln -sfn /project/shared/bicf_workflow_ref/workflow_testdata/cellranger/cellranger_count/mu.v2s2r10k/* test_data/mu.v2s2r10k/
- ln -sfn /project/shared/bicf_workflow_ref/workflow_testdata/cellranger/cellranger_count/hu.v3s2r10k/* test_data/hu.v3s2r10k/
- ln -sfn /project/shared/bicf_workflow_ref/workflow_testdata/cellranger/cellranger_count/mu.v3s2r10k/* test_data/mu.v3s2r10k/
stages:
- astrocyte
......@@ -26,10 +30,12 @@ astrocyte_check:
when:
- always
run_hu.cr3v2ref3.0.0:
simple_1:
stage: simple
only: branches
except: master
script:
- nextflow run workflow/main.nf --fastq "$CI_PROJECT_DIR/test_data/hu.v2s1r500/*.fastq.gz" --designFile "$CI_PROJECT_DIR/test_data/hu.v2s1r500/design.csv" --genome 'GRCh38-3.0.0' --kitVersion 'two' --version '3.0.2'
- nextflow run workflow/main.nf --fastq "$CI_PROJECT_DIR/test_data/hu.v3s1r500/*.fastq.gz" --designFile "$CI_PROJECT_DIR/test_data/hu.v3s1r500/design.csv" --genome 'GRCh38-3.0.0' --kitVersion 'three' --version '3.0.2'
- pytest -m count302
artifacts:
name: "$CI_JOB_NAME"
......@@ -42,13 +48,50 @@ run_hu.cr3v2ref3.0.0:
when:
- always
run_mu.cr2v2ref1.2.0:
simple_2:
stage: simple
only: branches
except: master
script:
- nextflow run workflow/main.nf --fastq "$CI_PROJECT_DIR/test_data/mu.v3s1r500/*.fastq.gz" --designFile "$CI_PROJECT_DIR/test_data/mu.v3s1r500/design.csv" --genome 'mm10-3.0.0' --kitVersion 'three' --version '3.0.1'
- pytest -m count301
artifacts:
name: "$CI_JOB_NAME"
when: always
paths:
- .nextflow.log
expire_in: 2 days
retry:
max: 2
when:
- always
simple_3:
stage: simple
only: branches
except: master
script:
- nextflow run workflow/main.nf --fastq "$CI_PROJECT_DIR/test_data/hu.v2s1r500/*.fastq.gz" --designFile "$CI_PROJECT_DIR/test_data/hu.v2s1r500/design.csv" --genome 'GRCh38-1.2.0' --kitVersion 'two' --version '2.1.1'
- pytest -m count211
artifacts:
name: "$CI_JOB_NAME"
when: always
paths:
- .nextflow.log
expire_in: 2 days
retry:
max: 2
when:
- always
detailed_1:
stage: detailed
only: master
except:
- tags
script:
- nextflow run workflow/main.nf --fastq "$CI_PROJECT_DIR/test_data/mu.v2s2r10k/*.fastq.gz" --designFile "$CI_PROJECT_DIR/test_data/mu.v2s2r10k/design.csv" --genome 'mm10-1.2.0' --kitVersion 'auto' --version '2.1.1'
- pytest -m count211
- nextflow run workflow/main.nf --fastq "$CI_PROJECT_DIR/test_data/hu.v3s2r10k/*.fastq.gz" --designFile "$CI_PROJECT_DIR/test_data/hu.v3s2r10k/design.csv" --genome 'GRCh38-3.0.0' --kitVersion 'three' --version '3.0.2'
- pytest -m count302
artifacts:
name: "$CI_JOB_NAME"
when: always
......@@ -60,12 +103,13 @@ run_mu.cr2v2ref1.2.0:
when:
- always
run_hu.cr3v3ref3.0.0:
detailed_2:
stage: detailed
only: master
except:
- tags
script:
- nextflow run workflow/main.nf --fastq "$CI_PROJECT_DIR/test_data/hu.v3s2r10k/*.fastq.gz" --designFile "$CI_PROJECT_DIR/test_data/hu.v3s2r10k/design.csv" --genome 'GRCh38-3.0.0' --kitVersion 'auto' --version '3.0.2'
- nextflow run workflow/main.nf --fastq "$CI_PROJECT_DIR/test_data/mu.v3s2r10k/*.fastq.gz" --designFile "$CI_PROJECT_DIR/test_data/mu.v3s2r10k/design.csv" --genome 'mm10-3.0.0' --kitVersion 'three' --version '3.0.2'
- pytest -m count302
artifacts:
name: "$CI_JOB_NAME"
......
......@@ -12,6 +12,10 @@ test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
def test_count211_design():
assert os.path.exists(os.path.join(test_output_path, 'design.checked.csv'))
@pytest.mark.count301
def test_count301_design():
assert os.path.exists(os.path.join(test_output_path, 'design.checked.csv'))
@pytest.mark.count302
def test_count302_design():
assert os.path.exists(os.path.join(test_output_path, 'design.checked.csv'))
......@@ -14,6 +14,11 @@ def test_count211_count():
assert os.path.exists(os.path.join(test_output_path, 'count211', 'sample1_metrics_summary.tsv'))
assert os.path.exists(os.path.join(test_output_path, 'count211', 'sample1', 'outs'))
@pytest.mark.count301
def test_count301_count():
assert os.path.exists(os.path.join(test_output_path, 'count301', 'sample1_metrics_summary.tsv'))
assert os.path.exists(os.path.join(test_output_path, 'count301', 'sample1', 'outs'))
@pytest.mark.count302
def test_count302_count():
assert os.path.exists(os.path.join(test_output_path, 'count302', 'sample1_metrics_summary.tsv'))
......
......@@ -12,6 +12,10 @@ test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
def test_count211_multiqc():
assert os.path.exists(os.path.join(test_output_path, 'multiqc_report.html'))
@pytest.mark.count301
def test_count301_multiqc():
assert os.path.exists(os.path.join(test_output_path, 'multiqc_report.html'))
@pytest.mark.count302
def test_count302_multiqc():
assert os.path.exists(os.path.join(test_output_path, 'multiqc_report.html'))
......@@ -13,6 +13,11 @@ def test_count211_versions():
assert os.path.exists(os.path.join(test_output_path, 'versions_mqc.yaml'))
assert os.path.exists(os.path.join(test_output_path, 'references_mqc.yaml'))
@pytest.mark.count301
def test_count301_versions():
assert os.path.exists(os.path.join(test_output_path, 'versions_mqc.yaml'))
assert os.path.exists(os.path.join(test_output_path, 'references_mqc.yaml'))
@pytest.mark.count302
def test_count302_versions():
assert os.path.exists(os.path.join(test_output_path, 'versions_mqc.yaml'))
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment