This repository was archived by the owner on Apr 25, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy path.travis.yml
More file actions
executable file
·163 lines (148 loc) · 14 KB
/
Copy path.travis.yml
File metadata and controls
executable file
·163 lines (148 loc) · 14 KB
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
os: linux
dist: focal
group: edge
arch: amd64
virt: vm
language: node_js
node_js: node
services: docker
cache:
npm: true
branches:
except:
- documentation
env:
global:
- PATH=$HOME/.local/bin:$PATH
matrix:
#mmfiles v3.6
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=mmfiles FILES='["test/integration/lib/routes/event/log.test.js"]' NYC_OUT=mmfiles-integration-log-query-36 GREP='Path as query param'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=mmfiles FILES='["test/integration/lib/routes/event/log.test.js"]' NYC_OUT=mmfiles-integration-log-body-36 GREP='Path as body param'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=mmfiles FILES='["test/integration/lib/routes/history/show.test.js"]' NYC_OUT=mmfiles-integration-show-query-36 GREP='Path as query param'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=mmfiles FILES='["test/integration/lib/routes/history/show.test.js"]' NYC_OUT=mmfiles-integration-show-body-36 GREP='Path as body param'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=mmfiles FILES='["test/integration/lib/routes/history/traverse.test.js"]' NYC_OUT=mmfiles-integration-traverse-filters-36 GREP='with filters'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=mmfiles FILES='["test/integration/lib/routes/history/traverse.test.js"]' NYC_OUT=mmfiles-integration-traverse-nofilters-36 GREP='without filters'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=mmfiles FILES='["test/integration/lib/routes/history/kShortestPaths.test.js"]' NYC_OUT=mmfiles-integration-ksp-36
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=mmfiles FILES='["test/integration/lib/routes/document/*.js", "test/integration/lib/routes/event/diff.test.js"]' NYC_OUT=mmfiles-integration-rest-36
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=mmfiles FILES='["test/unit/lib/handlers/logHandlers.test.js"]' NYC_OUT=mmfiles-unit-handlers-log-query-36 GREP='Path as query param'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=mmfiles FILES='["test/unit/lib/handlers/logHandlers.test.js"]' NYC_OUT=mmfiles-unit-handlers-log-body-36 GREP='Path as body param'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=mmfiles FILES='["test/unit/lib/handlers/logHandlers.test.js"]' NYC_OUT=mmfiles-unit-handlers-log-provider-36 GREP='Provider'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=mmfiles FILES='["test/unit/lib/handlers/showHandlers.test.js"]' NYC_OUT=mmfiles-unit-handlers-show-query-36 GREP='Path as query param'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=mmfiles FILES='["test/unit/lib/handlers/showHandlers.test.js"]' NYC_OUT=mmfiles-unit-handlers-show-body-36 GREP='Path as body param'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=mmfiles FILES='["test/unit/lib/handlers/showHandlers.test.js"]' NYC_OUT=mmfiles-unit-handlers-show-provider-36 GREP='Provider'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=mmfiles FILES='["test/unit/lib/handlers/traverseHandlers.test.js"]' NYC_OUT=mmfiles-unit-handlers-traverse-filters-36 GREP='Handlers.*With Filters'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=mmfiles FILES='["test/unit/lib/handlers/traverseHandlers.test.js"]' NYC_OUT=mmfiles-unit-handlers-traverse-nofilters-36 GREP='Handlers.*Without Filters'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=mmfiles FILES='["test/unit/lib/handlers/traverseHandlers.test.js"]' NYC_OUT=mmfiles-unit-handlers-traverse-provider-filters-36 GREP='Provider.*With Filters'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=mmfiles FILES='["test/unit/lib/handlers/traverseHandlers.test.js"]' NYC_OUT=mmfiles-unit-handlers-traverse-provider-nofilters-36 GREP='Provider.*Without Filters'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=mmfiles FILES='["test/unit/lib/handlers/kShortestPathsHandlers.test.js"]' NYC_OUT=mmfiles-unit-handlers-ksp-36
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=mmfiles FILES='["test/unit/lib/handlers/createHandlers.test.js", "test/unit/lib/handlers/removeHandlers.test.js", "test/unit/lib/handlers/replaceHandlers.test.js", "test/unit/lib/handlers/updateHandlers.test.js", "test/unit/lib/handlers/diffHandlers.test.js"]' NYC_OUT=mmfiles-unit-handlers-rest-36
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=mmfiles FILES='["test/unit/lib/operations/log/index.test.js"]' NYC_OUT=mmfiles-unit-operations-log-36
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=mmfiles FILES='["test/unit/lib/operations/traverse/index.test.js"]' NYC_OUT=mmfiles-unit-operations-traverse-filters-36 GREP='With Filters'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=mmfiles FILES='["test/unit/lib/operations/traverse/index.test.js"]' NYC_OUT=mmfiles-unit-operations-traverse-nofilters-36 GREP='Without Filters'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=mmfiles FILES='["test/unit/lib/operations/k_shortest_paths/index.test.js"]' NYC_OUT=mmfiles-unit-operations-ksp-36
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=mmfiles FILES='["test/unit/lib/*.js", "test/unit/lib/middleware/*.js", "test/unit/lib/operations/*.js", "test/unit/lib/operations/commit/*.js", "test/unit/lib/operations/diff/*.js", "test/unit/lib/operations/show/*.js", "test/unit/lib/operations/traverse/helpers.test.js", "test/unit/lib/operations/log/helpers.test.js"]' NYC_OUT=mmfiles-unit-rest-36
#rocksdb v3.6
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=rocksdb FILES='["test/integration/lib/routes/event/log.test.js"]' NYC_OUT=rocksdb-integration-log-query-36 GREP='Path as query param'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=rocksdb FILES='["test/integration/lib/routes/event/log.test.js"]' NYC_OUT=rocksdb-integration-log-body-36 GREP='Path as body param'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=rocksdb FILES='["test/integration/lib/routes/history/show.test.js"]' NYC_OUT=rocksdb-integration-show-query-36 GREP='Path as query param'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=rocksdb FILES='["test/integration/lib/routes/history/show.test.js"]' NYC_OUT=rocksdb-integration-show-body-36 GREP='Path as body param'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=rocksdb FILES='["test/integration/lib/routes/history/traverse.test.js"]' NYC_OUT=rocksdb-integration-traverse-filters-36 GREP='with filters'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=rocksdb FILES='["test/integration/lib/routes/history/traverse.test.js"]' NYC_OUT=rocksdb-integration-traverse-nofilters-36 GREP='without filters'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=rocksdb FILES='["test/integration/lib/routes/history/kShortestPaths.test.js"]' NYC_OUT=rocksdb-integration-ksp-36
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=rocksdb FILES='["test/integration/lib/routes/document/*.js", "test/integration/lib/routes/event/diff.test.js"]' NYC_OUT=rocksdb-integration-rest-36
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=rocksdb FILES='["test/unit/lib/handlers/logHandlers.test.js"]' NYC_OUT=rocksdb-unit-handlers-log-query-36 GREP='Path as query param'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=rocksdb FILES='["test/unit/lib/handlers/logHandlers.test.js"]' NYC_OUT=rocksdb-unit-handlers-log-body-36 GREP='Path as body param'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=rocksdb FILES='["test/unit/lib/handlers/logHandlers.test.js"]' NYC_OUT=rocksdb-unit-handlers-log-provider-36 GREP='Provider'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=rocksdb FILES='["test/unit/lib/handlers/showHandlers.test.js"]' NYC_OUT=rocksdb-unit-handlers-show-query-36 GREP='Path as query param'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=rocksdb FILES='["test/unit/lib/handlers/showHandlers.test.js"]' NYC_OUT=rocksdb-unit-handlers-show-body-36 GREP='Path as body param'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=rocksdb FILES='["test/unit/lib/handlers/showHandlers.test.js"]' NYC_OUT=rocksdb-unit-handlers-show-provider-36 GREP='Provider'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=rocksdb FILES='["test/unit/lib/handlers/traverseHandlers.test.js"]' NYC_OUT=rocksdb-unit-handlers-traverse-filters-36 GREP='Handlers.*With Filters'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=rocksdb FILES='["test/unit/lib/handlers/traverseHandlers.test.js"]' NYC_OUT=rocksdb-unit-handlers-traverse-nofilters-36 GREP='Handlers.*Without Filters'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=rocksdb FILES='["test/unit/lib/handlers/traverseHandlers.test.js"]' NYC_OUT=rocksdb-unit-handlers-traverse-provider-filters-36 GREP='Provider.*With Filters'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=rocksdb FILES='["test/unit/lib/handlers/traverseHandlers.test.js"]' NYC_OUT=rocksdb-unit-handlers-traverse-provider-nofilters-36 GREP='Provider.*Without Filters'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=rocksdb FILES='["test/unit/lib/handlers/kShortestPathsHandlers.test.js"]' NYC_OUT=rocksdb-unit-handlers-ksp-36
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=rocksdb FILES='["test/unit/lib/handlers/createHandlers.test.js", "test/unit/lib/handlers/removeHandlers.test.js", "test/unit/lib/handlers/replaceHandlers.test.js", "test/unit/lib/handlers/updateHandlers.test.js", "test/unit/lib/handlers/diffHandlers.test.js"]' NYC_OUT=rocksdb-unit-handlers-rest-36
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=rocksdb FILES='["test/unit/lib/operations/log/index.test.js"]' NYC_OUT=rocksdb-unit-operations-log-36
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=rocksdb FILES='["test/unit/lib/operations/traverse/index.test.js"]' NYC_OUT=rocksdb-unit-operations-traverse-filters-36 GREP='With Filters'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=rocksdb FILES='["test/unit/lib/operations/traverse/index.test.js"]' NYC_OUT=rocksdb-unit-operations-traverse-nofilters-36 GREP='Without Filters'
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=rocksdb FILES='["test/unit/lib/operations/k_shortest_paths/index.test.js"]' NYC_OUT=rocksdb-unit-operations-ksp-36
- ARANGODB_VERSION=3.6-nightly ARANGO_STORAGE_ENGINE=rocksdb FILES='["test/unit/lib/*.js", "test/unit/lib/middleware/*.js", "test/unit/lib/operations/*.js", "test/unit/lib/operations/commit/*.js", "test/unit/lib/operations/diff/*.js", "test/unit/lib/operations/show/*.js", "test/unit/lib/operations/traverse/helpers.test.js", "test/unit/lib/operations/log/helpers.test.js"]' NYC_OUT=rocksdb-unit-rest-36
install:
- npm install
- pip install --user awscli
- sudo apt update
- sudo apt install dos2unix
before_script:
- aws configure set aws_access_key_id "$AWS_ACCESS_KEY"
- aws configure set aws_secret_access_key "$AWS_SECRET_KEY"
- aws configure set region us-east-1
- rm -rf ./.nyc_output/*
- npx nyc instrument . ./.nyc_output/instrumented
- cp -r ./.nyc_output/instrumented/lib .
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin || login_failed=1
- docker pull arangodb/arangodb-preview:$ARANGODB_VERSION
- docker run
-e ARANGO_RANDOM_ROOT_PASSWORD=1
-e ARANGO_STORAGE_ENGINE=$ARANGO_STORAGE_ENGINE
-e FILES="$FILES"
-e NYC_OUT=$NYC_OUT
-e GREP="$GREP"
-e TRAVIS_JOB_NUMBER="$TRAVIS_JOB_NUMBER"
-v "$PWD":/mnt/evstore
-d --name arangodb arangodb/arangodb-preview:$ARANGODB_VERSION
- export ARANGO_ROOT_PASSWORD=$(docker logs arangodb |grep 'GENERATED ROOT PASSWORD' |awk '{ print $4 }')
- sleep 60
- docker exec -i arangodb arangosh --server.password=$ARANGO_ROOT_PASSWORD < ./test/travis/create_db.js
- docker exec arangodb /bin/sh -c 'dos2unix < /mnt/evstore/test/travis/install.sh |sh -s'
script: dos2unix < ./test/travis/travis-runner.sh |bash -s
after_script:
- aws s3 sync ./test/reports/ s3://$TRAVIS_S3_BUCKET/$TRAVIS_BUILD_NUMBER/
- echo "Copied test reports to s3://$TRAVIS_S3_BUCKET/$TRAVIS_BUILD_NUMBER"
after_success:
- rm -rf ./.nyc_output/instrumented
- aws s3 sync ./.nyc_output/ s3://$TRAVIS_S3_BUCKET/$TRAVIS_BUILD_NUMBER/
- echo "Copied coverage data to s3://$TRAVIS_S3_BUCKET/$TRAVIS_BUILD_NUMBER"
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/5494f36ca00014f3e79d
on_success: always # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: always
jobs:
fast_finish: true
allow_failures:
- env: ARANGODB_VERSION=latest
- env: ARANGODB_VERSION=3.6-nightly
include:
- stage: analysis
git:
depth: false
addons:
sonarcloud:
organization: "adityamukho-github"
install:
- npm install
- pip install --user awscli
before_script:
- aws configure set aws_access_key_id "$AWS_ACCESS_KEY"
- aws configure set aws_secret_access_key "$AWS_SECRET_KEY"
- aws configure set region us-east-1
- aws s3 sync s3://$TRAVIS_S3_BUCKET/$TRAVIS_BUILD_NUMBER/ ./.nyc_output/ --exclude '*' --include 'coverage*.json'
- echo 'Found following files in ./.nyc_output/:'
- ls -l ./.nyc_output
- npx nyc merge ./.nyc_output ./.nyc_output/out.json
- npx nyc report --report-dir=./test/reports -r lcovonly
- npx eslint ./main.js ./lib/ ./scripts
-f json
-o ./test/reports/eslint-report.json
script:
- npx nyc check-coverage --lines 80 --functions 80 --branches 70
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ] || [ "$TRAVIS_PULL_REQUEST_SLUG" = "$TRAVIS_REPO_SLUG" ]; then
sonar-scanner;
fi'
after_script:
- aws s3 sync ./test/reports/ s3://$TRAVIS_S3_BUCKET/$TRAVIS_BUILD_NUMBER/
- echo "Copied coverage and lint reports to s3://$TRAVIS_S3_BUCKET/$TRAVIS_BUILD_NUMBER"
- aws s3 cp ./.nyc_output/out.json s3://$TRAVIS_S3_BUCKET/$TRAVIS_BUILD_NUMBER/
- echo "Copied merged coverage data to s3://$TRAVIS_S3_BUCKET/$TRAVIS_BUILD_NUMBER"