Commit a20066fe authored by Gervaise Henry's avatar Gervaise Henry 🤠

Merge branch '25-AddPytestCI' into 'develop'

Resolve "Add pytest to CI"

Closes #25

See merge request !40
parents b1e7748e 8ebc05b9
Pipeline #4462 passed with stages
in 2 minutes and 16 seconds
before_script:
- module load astrocyte
- 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 -p test_data/simple1
- mkdir -p test_data/simple2
......@@ -28,6 +29,7 @@ simple_1FC:
- tags
script:
- nextflow run workflow/main.nf --bcl "test_data/simple1/*.tar.gz" --designFile "test_data/simple1/cellranger-tiny-bcl-simple-1_2_0.csv"
- pytest -m simple1
artifacts:
name: "$CI_JOB_NAME"
when: always
......@@ -43,6 +45,7 @@ simple_2FC:
stage: simple
script:
- nextflow run workflow/main.nf --bcl "test_data/simple2/*.tar.gz" --designFile "test_data/simple2/cellranger-tiny-bcl-simple-1_2_0.csv"
- pytest -m simple2
artifacts:
name: "$CI_JOB_NAME"
when: always
......@@ -52,4 +55,4 @@ simple_2FC:
retry:
max: 2
when:
- always
\ No newline at end of file
- always
#!/usr/bin/env python3
import pytest
import pandas as pd
from io import StringIO
import os
test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
'/../output/misc/checkDesignFile/run/'
@pytest.mark.simple1
def test_simple1_design():
assert os.path.exists(os.path.join(test_output_path, 'design.checked.csv'))
@pytest.mark.simple2
def test_simple2_design():
assert os.path.exists(os.path.join(test_output_path, 'design.checked.csv'))
#!/usr/bin/env python3
import pytest
import pandas as pd
from io import StringIO
import os
test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
'/../output/misc/fastqc/run/'
@pytest.mark.simple1
def test_simple1_fastqc():
assert os.path.exists(os.path.join(test_output_path, 'cellranger-tiny-bcl-1_2_0'))
@pytest.mark.simple2
def test_simple2_fastqc():
assert os.path.exists(os.path.join(test_output_path, 'cellranger-tiny-bcl-1_2_0-1'))
assert os.path.exists(os.path.join(test_output_path, 'cellranger-tiny-bcl-1_2_0-2'))
#!/usr/bin/env python3
import pytest
import pandas as pd
from io import StringIO
import os
test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
'/../output/mkfastq/'
@pytest.mark.simple1
def test_simple1_mkfastq():
assert os.path.exists(os.path.join(test_output_path, 'cellranger-tiny-bcl-1_2_0', 'outs'))
@pytest.mark.simple2
def test_simple2_mkfastq():
assert os.path.exists(os.path.join(test_output_path, 'cellranger-tiny-bcl-1_2_0-1', 'outs'))
assert os.path.exists(os.path.join(test_output_path, 'cellranger-tiny-bcl-1_2_0-2', 'outs'))
#!/usr/bin/env python3
import pytest
import pandas as pd
from io import StringIO
import os
test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
'/../output/multiqc/run/'
@pytest.mark.simple1
def test_simple1_multiqc():
assert os.path.exists(os.path.join(test_output_path, 'multiqc_report.html'))
@pytest.mark.simple2
def test_simple2_multiqc():
assert os.path.exists(os.path.join(test_output_path, 'multiqc_report.html'))
#!/usr/bin/env python3
import pytest
import pandas as pd
from io import StringIO
import os
test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
'/../output/untarBCL/'
@pytest.mark.simple1
def test_simple1_untarBCL():
assert os.path.exists(os.path.join(test_output_path, 'cellranger-tiny-bcl-1_2_0', 'RTAComplete.txt'))
@pytest.mark.simple2
def test_simple2_untarBCL():
assert os.path.exists(os.path.join(test_output_path, 'cellranger-tiny-bcl-1_2_0-1', 'RTAComplete.txt'))
assert os.path.exists(os.path.join(test_output_path, 'cellranger-tiny-bcl-1_2_0-2', 'RTAComplete.txt'))
#!/usr/bin/env python3
import pytest
import pandas as pd
from io import StringIO
import os
test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
'/../output/misc/versions/run/'
@pytest.mark.simple1
def test_simple1_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.simple2
def test_simple2_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'))
Markdown is supported
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