1 | pipeline:
|
2 | build:
|
3 | image: node:${NODE_VERSION}
|
4 | environment:
|
5 | - NODE_ENV=test
|
6 | - PM2_HOME=/tmp
|
7 | commands:
|
8 | - node -v
|
9 | - yarn -v
|
10 | - uname -r
|
11 | - yarn install 2> /dev/null
|
12 | - export PATH=$PATH:./node_modules/.bin/
|
13 | - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
14 | - chmod +x ./cc-test-reporter
|
15 | - ./cc-test-reporter before-build
|
16 | - cov8 clear
|
17 | - cov8 mocha test/units/InteractorClient.mocha.js
|
18 | - cov8 mocha test/units/InteractorDaemon.mocha.js
|
19 | - cov8 mocha test/units/PM2Client.mocha.js
|
20 | - cov8 mocha test/units/Utility/stacktrace.mocha.js
|
21 | - cov8 mocha test/units/Utility/cache.mocha.js
|
22 | - cov8 mocha test/units/WatchDog.mocha.js
|
23 | - cov8 mocha test/units/push/PushInteractor.mocha.js
|
24 | - cov8 mocha test/units/push/TransactionAggregator.mocha.js
|
25 | - cov8 mocha test/units/reverse/ReverseInteractor.mocha.js
|
26 | # - cov8 mocha test/units/transporters/AxonTransport.mocha.js
|
27 | - cov8 mocha test/units/transporters/WebsocketTransport.mocha.js
|
28 | - cov8 mocha test/units/TransporterInterface.mocha.js
|
29 | - cov8 mocha test/units/PM2Interface.mocha.js
|
30 | - cov8 mocha test/integrations/websocket.mocha.js
|
31 | - cov8 mocha test/integrations/axon.mocha.js
|
32 | - cov8 report lcov
|
33 | - ./cc-test-reporter after-build --exit-code 0 || echo “Skipping CC coverage upload” or upload-coverage || echo “Skipping CC coverage upload”
|
34 | secrets: [ cc_test_reporter_id ]
|
35 | when:
|
36 | event: push
|
37 | slack:
|
38 | image: plugins/slack
|
39 | channel: ci
|
40 | status: [ success, failure ]
|
41 | template: |
|
42 | {{#success build.status}}
|
43 | {{repo.name}} : {{build.event}} with commit {{truncate build.commit 8}} on branch "{{build.branch}}" with node:${NODE_VERSION} done by {{build.author}} succeeded in {{since build.started}}
|
44 | {{else}}
|
45 | {{repo.name}} : {{build.event}} with commit {{truncate build.commit 8}} on branch "{{build.branch}}" with node:${NODE_VERSION} done by {{build.author}} failed in {{since build.started}}
|
46 | {{/success}}
|
47 | see {{ build.link }}
|
48 | secrets: [ slack_webhook ]
|
49 | when:
|
50 | event: push
|
51 | publish_npm:
|
52 | image: plugins/npm
|
53 | secrets: [ npm_username, npm_password, npm_email ]
|
54 | when:
|
55 | event: [ tag ]
|
56 | matrix:
|
57 | NODE_VERSION:
|
58 | - 4
|
59 | - 6
|
60 | - 7
|
61 | - 8
|
62 | - 9
|
63 | - 10
|