Skip to content

Commit

Permalink
[chore] ci
Browse files Browse the repository at this point in the history
  • Loading branch information
scott-wyatt committed Jul 9, 2018
1 parent ef71bb6 commit da12b64
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 8 deletions.
51 changes: 44 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#

version: 2

defaults: &defaults
working_directory: ~/fabrix
docker:
- image: circleci/node:10.0.0

jobs:
build:
working_directory: ~/fabrix
docker:
- image: circleci/node:10.0.0
test:
<<: *defaults
steps:
- checkout
- run:
Expand All @@ -21,9 +30,6 @@ jobs:
- run:
name: test
command: npm test
- run:
name: test performance
command: npm run test-performance
- run:
name: code-coverage
command: './node_modules/.bin/nyc report --reporter=text-lcov'
Expand All @@ -35,3 +41,34 @@ jobs:
prefix: coverage
- store_test_results:
path: test-results.xml
- persist_to_workspace:
root: ~/fabrix
paths: .
deploy:
<<: *defaults
steps:
- attach_workspace:
at: ~/fabrix
- run:
name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=$npm_TOKEN" > ~/fabrix/.npmrc
- run:
name: Publish package
command: npm publish

workflows:
version: 2
test-deploy:
jobs:
- test:
filters:
tags:
only: /^v.*/
- deploy:
requires:
- test
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
2 changes: 1 addition & 1 deletion lib/Email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class Email extends FabrixGeneric {
value: function(method, subject, data, send) {
return Promise.resolve()
.then(() => {
if (!this.app.templates[this.name] && !this.app.templates[this.name][this.method]) {
if (!this.app.templates[this.name] && !this.app.templates[this.name][method]) {
throw new Error(`Template ${this.name}.${method} not found`)
}
// Get the Email HTML
Expand Down
File renamed without changes.

0 comments on commit da12b64

Please sign in to comment.