mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-05 21:53:56 +00:00
40 lines
976 B
YAML
Executable File
40 lines
976 B
YAML
Executable File
version: 2
|
|
jobs:
|
|
build:
|
|
working_directory: /usr/src/app
|
|
docker:
|
|
- image: banian/node-headless-chrome
|
|
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
|
|
|
|
# Release edge
|
|
- run:
|
|
name: Publish nuxt-edge
|
|
command: |
|
|
if [ "${CIRCLE_BRANCH}" == "dev" ]; then
|
|
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
|
|
echo "//registry.yarnpkg.com/:_authToken=$NPM_TOKEN" >> ~/.npmrc
|
|
./scripts/release-edge
|
|
fi
|