From 70f9ee22e6c7917bc0b05b70dfec2171dbb77fd8 Mon Sep 17 00:00:00 2001 From: Lee Katz Date: Wed, 18 May 2022 14:40:41 -0400 Subject: [PATCH] Fix ci (#31) * using GITHUB_PATH to solve CI problems * m * m * limit tests to target branches * jellyfish now in path * m * remove -x statement * allow this workflow to work on master * trying out taxonomy validator workflow * remove kraken1 from testing on this branch * fix path to taxonomy --- .../unit-testing.Listeria.Kraken1.yml | 22 +++++++++---------- .../unit-testing.Listeria.Kraken2.yml | 4 +++- .../unit-testing.Yersinia.Kraken2.yml | 4 +++- .github/workflows/unit-testing.yml | 4 +++- .github/workflows/validateTaxonomy.yml | 7 ++++-- 5 files changed, 25 insertions(+), 16 deletions(-) diff --git a/.github/workflows/unit-testing.Listeria.Kraken1.yml b/.github/workflows/unit-testing.Listeria.Kraken1.yml index dbb06cc..26399f0 100644 --- a/.github/workflows/unit-testing.Listeria.Kraken1.yml +++ b/.github/workflows/unit-testing.Listeria.Kraken1.yml @@ -1,5 +1,7 @@ # This is a subsampling unit test to get early results -on: [push] +on: + push: + branches: [master] name: Listeria-with-Kraken1 env: @@ -34,6 +36,9 @@ jobs: run: | wget https://github.com/gmarcais/Jellyfish/releases/download/v1.1.12/jellyfish-linux -O jellyfish1 chmod -v +x jellyfish1 + ln -sv jellyfish1 jellyfish + echo $(realpath .) >> $GITHUB_PATH + tree $(realpath .) - name: install-edirect run: | sudo apt-get install ncbi-entrez-direct @@ -67,26 +72,21 @@ jobs: run: | wget https://github.com/DerrickWood/kraken/archive/refs/tags/v1.1.1.tar.gz -O kraken-v1.1.1.tar.gz tar zxvf kraken-v1.1.1.tar.gz - a_bin=$(echo "$PATH" | tr ':' "\n" | head -n 1) cd kraken-1.1.1 && bash install_kraken.sh kraken-src && cd - - cp -v kraken-1.1.1/kraken-src/* $a_bin/ + chmod -v +x kraken-1.1.1/kraken-src/* + echo $(realpath kraken-1.1.1/kraken-src) >> $GITHUB_PATH + tree $(realpath) kraken-1.1.1 - name: Kraken1 database run: | - a_bin=$(echo "$PATH" | tr ':' "\n" | head -n 1) - ls -lh $a_bin - chmod -v +x $a_bin/* - export PATH=$PATH:$HOME/bin/kraken/bin:$a_bin echo $PATH - #ln -svf jellyfish1 $a_bin/jellyfish - cp -vf jellyfish1 $a_bin/jellyfish which kraken-build mkdir -pv kraken cp -rv Kalamari/src/taxonomy kraken/taxonomy find ${{ env.OUTDIR }} -name '*.fasta' -exec kraken-build --db kraken --add-to-library {} \; tree kraken # Some super debugging here with -x - sed -i.bak 's/set -e/set -e; set -x/' $a_bin/build_kraken_db.sh - grep -v '^#' -m 20 -C 2 $a_bin/build_kraken_db.sh + #sed -i.bak 's/set -e/set -e; set -x/' $(which build_kraken_db.sh) + #grep -v '^#' -m 20 -C 2 $a_bin/build_kraken_db.sh echo ".....Building the database....." kraken-build --minimizer-len 9 --rebuild --db kraken --threads 2 --work-on-disk - name: Kraken1 query diff --git a/.github/workflows/unit-testing.Listeria.Kraken2.yml b/.github/workflows/unit-testing.Listeria.Kraken2.yml index 71535e7..8cbb823 100644 --- a/.github/workflows/unit-testing.Listeria.Kraken2.yml +++ b/.github/workflows/unit-testing.Listeria.Kraken2.yml @@ -1,5 +1,7 @@ # This is a subsampling unit test to get early results -on: [push] +on: + push: + branches: [master] name: Listeria-with-Kraken2 env: diff --git a/.github/workflows/unit-testing.Yersinia.Kraken2.yml b/.github/workflows/unit-testing.Yersinia.Kraken2.yml index a0eae51..617a814 100644 --- a/.github/workflows/unit-testing.Yersinia.Kraken2.yml +++ b/.github/workflows/unit-testing.Yersinia.Kraken2.yml @@ -1,5 +1,7 @@ # This is a subsampling unit test to get early results -on: [push] +on: + push: + branches: [master] name: Yersinia-with-Kraken2 env: diff --git a/.github/workflows/unit-testing.yml b/.github/workflows/unit-testing.yml index ba14658..e462c9d 100644 --- a/.github/workflows/unit-testing.yml +++ b/.github/workflows/unit-testing.yml @@ -1,4 +1,6 @@ -on: [push] +on: + push: + branches: [master] name: Pull-down-all-accessions jobs: diff --git a/.github/workflows/validateTaxonomy.yml b/.github/workflows/validateTaxonomy.yml index febf7d9..2f7e4db 100644 --- a/.github/workflows/validateTaxonomy.yml +++ b/.github/workflows/validateTaxonomy.yml @@ -1,4 +1,6 @@ -on: [push] +on: + push: + branches: [fix-CI, master] name: Validate taxonomy jobs: @@ -21,7 +23,8 @@ jobs: path: Kalamari - name: validate taxonomy - run: perl Kalamari/bin/validateTaxonomy.pl Kalamari/src/taxonomy + run: | + perl Kalamari/bin/validateTaxonomy.pl Kalamari/src - name: matching taxids run: | echo "Making sure that all taxids in chromosomes.tsv and plasmids.tsv are present in nodes.tsv and names.tsv"