UNPKG

836 BYAMLView Raw
1kind: pipeline
2type: docker
3name: test
4
5steps:
6 - name: Test Node
7 image: node:21
8 commands:
9 - npm ci
10 - curl -L "https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-$(dpkg --print-architecture)" > "${HOME}/bin/cc-test-reporter"
11 - chmod +x "${HOME}/bin/cc-test-reporter"
12 - cc-test-reporter before-build
13 - npm test
14 - exitcode="$?"
15 - cc-test-reporter after-build --exit-code "$exitcode"
16 environment:
17 CC_TEST_REPORTER_ID: 590e79353f1037128b9835cb8c836b64c69af4d8a301ddf4473837b10617d1d7
18
19 - name: Publish Node
20 environment:
21 NPM_TOKEN:
22 from_secret: npm_token
23 image: node:21
24 commands:
25 - echo "//registry.npmjs.org/:_authToken=$${NPM_TOKEN}" > ~/.npmrc
26 - npm whoami
27 - npm publish
28 when:
29 event:
30 - tag