Skip to content
Snippets Groups Projects
Commit b247d7e4 authored by Gervaise Henry's avatar Gervaise Henry :cowboy:
Browse files

Move expected assigned into ci.yml #27

parent 3f55fde3
Branches
Tags
2 merge requests!37v0.0.1,!35Ci
Pipeline #7756 failed with stages
in 3 hours, 24 minutes, and 43 seconds
......@@ -133,13 +133,13 @@ integration_se:
- hostname
- ulimit -a
- nextflow -q run ./workflow/rna-seq.nf --deriva ./test_data/auth/credential.json --bdbag ./test_data/auth/cookies.txt --repRID 16-1ZX4 -with-dag dag.png --ci true
- find . -type f -name "multiqc_data.json" -exec cp {} ./16-1ZX4_multiqc_data.json \;
- find . -type f -name "multiqc_data.json" -exec cp {} ./SE_multiqc_data.json \;
artifacts:
name: "$CI_JOB_NAME"
when: always
paths:
- output/qc/
- 16-1ZX4_multiqc_data.json
- SE_multiqc_data.json
expire_in: 7 days
integration_pe:
......@@ -148,21 +148,34 @@ integration_pe:
- hostname
- ulimit -a
- nextflow -q run ./workflow/rna-seq.nf --deriva ./test_data/auth/credential.json --bdbag ./test_data/auth/cookies.txt --repRID Q-Y5JA -with-dag dag.png --ci true
- find . -type f -name "multiqc_data.json" -exec cp {} ./Q-Y5JA_multiqc_data.json \;
- find . -type f -name "multiqc_data.json" -exec cp {} ./PE_multiqc_data.json \;
artifacts:
name: "$CI_JOB_NAME"
when: always
paths:
- dag.png
- output/qc/
- Q-Y5JA_multiqc_data.json
- PE_multiqc_data.json
expire_in: 7 days
consistency:
stage: consistency
script:
- grep -m 1 \"Assigned\":.[0-9] 16-1ZX4_multiqc_data.json | grep -oe '\([0-9.]*\)' > assignedSE.txt
- grep -m 1 \"Assigned\":.[0-9] Q-Y5JA_multiqc_data.json | grep -oe '\([0-9.]*\)' > assignedPE.txt
- grep -m 1 \"Assigned\":.[0-9] SE_multiqc_data.json | grep -oe '\([0-9.]*\)' > assignedSE.txt
- grep -m 1 \"Assigned\":.[0-9] PE_multiqc_data.json | grep -oe '\([0-9.]*\)' > assignedPE.txt
- echo 7742416 > assignedExpectSE.txt
- echo 2599149 > assignedExpectPE.txt
- pytest -m consistencySE
- pytest -m consistencyPE
artifacts:
name: "$CI_JOB_NAME"
when: always
paths:
- SE_multiqc_data.json
- PE_multiqc_data.json
- assignedSE.txt
- assignedPE.txt
- assignedExpectSE.txt
- assignedExpectPE.txt
expire_in: 7 days
......@@ -7,26 +7,24 @@ import os
test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
'/../../'
test_sampleSE = '16-1ZX4'
test_assignededSE = '7742416'
test_samplePE = 'Q-Y5JA'
test_assignedPE = '2599149'
@pytest.mark.consistencySE
def test_consistencySE():
assert os.path.exists(os.path.join(test_output_path, test_sampleSE, '_multiqc_data.json'))
assert readAssigned("assignedSE.txt",test_assignedSE)
assert os.path.exists(os.path.join(test_output_path, 'SE_multiqc_data.json'))
assert readAssigned("assignedSE.txt","assignedExpectSE.txt")
@pytest.mark.consistencyPE
def test_consistencyPE():
assert os.path.exists(os.path.join(test_output_path, test_samplePE, '_multiqc_data.json'))
assert readAssigned("assignedPE.txt",test_assignedPE)
assert os.path.exists(os.path.join(test_output_path, 'PE_multiqc_data.json'))
assert readAssigned("assignedPE.txt","assignedExpectPE.txt")
def readAssgned(assignedFile,assigned):
def readAssgned(fileAssigned,fileExpectAssigned):
data = False
file = open(assignedFile, "r")
line = file.readline()
if line.strip() == assigned:
assigned = open(fileAssigned, "r")
expect = open(fileExpectAssigned, "r")
lineAssigned = assigned.readline()
lineExpect = expect.readline()
if lineAssigned.strip() == lineExpect.strip():
data = True
return data
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