From a1f4d53d3e7898f62928ef401359273120831ec2 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Fri, 22 Jan 2021 11:16:19 -0600 Subject: [PATCH] ci: Upload logs on failures --- .github/workflows/bowtie_align.yml | 53 +++++++++++-------- .github/workflows/bowtie_index.yml | 9 ++++ .github/workflows/bwa_index.yml | 9 ++++ .github/workflows/bwa_mem.yml | 9 ++++ .github/workflows/fastqc.yml | 9 ++++ .github/workflows/gffread.yml | 9 ++++ .github/workflows/multiqc.yml | 9 ++++ .../picard_collectmultiplemetrics.yml | 9 ++++ .github/workflows/picard_markduplicates.yml | 9 ++++ .github/workflows/picard_mergesamfiles.yml | 9 ++++ .github/workflows/preseq_lcextrap.yml | 9 ++++ .github/workflows/samtools_flagstat.yml | 9 ++++ .github/workflows/samtools_idxstats.yml | 9 ++++ .github/workflows/samtools_index.yml | 9 ++++ .github/workflows/samtools_sort.yml | 9 ++++ .github/workflows/samtools_stats.yml | 9 ++++ .github/workflows/stringtie.yml | 9 ++++ .github/workflows/trimgalore.yml | 9 ++++ .github/workflows/ucsc_bedgraphtobigwig.yml | 9 ++++ 19 files changed, 193 insertions(+), 22 deletions(-) diff --git a/.github/workflows/bowtie_align.yml b/.github/workflows/bowtie_align.yml index 8b9a19fe..14222a7b 100644 --- a/.github/workflows/bowtie_align.yml +++ b/.github/workflows/bowtie_align.yml @@ -14,29 +14,38 @@ on: - tests/software/bowtie/** jobs: - ci_test: - runs-on: ubuntu-latest - strategy: - matrix: - nxf_version: [20.11.0-edge] + ci_test: + runs-on: ubuntu-latest + strategy: + matrix: + nxf_version: [20.11.0-edge] + env: + NXF_ANSI_LOG: false + steps: + - uses: actions/checkout@v2 + + - name: Install Nextflow env: - NXF_ANSI_LOG: false - steps: - - uses: actions/checkout@v2 + NXF_VER: ${{ matrix.nxf_version }} + run: | + wget -qO- get.nextflow.io | bash + sudo mv nextflow /usr/local/bin/ - - name: Install Nextflow - env: - NXF_VER: ${{ matrix.nxf_version }} - run: | - wget -qO- get.nextflow.io | bash - sudo mv nextflow /usr/local/bin/ + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.x" + - name: Install dependencies + run: python -m pip install --upgrade pip pytest-workflow - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: "3.x" - - name: Install dependencies - run: python -m pip install --upgrade pip pytest-workflow + # Test the module + - run: pytest --tag bowtie_align --symlink --wt 2 - # Test the module - - run: pytest --tag bowtie_align --symlink --wt 2 + - name: Upload logs on failure + if: ${{ failure() }} + uses: actions/upload-artifact@v2 + with: + name: logs + path: | + /tmp/pytest_workflow_*/*/log.out + /tmp/pytest_workflow_*/*/log.err diff --git a/.github/workflows/bowtie_index.yml b/.github/workflows/bowtie_index.yml index 291d04f5..4fc29026 100644 --- a/.github/workflows/bowtie_index.yml +++ b/.github/workflows/bowtie_index.yml @@ -38,3 +38,12 @@ jobs: # Test the module - run: pytest --tag bowtie_index --symlink --wt 2 + + - name: Upload logs on failure + if: ${{ failure() }} + uses: actions/upload-artifact@v2 + with: + name: logs + path: | + /tmp/pytest_workflow_*/*/log.out + /tmp/pytest_workflow_*/*/log.err diff --git a/.github/workflows/bwa_index.yml b/.github/workflows/bwa_index.yml index 06659057..5156965d 100644 --- a/.github/workflows/bwa_index.yml +++ b/.github/workflows/bwa_index.yml @@ -38,3 +38,12 @@ jobs: # Test the module - run: pytest --tag bwa_index --symlink --wt 2 + + - name: Upload logs on failure + if: ${{ failure() }} + uses: actions/upload-artifact@v2 + with: + name: logs + path: | + /tmp/pytest_workflow_*/*/log.out + /tmp/pytest_workflow_*/*/log.err diff --git a/.github/workflows/bwa_mem.yml b/.github/workflows/bwa_mem.yml index 69b737af..ba3f6609 100644 --- a/.github/workflows/bwa_mem.yml +++ b/.github/workflows/bwa_mem.yml @@ -38,3 +38,12 @@ jobs: # Test the module - run: pytest --tag bwa_index --symlink --wt 2 + + - name: Upload logs on failure + if: ${{ failure() }} + uses: actions/upload-artifact@v2 + with: + name: logs + path: | + /tmp/pytest_workflow_*/*/log.out + /tmp/pytest_workflow_*/*/log.err diff --git a/.github/workflows/fastqc.yml b/.github/workflows/fastqc.yml index 3de0b9a7..59d324ee 100644 --- a/.github/workflows/fastqc.yml +++ b/.github/workflows/fastqc.yml @@ -38,3 +38,12 @@ jobs: # Test the module - run: pytest --tag fastqc --symlink --wt 2 + + - name: Upload logs on failure + if: ${{ failure() }} + uses: actions/upload-artifact@v2 + with: + name: logs + path: | + /tmp/pytest_workflow_*/*/log.out + /tmp/pytest_workflow_*/*/log.err diff --git a/.github/workflows/gffread.yml b/.github/workflows/gffread.yml index 37312af5..3ff64058 100644 --- a/.github/workflows/gffread.yml +++ b/.github/workflows/gffread.yml @@ -38,3 +38,12 @@ jobs: # Test the module - run: pytest --tag gffread --symlink --wt 2 + + - name: Upload logs on failure + if: ${{ failure() }} + uses: actions/upload-artifact@v2 + with: + name: logs + path: | + /tmp/pytest_workflow_*/*/log.out + /tmp/pytest_workflow_*/*/log.err diff --git a/.github/workflows/multiqc.yml b/.github/workflows/multiqc.yml index ea6466ab..8de15621 100644 --- a/.github/workflows/multiqc.yml +++ b/.github/workflows/multiqc.yml @@ -38,3 +38,12 @@ jobs: # Test the module - run: pytest --tag multiqc --symlink --wt 2 + + - name: Upload logs on failure + if: ${{ failure() }} + uses: actions/upload-artifact@v2 + with: + name: logs + path: | + /tmp/pytest_workflow_*/*/log.out + /tmp/pytest_workflow_*/*/log.err diff --git a/.github/workflows/picard_collectmultiplemetrics.yml b/.github/workflows/picard_collectmultiplemetrics.yml index 37c0d5a1..ecccdf70 100644 --- a/.github/workflows/picard_collectmultiplemetrics.yml +++ b/.github/workflows/picard_collectmultiplemetrics.yml @@ -38,3 +38,12 @@ jobs: # Test the module - run: pytest --tag picard_collectmultiplemetrics --symlink --wt 2 + + - name: Upload logs on failure + if: ${{ failure() }} + uses: actions/upload-artifact@v2 + with: + name: logs + path: | + /tmp/pytest_workflow_*/*/log.out + /tmp/pytest_workflow_*/*/log.err diff --git a/.github/workflows/picard_markduplicates.yml b/.github/workflows/picard_markduplicates.yml index 9334ec1f..02b93a0c 100644 --- a/.github/workflows/picard_markduplicates.yml +++ b/.github/workflows/picard_markduplicates.yml @@ -38,3 +38,12 @@ jobs: # Test the module - run: pytest --tag picard_markduplicates --symlink --wt 2 + + - name: Upload logs on failure + if: ${{ failure() }} + uses: actions/upload-artifact@v2 + with: + name: logs + path: | + /tmp/pytest_workflow_*/*/log.out + /tmp/pytest_workflow_*/*/log.err diff --git a/.github/workflows/picard_mergesamfiles.yml b/.github/workflows/picard_mergesamfiles.yml index 1ea5e20c..6aedb733 100644 --- a/.github/workflows/picard_mergesamfiles.yml +++ b/.github/workflows/picard_mergesamfiles.yml @@ -38,3 +38,12 @@ jobs: # Test the module - run: pytest --tag picard_mergesamfiles --symlink --wt 2 + + - name: Upload logs on failure + if: ${{ failure() }} + uses: actions/upload-artifact@v2 + with: + name: logs + path: | + /tmp/pytest_workflow_*/*/log.out + /tmp/pytest_workflow_*/*/log.err diff --git a/.github/workflows/preseq_lcextrap.yml b/.github/workflows/preseq_lcextrap.yml index 33443f5e..997741e1 100644 --- a/.github/workflows/preseq_lcextrap.yml +++ b/.github/workflows/preseq_lcextrap.yml @@ -38,3 +38,12 @@ jobs: # Test the module - run: pytest --tag preseq_lcextrap --symlink --wt 2 + + - name: Upload logs on failure + if: ${{ failure() }} + uses: actions/upload-artifact@v2 + with: + name: logs + path: | + /tmp/pytest_workflow_*/*/log.out + /tmp/pytest_workflow_*/*/log.err diff --git a/.github/workflows/samtools_flagstat.yml b/.github/workflows/samtools_flagstat.yml index 441f66a1..08106404 100644 --- a/.github/workflows/samtools_flagstat.yml +++ b/.github/workflows/samtools_flagstat.yml @@ -38,3 +38,12 @@ jobs: # Test the module - run: pytest --tag samtools_flagstat --symlink --wt 2 + + - name: Upload logs on failure + if: ${{ failure() }} + uses: actions/upload-artifact@v2 + with: + name: logs + path: | + /tmp/pytest_workflow_*/*/log.out + /tmp/pytest_workflow_*/*/log.err diff --git a/.github/workflows/samtools_idxstats.yml b/.github/workflows/samtools_idxstats.yml index d2d5c49a..ab13eecf 100644 --- a/.github/workflows/samtools_idxstats.yml +++ b/.github/workflows/samtools_idxstats.yml @@ -38,3 +38,12 @@ jobs: # Test the module - run: pytest --tag samtools_idxstats --symlink --wt 2 + + - name: Upload logs on failure + if: ${{ failure() }} + uses: actions/upload-artifact@v2 + with: + name: logs + path: | + /tmp/pytest_workflow_*/*/log.out + /tmp/pytest_workflow_*/*/log.err diff --git a/.github/workflows/samtools_index.yml b/.github/workflows/samtools_index.yml index 1a3cdea5..0dcbd744 100644 --- a/.github/workflows/samtools_index.yml +++ b/.github/workflows/samtools_index.yml @@ -38,3 +38,12 @@ jobs: # Test the module - run: pytest --tag samtools_index --symlink --wt 2 + + - name: Upload logs on failure + if: ${{ failure() }} + uses: actions/upload-artifact@v2 + with: + name: logs + path: | + /tmp/pytest_workflow_*/*/log.out + /tmp/pytest_workflow_*/*/log.err diff --git a/.github/workflows/samtools_sort.yml b/.github/workflows/samtools_sort.yml index 58f1fec1..5725ab1a 100644 --- a/.github/workflows/samtools_sort.yml +++ b/.github/workflows/samtools_sort.yml @@ -38,3 +38,12 @@ jobs: # Test the module - run: pytest --tag samtools_sort --symlink --wt 2 + + - name: Upload logs on failure + if: ${{ failure() }} + uses: actions/upload-artifact@v2 + with: + name: logs + path: | + /tmp/pytest_workflow_*/*/log.out + /tmp/pytest_workflow_*/*/log.err diff --git a/.github/workflows/samtools_stats.yml b/.github/workflows/samtools_stats.yml index f28f4997..f71ef4c0 100644 --- a/.github/workflows/samtools_stats.yml +++ b/.github/workflows/samtools_stats.yml @@ -38,3 +38,12 @@ jobs: # Test the module - run: pytest --tag samtools_stats --symlink --wt 2 + + - name: Upload logs on failure + if: ${{ failure() }} + uses: actions/upload-artifact@v2 + with: + name: logs + path: | + /tmp/pytest_workflow_*/*/log.out + /tmp/pytest_workflow_*/*/log.err diff --git a/.github/workflows/stringtie.yml b/.github/workflows/stringtie.yml index f650dfae..80e9b498 100644 --- a/.github/workflows/stringtie.yml +++ b/.github/workflows/stringtie.yml @@ -38,3 +38,12 @@ jobs: # Test the module - run: pytest --tag stringtie --symlink --wt 2 + + - name: Upload logs on failure + if: ${{ failure() }} + uses: actions/upload-artifact@v2 + with: + name: logs + path: | + /tmp/pytest_workflow_*/*/log.out + /tmp/pytest_workflow_*/*/log.err diff --git a/.github/workflows/trimgalore.yml b/.github/workflows/trimgalore.yml index 8b201e38..c3192afa 100644 --- a/.github/workflows/trimgalore.yml +++ b/.github/workflows/trimgalore.yml @@ -38,3 +38,12 @@ jobs: # Test the module - run: pytest --tag trimgalore --symlink --wt 2 + + - name: Upload logs on failure + if: ${{ failure() }} + uses: actions/upload-artifact@v2 + with: + name: logs + path: | + /tmp/pytest_workflow_*/*/log.out + /tmp/pytest_workflow_*/*/log.err diff --git a/.github/workflows/ucsc_bedgraphtobigwig.yml b/.github/workflows/ucsc_bedgraphtobigwig.yml index 11772d78..8e7a9473 100644 --- a/.github/workflows/ucsc_bedgraphtobigwig.yml +++ b/.github/workflows/ucsc_bedgraphtobigwig.yml @@ -37,3 +37,12 @@ jobs: # Test the module - run: pytest --tag ucsc_bedgraphtobigwig --symlink --wt 2 + + - name: Upload logs on failure + if: ${{ failure() }} + uses: actions/upload-artifact@v2 + with: + name: logs + path: | + /tmp/pytest_workflow_*/*/log.out + /tmp/pytest_workflow_*/*/log.err