Merge pull request #49 from ewels/fix-actions

Fix a bunch of stuff in GitHub Actions test workflows
This commit is contained in:
Phil Ewels 2020-07-17 16:00:23 +02:00 committed by GitHub
commit c2aef67408
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 69 additions and 47 deletions

View file

@ -1,8 +1,15 @@
name: cutadapt
on:
push: {}
push:
paths:
- software/cutadapt/**
- .github/workflows/cutadapt.yml
- tests
pull_request:
paths: software/cutadapt/*
paths:
- software/cutadapt/**
- .github/workflows/cutadapt.yml
- tests
jobs:
run_ci_test:
@ -12,13 +19,6 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Install Nextflow
run: |
wget -qO- get.nextflow.io | bash

View file

@ -14,7 +14,7 @@ jobs:
steps:
# Check out the repo
- uses: actions/checkout@v1
- uses: actions/checkout@v2
# Find the tool wrappers that changed
# Annoyingly, matrix can't take dynamic variables

View file

@ -1,9 +1,15 @@
name: FastQC
on:
push:
paths: software/fastqc/**
paths:
- software/fastqc/**
- .github/workflows/fastqc.yml
- tests
pull_request:
paths: software/fastqc/**
paths:
- software/fastqc/**
- .github/workflows/fastqc.yml
- tests
jobs:
run_ci_test:
@ -12,12 +18,11 @@ jobs:
NXF_ANSI_LOG: false
steps:
# Check out the repository
- uses: actions/checkout@v1
submodules: true
- uses: actions/checkout@v2
- name: Install Nextflow
run: |
export NXF_VER="20.06.0-edge"
wget -qO- get.nextflow.io | bash
sudo mv nextflow /usr/local/bin/

View file

@ -36,7 +36,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v1
uses: actions/checkout@v2
- name: Install NodeJS
uses: actions/setup-node@v1

View file

@ -1,8 +1,15 @@
name: samtools index
on:
push: {}
push:
paths:
- software/samtools/index/**
- .github/workflows/samtools_index.yml
- tests
pull_request:
paths: software/samtools/index*
paths:
- software/samtools/index/**
- .github/workflows/samtools_index.yml
- tests
jobs:
run_ci_test:
@ -11,9 +18,7 @@ jobs:
NXF_ANSI_LOG: false
steps:
# Check out the repository
- uses: actions/checkout@v1
submodules: true
- uses: actions/checkout@v2
- name: Install Nextflow
run: |

View file

@ -1,8 +1,15 @@
name: samtools sort
on:
push: {}
push:
paths:
- software/samtools/sort**
- .github/workflows/samtools_sort.yml
- tests
pull_request:
paths: software/samtools/sort*
paths:
- software/samtools/sort**
- .github/workflows/samtools_sort.yml
- tests
jobs:
run_ci_test:
@ -11,9 +18,7 @@ jobs:
NXF_ANSI_LOG: false
steps:
# Check out the repository
- uses: actions/checkout@v1
submodules: true
- uses: actions/checkout@v2
- name: Install Nextflow
run: |

View file

@ -1,8 +1,15 @@
name: tcoffee
on:
push: {}
push:
paths:
- software/tcoffee/**
- .github/workflows/tcoffee.yml
- tests
pull_request:
paths: software/tcoffee/*
paths:
- software/tcoffee/**
- .github/workflows/tcoffee.yml
- tests
jobs:
run_ci_test:
@ -11,14 +18,7 @@ jobs:
NXF_ANSI_LOG: false
steps:
# Check out the repository
- uses: actions/checkout@v2
- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Install Nextflow
run: |

View file

@ -1,8 +1,15 @@
name: Trim Galore!
on:
push: {}
push:
paths:
- software/trim_galore/**
- .github/workflows/trim_galore.yml
- tests
pull_request:
paths: software/trim_galore/*
paths:
- software/trim_galore/**
- .github/workflows/trim_galore.yml
- tests
jobs:
run_ci_test:
@ -11,9 +18,7 @@ jobs:
NXF_ANSI_LOG: false
steps:
# Check out the repository
- uses: actions/checkout@v1
submodules: true
- uses: actions/checkout@v2
- name: Install Nextflow
run: |

View file

@ -46,24 +46,26 @@ private static String getFileChecksum(MessageDigest digest, File file) throws IO
* Test if FASTQC runs with single-end data
*/
workflow test_single_end {
input_files = Channel.fromPath("input/test_single_end.fastq.gz")
.map {f -> [f.baseName, true, f]}
input_files = Channel.fromPath("${baseDir}/input/test_single_end.fastq.gz")
.map {f -> [f.name.replace(".fastq.gz", ""), true, f]}
FASTQC(input_files)
// test that the output looks as expected
FASTQC.out.html.map { name, is_single_end, html_file ->
html_hash = getFileChecksum(MessageDigest.getInstance("MD5"), new File("${html_file}"));
assert name == "test_single_end.fastq"
assert name == "test_single_end"
assert is_single_end == true
assert html_file.getName() == "test_single_end.fastq_fastqc.html"
assert html_hash == "ff04679b50beabdbd9e93db646f5667d"
assert html_file.getName() == "test_single_end_fastqc.html"
// Hash seems to vary between local runs and GitHub Actions
// TODO: Might be solved when using Docker for tests?
// assert html_hash == "8ed68442ebb5b9706bf79b4f66701e15"
}
FASTQC.out.zip.map { name, is_single_end, zip_file ->
// NOTE: output zip files do not have a consistent hash
assert name == "test_single_end.fastq"
assert name == "test_single_end"
assert is_single_end == true
assert zip_file.getName() == "test_single_end.fastq_fastqc.zip"
assert zip_file.getName() == "test_single_end_fastqc.zip"
}
}