@wral/resource-deref
Version:
A Library for dereferencing $ref references in Javascript objects
56 lines (52 loc) • 1.2 kB
YAML
image: node:18-alpine
definitions:
caches:
npm: $HOME/.npm
steps:
- step:
name: Check code syntax
caches:
- npm
- node
script:
- npm ci
- npm run lint
- step:
name: Run tests
caches:
- npm
- node
script:
- npm ci
- npm run test -- --coverage --coverageReporters=json-summary
artifacts:
- coverage/**
- step: &publish-npm
name: Publish to NPM
script:
# add "--tag $BITBUCKET_TAG" if not a semver
- |
if [[ $BITBUCKET_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
npm publish
else
npm publish --tag $BITBUCKET_TAG
fi
- step:
name: Testify to the Witness
script:
- pipe: docker://public.ecr.aws/cbcrnd/pipe-witness-testify
pipelines:
default:
- parallel:
- step:
- step:
- step:
tags:
'*':
- parallel:
fail-fast: true
steps:
- step:
- step:
- step: *publish-npm