ikra travisci つけてみる
2019/9/19
.yml
code:bash
language: bash
deploy:
provider: script
script: bash test/test.sh
on:
branch: master
os:
- linux
- osx
↓
<エラー>
一応passはするが、
Skipping a deployment with the script provider because this branch is not permitted:
githubのファイル名検索が役に立った。
⇒filename:.travis.yml bash
保存
code:bash
language: bash
deploy:
- provider: script
- script: bash test/test.sh
- on:
branch: master
- provider: script
- script: bash test/test.sh
- on:
branch: travisci
os:
- linux
- osx
これはダメ。
シンプルに。
code:yaml
language: bash
jobs:
include:
script: bash test/test.sh
↓
code:bash
Worker information
0.17s0.00s0.01s
system_info
Build system information
0.00s2.95s0.00s
remote: Enumerating objects: 328, done.
remote: Counting objects: 100% (328/328), done.
remote: Compressing objects: 100% (169/169), done.
remote: Total 328 (delta 180), reused 286 (delta 149), pack-reused 0
Receiving objects: 100% (328/328), 7.86 MiB | 15.62 MiB/s, done.
Resolving deltas: 100% (180/180), done.
$ cd ykohki/ikra
$ git checkout -qf 231d7204f558891bfb01a33aa38ec5c2ea1d6a39
0.01s$ bash -c 'echo $BASH_VERSION'
4.3.48(1)-release
0.01s$ bash test/test.sh
test/test.sh: line 3: cd: Illumina_SE: No such file or directory
rm: cannot remove 'salmon_*': No such file or directory
rm: cannot remove 'output.tsv': No such file or directory
bash: ../../ikra.sh: No such file or directory
test/test.sh: line 10: cd: ../Illumina_PE: No such file or directory
rm: cannot remove 'salmon_*': No such file or directory
rm: cannot remove 'output.tsv': No such file or directory
bash: ../../ikra.sh: No such file or directory
The command "bash test/test.sh" exited with 127.
Done. Your build exited with 1.
test.shのパスの問題か。
travis.ymlで実行場所を指定したい。
↓
test/test.sh: line 3: cd: Illumina_SE: No such file or directory
実行しているのは、ykohki/ikraであって、test/以下ではない。
test.shをコピーして、travis用に作成する。
修正
code:bash
cd test/Illumina_SE && bash ../../ikra.sh Illumina_SE_SRR.csv mouse --test -t 6
rm -r salmon_*
rm output.tsv
bash ../../ikra.sh Illumina_SE_fastq.csv mouse --fastq -t 6
cd ../Illumina_PE && bash ../../ikra.sh Illumina_PE_SRR.csv mouse --test -t 6
rm -r salmon_*
rm output.tsv
bash ../../ikra.sh Illumina_PE_fastq.csv mouse --fastq -t 6
language: bash
jobs:
include:
script: bash test/test_travis.sh
os:
- linux
- osx
実行
https://gyazo.com/045fb886066eb8852f971ca0fca28dba
2時間近くかかって時間切れ。。。
・timeoutについて
https://gyazo.com/676f0309aa635d34d025ad60208a8230
travisの環境
https://gyazo.com/e14cc2bcb8da62ffe6256598cdb8a8e7
code:bash
$ free -h
total used free shared buff/cache available
Mem: 7.3G 205M 6.5G 8.6M 643M 6.8G
Swap: 0B 0B 0B
並列化、高速化
code:yaml
language: bash
jobs:
include:
- stage: test_PE
script: bash test/test_travis_PE.sh
- stage: test_SE
script: bash test/test_travis_SE.sh
os:
- linux
- osx
これでは、並列のまま。
↓
code:yaml
language: bash
before_install:
- chmod +x test/test_travis_PE.sh
- chmod +x test/test_travis_SE.sh
env:
- TEST_SUITE="test/test_travis_PE.sh"
- TEST_SUITE="test/test_travis_SE.sh"
script: ./${TEST_SUITE}
os:
- linux
- osx
<エラー>
code:bash
0.00s$ ./${TEST_SUITE}
/home/travis/.travis/functions: line 109: ./test/test_travis_PE.sh: Permission denied
The command "./${TEST_SUITE}" exited with 126.
permission。
chmodをつける。
OS Xでとまる。
code:bash
******
+MULTIQC_IMAGE=maxulysse/multiqc
+TRIMGALORE_IMAGE=miasteinberg/trim-galore
+SALMON_IMAGE=combinelab/salmon:0.14.0
+RSCRIPT_TXIMPORT_IMAGE=fjukstad/tximport
+WGET_IMAGE=fjukstad/tximport
+PIGZ_IMAGE=genevera/docker-pigz
+docker pull docker/whalesay
../../ikra.sh: line 257: docker: command not found
The command "./${TEST_SUITE}" exited with 127.
dockerがない。
→参考:
どうもDockerのOS X上でのサポートがない?
↓
Linuxだけでテストにする。
code:yaml
language: bash
before_install:
- chmod +x test/test_travis_PE.sh
- chmod +x test/test_travis_SE.sh
env:
- TEST_SUITE="test/test_travis_PE.sh"
- TEST_SUITE="test/test_travis_SE.sh"
script: ./${TEST_SUITE}
os:
- linux
covarallsをつけてみる
Coverallsはプログラムのテストなどを行った時に、 どれ位の範囲が実際にテストされているか調べて表示する サービス。
登録
https://gyazo.com/4ffe52515da68514d25fc48f8c6a64fe
・Travis CIで実際にCoverallsを使う設定
REPO settings
https://gyazo.com/b26a47f179fb21cc9620e463efee899b
.coveralls.ymlを作成。
code:yaml
service_name: travis-pro
repo_token: IP3y26YQdYUUyqX7DDfLXuz4NItrBiNKI
-proが必要。
https://gyazo.com/8c046accecf4bdddb2f66ef36f0ab555