-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
58 lines (54 loc) · 2.07 KB
/
.gitlab-ci.yml
File metadata and controls
58 lines (54 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# use a debian-based image.
image: ubuntu:bionic
before_script:
- apt update && apt -y install g++ make autoconf automake
libtool gnulib gengetopt zlib1g-dev libboost-dev libboost-filesystem-dev
libboost-system-dev libboost-iostreams-dev libboost-test-dev
libbamtools-dev
build:
stage: build
script:
- autoreconf -fi
- ./configure --enable-tests --prefix="$(pwd)/install-${CI_COMMIT_SHORT_SHA}"
- make -j
- make install
- cd tests; make check -j;
artifacts:
paths:
- install-${CI_COMMIT_SHORT_SHA}/bin/idemuxCPP
- install-${CI_COMMIT_SHORT_SHA}/share/idemuxcpp/
unit-tests:
stage: test
needs: ["build"]
script:
- printf "================\n Run Unit Tests \n================\n"
- apt update && apt install -y lcov
- autoreconf -fi
- ./configure --enable-code-coverage
- make check-code-coverage -j
coverage:
'/^\s*lines\.*\:\s*(\d*\.?\d*\%)/'
# run integration tests
test_integration:
stage: test
needs: ["build"]
script:
- export INSTALL_DIR="$(pwd)/install-${CI_COMMIT_SHORT_SHA}"
- tmpread1=`mktemp`
- echo -e "@header1 :AAAAACGGCAGG+AAAAGTTATTCT\nAAAAGTTATTCT\n+\nEEEEEEEEEEEE\n"\
"@header2 :AAAACATGCGTT+AAACAAGTCCGA\nAAACAAGTCCGA\n+\nEEEEEEEEEEEE\n"\
"@header3 :AAAATCCCAGTT+AAACCTTTTGAA\nAAACCTTTTGAA\n+\nEEEEEEEEEEEE\n"\
"@header4 :AAAAAAAAAAAA+AAAAAAAAAAAA\nAAAAAAAAAAAA\n+\nEEEEEEEEEEEE"\
| gzip - > ${tmpread1}.fastq.gz
- tmpsdf=`mktemp`
- echo -e "sample_name,i7,i5,i1\n"\
"1,AAAAACGGCAGG,AAAAGTTATTCT,\n"\
"2,AAAACATGCGTT,AAACAAGTCCGA,\n"\
"3,AAAATCCCAGTT,AAACCTTTTGAA,"\
> ${tmpsdf}
- tmpoutput=`mktemp -d`
- ${INSTALL_DIR}/bin/idemuxCPP -1 ${tmpread1}.fastq.gz -s ${tmpsdf} -o ${tmpoutput} -m "${INSTALL_DIR}/share/idemuxcpp/barcodes/"
- cat ${tmpoutput}/demultipexing_stats.tsv | sort > ${tmpoutput}/a.txt
- echo -e "1\t1\n2\t1\n3\t1\nsample_name\twritten_reads\nundetermined\t1" > ${tmpoutput}/b.txt
- diff ${tmpoutput/}/a.txt ${tmpoutput}/b.txt
- echo $?