Skip to content

Commit

Permalink
Merge pull request #71 from Testlio/feature/circle-upgrade/IN-666
Browse files Browse the repository at this point in the history
Circle 2.0 setup
Modify workflow steps for better UX
  • Loading branch information
mmatlik committed Aug 17, 2018
1 parent 41e4dda commit 430670a
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 15 deletions.
85 changes: 85 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
version: 2
workflows:
version: 2
install-test-publish:
jobs:
- install-dependencies
- test:
requires:
- install-dependencies
- lint:
requires:
- install-dependencies
- approve-publish-npm:
type: approval
filters:
branches:
only: master
requires:
- test
- lint
- publish-npm:
requires:
- approve-publish-npm

defaults:
docker: &default
working_directory: ~/builds
docker:
- image: circleci/node:6

jobs:
install-dependencies:
<<: *default
steps:
- checkout
- restore_cache:
keys:
- dependencies-cache-{{ checksum "package.json" }}
- dependencies-cache-
- run:
name: Install dependencies
command: npm install --no-save
- save_cache:
key: dependency-cache-{{ checksum "package.json" }}
paths:
- node_modules
- persist_to_workspace:
root: ~/builds
paths: .

test:
<<: *default
steps:
- checkout
- attach_workspace:
at: ~/builds
- run:
name: Run tests
command:
npm test

lint:
<<: *default
steps:
- checkout
- attach_workspace:
at: ~/builds
- run:
name: Run linter
command:
npm run lint

publish-npm:
<<: *default
steps:
- checkout
- attach_workspace:
at: ~/builds
- run:
name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/builds/.npmrc
- run:
name: Publish package
command:
npm publish
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v5.7.0
6.10
13 changes: 0 additions & 13 deletions circle.yml

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lambda-tools",
"version": "3.3.1",
"version": "3.3.2",
"description": "Scripts for working with AWS Lambda backed microservices",
"main": "",
"scripts": {
Expand Down

0 comments on commit 430670a

Please sign in to comment.