forked from jobtome-labs/ci-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-api.yml
More file actions
38 lines (34 loc) · 739 Bytes
/
test-api.yml
File metadata and controls
38 lines (34 loc) · 739 Bytes
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
test:api:
image: linuxbandit/karate-ci:v1.0.0
stage: test
script:
- |
# CHECK IF TEST FOLDER EXISTS
if [ -z "${TEST_FOLDER}" ]; then
TEST_FOLDER="tests"
fi
if [ ! -f "${TEST_FOLDER}" ]; then
echo
echo "${TEST_FOLDER} not found!"
echo
exit 1
fi
- |
# SET OPTIONS
if [ -z "${THREADS}" ]; then
THREADS="3"
fi
# TEST
java -jar /opt/karate.jar -T "${THREADS}" -o /opt/test_reports "${TEST_FOLDER}"
only:
- /^v.+$/i
- master
- merge_requests
artifacts:
name: test_reports
paths:
- /opt/test_reports
except:
variables:
- $SKIP_CI_TEST == "true"
- $CI_FAST_TRACK == "true"