Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHubActions #27

Merged
merged 45 commits into from
Sep 3, 2019
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
b8a8d46
feat: Add GitHubActions
maxulysse Aug 19, 2019
9fff700
feat: add trigger on PRs as well
maxulysse Aug 20, 2019
5526828
fix: fix path to scripts
maxulysse Aug 20, 2019
09fa4bb
feat: what's in PATH?
maxulysse Aug 20, 2019
0e233ea
fix: mv nextflow to bin
maxulysse Aug 20, 2019
685a097
feat: code polishing
maxulysse Aug 20, 2019
d8c0e91
feat: reduce linting time
maxulysse Aug 20, 2019
2c4c074
feat: add --memory for script and use max 6.GB on GitHub actions
maxulysse Aug 20, 2019
f57d16c
feat: code polishing
maxulysse Aug 20, 2019
96d5476
fix: typo
maxulysse Aug 20, 2019
adde777
feat: limit only max_memory
maxulysse Aug 20, 2019
1855070
feat: use matrix
maxulysse Aug 20, 2019
b0c0d4e
remove matrix
maxulysse Aug 20, 2019
25540b4
try using actions from another public repo
maxulysse Aug 20, 2019
5728056
update CHANGELOG
maxulysse Aug 21, 2019
e0a5be6
install nextflow directly
maxulysse Aug 23, 2019
3ca98fe
try matrix
maxulysse Aug 23, 2019
d854ec0
forgot strategy
maxulysse Aug 23, 2019
7268739
reorganize matrix
maxulysse Aug 23, 2019
24f565d
fix variable call
maxulysse Aug 23, 2019
376d5a8
use export to get correct nextflow version
maxulysse Aug 23, 2019
c258cd7
add linting tests
maxulysse Aug 23, 2019
1d6538c
rm matrix for lint
maxulysse Aug 23, 2019
a232282
fix linting test
maxulysse Aug 23, 2019
2d12988
fix markdownlint run mane
maxulysse Aug 23, 2019
086e2b6
fix with node version indent
maxulysse Aug 23, 2019
4253313
rename jobs
maxulysse Aug 23, 2019
395afd1
code polish
maxulysse Aug 23, 2019
8dcfdee
code polish
maxulysse Aug 23, 2019
2643d0d
final code polish
maxulysse Aug 23, 2019
5e82a82
code polish
maxulysse Aug 23, 2019
edfb1e0
add nf-core lint
maxulysse Aug 23, 2019
eba88fe
fix indent
maxulysse Aug 23, 2019
ffa6749
add nextflow
maxulysse Aug 23, 2019
787102e
syntax fix
maxulysse Aug 23, 2019
f33e5db
remove nf-core lint
maxulysse Aug 26, 2019
25464cd
feat: add badges for GitHub Actions
maxulysse Aug 28, 2019
1ac369f
fix badges
maxulysse Aug 29, 2019
8bfe4bb
add new test
maxulysse Aug 29, 2019
b7b5637
test branch protection
maxulysse Aug 30, 2019
da147c3
test branch protection
maxulysse Aug 30, 2019
afa201e
test branch protection
maxulysse Aug 30, 2019
735c5c3
test branch protection
maxulysse Aug 30, 2019
29be14f
test branch protection
maxulysse Aug 30, 2019
790d8a1
test branch protection
maxulysse Aug 30, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: nf-core/sarek CI
# This workflow is triggered on pushes and PRs to the repository.
on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
test: [ANNOTATESNPEFF, ANNOTATEVEP, GERMLINE, SOMATIC, TARGETED]
nxf_ver: ['19.04.0', '']
steps:
- uses: actions/checkout@v1
- name: Install Nextflow
run: |
export NXF_VER=${{ matrix.nxf_ver }}
wget -qO- get.nextflow.io | bash
sudo mv nextflow /usr/local/bin/
- name: Download image
run: |
${GITHUB_WORKSPACE}/scripts/download_image.sh -n docker --test ${{ matrix.test }}
- name: Build References
run: |
${GITHUB_WORKSPACE}/scripts/build_reference.sh --test ${{ matrix.test }} --verbose --memory 6.GB
- name: Run test
run: |
${GITHUB_WORKSPACE}/scripts/run_tests.sh --test ${{ matrix.test }} --verbose --memory 6.GB
18 changes: 18 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: nf-core/sarek lint
# This workflow is triggered on pushes and PRs to the repository.
on: [push, pull_request]

