albertyw/ajax-cache-parser

View on GitHub
.drone.yml

Summary

Maintainability
Test Coverage
kind: pipeline
type: docker
name: test

steps:
  - name: Test Node
    image: node:21
    commands:
      - npm ci
      - 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"
      - cc-test-reporter before-build
      - npm test
      - exitcode="$?"
      - cc-test-reporter after-build --exit-code "$exitcode"
    environment:
      CC_TEST_REPORTER_ID: 590e79353f1037128b9835cb8c836b64c69af4d8a301ddf4473837b10617d1d7

  - 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
    when:
      event:
        - tag