Nuxt/.circleci/config.yml

40 lines
976 B
YAML
Raw Normal View History

2017-10-28 21:31:01 +00:00
version: 2
jobs:
build:
working_directory: /usr/src/app
docker:
2017-10-29 20:30:54 +00:00
- image: banian/node-headless-chrome
2017-10-28 21:31:01 +00:00
steps:
# Checkout repository
- checkout
# Restore cache
- restore_cache:
key: yarn-{{ checksum "yarn.lock" }}
# Install dependencies
- run:
name: Install Dependencies
command: NODE_ENV=dev yarn
# Keep cache
- save_cache:
key: yarn-{{ checksum "yarn.lock" }}
paths:
- "node_modules"
# Test
- run:
name: Tests
command: NODE_ENV=test yarn test && yarn coverage
2017-11-24 16:17:27 +00:00
2018-01-08 16:52:56 +00:00
# Release edge
2017-11-24 16:17:27 +00:00
- run:
2018-01-08 16:52:56 +00:00
name: Publish nuxt-edge
2017-11-24 16:17:27 +00:00
command: |
if [ "${CIRCLE_BRANCH}" == "dev" ]; then
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
2017-11-24 16:46:03 +00:00
echo "//registry.yarnpkg.com/:_authToken=$NPM_TOKEN" >> ~/.npmrc
2018-01-08 16:52:56 +00:00
./scripts/release-edge
2017-11-24 16:17:27 +00:00
fi