forked from nextflow-io/nextflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-ci.sh
executable file
·34 lines (30 loc) · 983 Bytes
/
test-ci.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
#
# setup env for integration tests
#
TEST_JDK=${TEST_JDK:=11}
X_BRANCH=${TRAVIS_BRANCH:-${CIRCLE_BRANCH:-'master'}}
X_PULL_REQUEST=${TRAVIS_PULL_REQUEST:-false}
## handle github variables
[[ $GITHUB_REF ]] && X_BRANCH=$(echo $GITHUB_REF | awk '{n=split($1,A,"/"); print A[n]}')
[[ $GITHUB_EVENT_NAME == pull_request ]] && X_PULL_REQUEST=true
if [[ $X_PULL_REQUEST != false ]] && [ ${TEST_JDK} -ne 11 ]; then
echo "Skipping integration tests on PR and JDK != 11"
exit 0
fi
if [[ $X_BRANCH != master && $X_BRANCH != testing ]] && [ ${TEST_JDK:=11} -ne 11 ]; then
echo "Integration tests are only executed on branch 'master' or 'testing' for JDK != 11"
exit 0
fi
export WITH_DOCKER='-with-docker'
export NXF_PLUGINS_DIR=$PWD/build/plugins
export NXF_CMD=$PWD/nextflow;
export CAPSULE_LOG=none
export TEST_JDK
export TEST_MODE
unset JAVA_TOOL_OPTIONS # this variable mess-up Capsule loader Java version parsing
(
$NXF_CMD info
cd validation
bash -x test.sh
)