Skip to content

Commit

Permalink
Fix circleci for monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
alesgenova committed Apr 30, 2019
1 parent 7bef2ca commit b8d554a
Show file tree
Hide file tree
Showing 5 changed files with 12,466 additions and 23 deletions.
62 changes: 40 additions & 22 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,53 @@
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2

defaults: &defaults
docker:
- image: circleci/node:12
working_directory: ~/repo

jobs:
build:
docker:
- image: circleci/node:12

working_directory: ~/repo
<<: *defaults

steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run:
name: Install dependencies
command: yarn install

- run:
name: Lerna bootstrap
command: yarn run bootstrap

- run:
name: Build packages
command: yarn run build

- persist_to_workspace:
root: ~/repo
paths: .

test:
<<: *defaults

- run: yarn install
steps:
- attach_workspace:
at: ~/repo

- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- run:
name: Run tests
command: yarn run test

# run tests!
- run: yarn test
- run:
name: Coverage
name: Upload test coverage
command: bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN

workflows:
version: 2
build-test:
jobs:
- build
- test:
requires:
- build
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
node_modules/
dist/
package-lock.json
lerna-debug.log
Loading

0 comments on commit b8d554a

Please sign in to comment.