jobs:
Markdown:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '10'
- name: Install markdownlint
run: |
npm install -g markdownlint-cli
- name: Run Markdownlint
run: |
markdownlint ${GITHUB_WORKSPACE} -c ${GITHUB_WORKSPACE}/.github/markdownlint.yml
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ jobs:
include:
- stage: "Linting"
name: "Markdown"
env: TEST=GERMLINE NXF_VER=19.04.0
env: TEST=LINT NXF_VER=19.04.0
script:
- markdownlint ${TRAVIS_BUILD_DIR} -c ${TRAVIS_BUILD_DIR}/.github/markdownlint.yml
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Initial release of `nf-core/sarek`, created with the [nf-core](http://nf-co.re/)
- [#20](https://github.com/nf-core/sarek/pull/20) - Add `markdownlint` config file
- [#21](https://github.com/nf-core/sarek/pull/21) - Add tests for latest Nextflow version as well
- [#21](https://github.com/nf-core/sarek/pull/21) - Add `genomes.config` for genomes without AWS iGenomes
- [#XXX](https://github.com/nf-core/sarek/pull/XXX) - Use Github actions for CI

### `Changed`

Expand Down
14 changes: 10 additions & 4 deletions scripts/build_reference.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ set -xeuo pipefail
# This script build small reference for sarek tests
# https://github.com/nf-core/test-datasets/raw/sarek

usage() { echo "Usage: $0 <-p profile> <-t test> <-v>" 1>&2; exit 1; }
usage() { echo "Usage: $0 <-p profile> <-t test> <-v> <-m memory>" 1>&2; exit 1; }

MEMORY='7.GB'
NXF_SINGULARITY_CACHEDIR=${NXF_SINGULARITY_CACHEDIR:-work/singularity/.}
OFFLINE=''
PROFILE=docker
TEST=ALL
TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-.}
TRAVIS=${TRAVIS:-false}
TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-.}
VERBOSE=''

while [[ $# -gt 0 ]]
Expand All @@ -23,6 +24,11 @@ do
shift # past argument
shift # past value
;;
-m|--memory)
MEMORY=$2
shift # past argument
shift # past value
;;
--offline)
OFFLINE="--offline"
shift # past value
Expand All @@ -44,9 +50,9 @@ do
done

# Build references for smallGRCh37
if ! [[ ANNOTATESNPEFF,ANNOTATEVEP =~ $TEST ]]
if ! [[ ANNOTATEBOTH,ANNOTATESNPEFF,ANNOTATEVEP,LINT =~ $TEST ]]
then
rm -rf references
nextflow run ${TRAVIS_BUILD_DIR}/build.nf -profile test,${PROFILE} --build --outdir references ${VERBOSE} ${OFFLINE}
nextflow run ${TRAVIS_BUILD_DIR}/build.nf -profile test,${PROFILE} --build --outdir references ${VERBOSE} ${OFFLINE} --max_memory ${MEMORY}
rm -rf .nextflow* references/pipeline_info work
fi
2 changes: 1 addition & 1 deletion scripts/download_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ then
get_image sarekvep ${VERSION}.${SOURCEGENOME} ${VERSION}.${GENOME}
fi

if ! [[ ANNOTATEBOTH,ANNOTATESNPEFF,ANNOTATEVEP,SNPEFF,VEP =~ $TEST ]]
if ! [[ ANNOTATEBOTH,ANNOTATESNPEFF,ANNOTATEVEP,LINT,SNPEFF,VEP =~ $TEST ]]
then
get_image sarek ${VERSION} ${VERSION}
fi
12 changes: 9 additions & 3 deletions scripts/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ set -xeuo pipefail
# This script run sarek tests
# https://github.com/nf-core/test-datasets/raw/sarek

usage() { echo "Usage: $0 <-p profile> <-t test> <-c cpus> <-n> <-v>" 1>&2; exit 1; }
usage() { echo "Usage: $0 <-p profile> <-t test> <-c cpus> <-n> <-v> <-m memory>" 1>&2; exit 1; }

CPUS=2
LOGS=''
REPORTS=''
MEMORY='7.GB'
NXF_SINGULARITY_CACHEDIR=${NXF_SINGULARITY_CACHEDIR:-work/singularity/.}
OFFLINE=false
PROFILE=docker
REPORTS=''
TEST=MULTIPLE
TRAVIS=${TRAVIS:-false}
TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-.}
Expand All @@ -25,6 +26,11 @@ do
CPUS=$2
shift # past value
;;
-m|--memory)
MEMORY=$2
shift # past argument
shift # past value
;;
-n|--no-logs)
LOGS=true
shift # past value
Expand Down Expand Up @@ -66,7 +72,7 @@ function manage_logs() {
}

function run_sarek() {
nextflow run ${TRAVIS_BUILD_DIR}/main.nf -profile test,${PROFILE} ${VERBOSE} --monochrome_logs ${REPORTS} $@
nextflow run ${TRAVIS_BUILD_DIR}/main.nf -profile test,${PROFILE} ${VERBOSE} --monochrome_logs ${REPORTS} --max_memory ${MEMORY} $@
}

if [[ $OFFLINE == false ]]
Expand Down