g-axis
Version:
Module for rendering axes FT-style
103 lines (92 loc) • 2.76 kB
YAML
### FT IG tag-based npm publishing workflow v1
version: 2
references:
default_container_config:
docker:
- image: node:8
attach_workspace:
attach_workspace:
at: ~/project
npm_cache_key:
v1-dependency-npm-{{ checksum "package-lock.json" }}
restore_node_modules:
restore_cache:
keys:
-
- v1-dependency-npm-
cache_node_modules:
save_cache:
key:
paths:
- ./node_modules/
only_version_tags:
tags:
only: /^v.*$/
jobs:
install:
<<:
steps:
- checkout
- run:
name: Upgrade npm
command: npm i -g npm
-
- run:
name: Install dependencies
command: npm ci
-
- persist_to_workspace:
root: .
paths:
- .
test:
<<:
steps:
-
- run:
name: Update container to support Puppeteer
command: |
apt-get update && apt-get install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \
libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \
libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 \
libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \
ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
- run:
name: Run linting
command: npm run lint
- run:
name: Run tests
command: npm test
- run:
name: Run coverage
command: npm run report-coverage
release_npm:
<<:
steps:
-
- run:
name: Setup npm credentials
command: echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > ${HOME}/.npmrc
- run:
name: Publish npm package
command: ./node_modules/.bin/npm-prepublish --verbose && npm publish --access public
workflows:
version: 2
build-and-release:
jobs:
- install:
filters:
<<:
- test:
requires:
- install
filters:
<<:
- release_npm:
requires:
- install
- test
filters:
<<:
branches:
ignore: /.*/