.drone.yml
kind: pipeline
type: docker
name: test
steps:
- name: Test Node
image: satantime/puppeteer-node:21-bookworm-slim
commands:
- apt-get update && apt-get install -y zip
- npm ci
- npm run package
- curl -L "https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-$(dpkg --print-architecture)" > "${HOME}/bin/cc-test-reporter" && chmod +x "${HOME}/bin/cc-test-reporter"
- chmod +x "${HOME}/bin/cc-test-reporter"
- cc-test-reporter before-build
- npm test
- exitcode="$?"
- cc-test-reporter after-build --exit-code "$exitcode"
environment:
CC_TEST_REPORTER_ID: 272eecf2546da3d8959201092992794402b86f42235d3e1b489a2a5c67e23ad4
- name: Publish Node
environment:
NPM_TOKEN:
from_secret: npm_token
image: node:21
commands:
- echo "//registry.npmjs.org/:_authToken=$${NPM_TOKEN}" > ~/.npmrc
- npm whoami
- npm publish
depends_on:
- Test Node
when:
event:
- tag