Current File : //usr/lib/node_modules/pm2/node_modules/@pm2/agent/.drone.yml |
pipeline:
build:
image: node:${NODE_VERSION}
environment:
- NODE_ENV=test
- PM2_HOME=/tmp
commands:
- node -v
- yarn -v
- uname -r
- yarn install 2> /dev/null
- export PATH=$PATH:./node_modules/.bin/
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
- cov8 clear
- cov8 mocha test/units/InteractorClient.mocha.js
- cov8 mocha test/units/InteractorDaemon.mocha.js
- cov8 mocha test/units/PM2Client.mocha.js
- cov8 mocha test/units/Utility/stacktrace.mocha.js
- cov8 mocha test/units/Utility/cache.mocha.js
- cov8 mocha test/units/WatchDog.mocha.js
- cov8 mocha test/units/push/PushInteractor.mocha.js
- cov8 mocha test/units/push/TransactionAggregator.mocha.js
- cov8 mocha test/units/reverse/ReverseInteractor.mocha.js
# - cov8 mocha test/units/transporters/AxonTransport.mocha.js
- cov8 mocha test/units/transporters/WebsocketTransport.mocha.js
- cov8 mocha test/units/TransporterInterface.mocha.js
- cov8 mocha test/units/PM2Interface.mocha.js
- cov8 mocha test/integrations/websocket.mocha.js
- cov8 mocha test/integrations/axon.mocha.js
- cov8 report lcov
- ./cc-test-reporter after-build --exit-code 0 || echo “Skipping CC coverage upload” or upload-coverage || echo “Skipping CC coverage upload”
secrets: [ cc_test_reporter_id ]
when:
event: push
slack:
image: plugins/slack
channel: dev-stream-ci
status: [ success, failure ]
template: |
{{#success build.status}}
{{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}}
{{else}}
{{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}}
{{/success}}
see {{ build.link }}
secrets: [ slack_webhook ]
when:
event: push
publish_npm:
image: plugins/npm
secrets: [ npm_username, npm_password, npm_email ]
when:
event: [ tag ]
matrix:
NODE_VERSION:
- 4
- 6
- 7
- 8
- 9
- 10