-
Notifications
You must be signed in to change notification settings - Fork 683
/
Copy pathtest.sh
executable file
·125 lines (110 loc) · 2.47 KB
/
test.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#!/bin/bash
set -e
get_abs_filename() {
echo "$(cd "$(dirname "$1")" && pwd)/$(basename "$1")"
}
export NXF_IGNORE_WARN_DSL2=true
export NXF_CMD=${NXF_CMD:-$(get_abs_filename ../launch.sh)}
# disable ansi log to make log more readable
export NXF_ANSI_LOG=false
export NXF_DISABLE_CHECK_LATEST=true
test_integration() {
(
cd "$1"
sudo bash cleanup.sh
cd checks
bash run.sh
)
}
test_e2e() {
if [[ $TEST_SMOKE == true ]]; then
echo Skipping tests since TEST_SMOKE flag is true
exit 0
fi
#
# Hello
#
git clone https://github.com/nextflow-io/hello
(
cd hello
$NXF_CMD run .
$NXF_CMD run . -resume
)
#
# RNASEQ-NF
#
echo nextflow-io/rnaseq-nf
[[ $TOWER_ACCESS_TOKEN ]] && OPTS='-with-tower' || OPTS=''
$NXF_CMD run nextflow-io/rnaseq-nf -with-docker $OPTS
$NXF_CMD run nextflow-io/rnaseq-nf -with-docker $OPTS -resume
}
#
# Integration tests
#
if [[ $TEST_MODE == 'test_integration' ]]; then
test_integration ../tests/
test_integration ../tests-v1/
test_e2e
fi
#
# Integration tests (strict syntax)
#
if [[ $TEST_MODE == 'test_parser_v2' ]]; then
export NXF_SYNTAX_PARSER=v2
test_integration ../tests/
test_e2e
fi
#
# Documentation tests
#
if [[ $TEST_MODE == 'test_docs' ]]; then
(
echo "Documentation tests"
cd ../docs/snippets/
bash test.sh
)
fi
#
# AWS Batch tests
#
if [[ $TEST_MODE == 'test_aws' ]]; then
if [ "$AWS_ACCESS_KEY_ID" ]; then
echo "AWS batch tests"
bash awsbatch.sh
else
echo "::warning file=$0,line=$LINENO::Missing AWS_ACCESS_KEY_ID variable -- Skipping AWS Batch tests"
fi
fi
#
# Azure Batch tests
#
if [[ $TEST_MODE == 'test_azure' ]]; then
if [ "$AZURE_BATCH_ACCOUNT_KEY" ]; then
echo "Azure batch tests"
bash azure.sh
else
echo "::warning file=$0,line=$LINENO::Missing AZURE_BATCH_ACCOUNT_KEY variable -- Skipping Azure Batch tests"
fi
fi
#
# Google Batch
#
if [[ $TEST_MODE == 'test_google' ]]; then
if [ "$GOOGLE_SECRET" ]; then
echo "Google Batch tests"
bash google.sh
else
echo "::warning file=$0,line=$LINENO::Missing GOOGLE_SECRET variable -- Skipping Google Batch tests"
fi
fi
#
# Wave
#
if [[ $TEST_MODE == 'test_wave' ]]; then
if [ "$TOWER_ACCESS_TOKEN" ]; then
echo "Wave tests"
bash wave.sh
else
echo "::warning file=$0,line=$LINENO::Missing TOWER_ACCESS_TOKEN variable -- Skipping Wave tests"
fi
fi