Skip to content

Commit da12b64

Browse files
committed
[chore] ci
1 parent ef71bb6 commit da12b64

File tree

3 files changed

+45
-8
lines changed

3 files changed

+45
-8
lines changed

.circleci/config.yml

Lines changed: 44 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
1+
# Javascript Node CircleCI 2.0 configuration file
2+
#
3+
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
4+
#
5+
16
version: 2
7+
8+
defaults: &defaults
9+
working_directory: ~/fabrix
10+
docker:
11+
- image: circleci/node:10.0.0
12+
213
jobs:
3-
build:
4-
working_directory: ~/fabrix
5-
docker:
6-
- image: circleci/node:10.0.0
14+
test:
15+
<<: *defaults
716
steps:
817
- checkout
918
- run:
@@ -21,9 +30,6 @@ jobs:
2130
- run:
2231
name: test
2332
command: npm test
24-
- run:
25-
name: test performance
26-
command: npm run test-performance
2733
- run:
2834
name: code-coverage
2935
command: './node_modules/.bin/nyc report --reporter=text-lcov'
@@ -35,3 +41,34 @@ jobs:
3541
prefix: coverage
3642
- store_test_results:
3743
path: test-results.xml
44+
- persist_to_workspace:
45+
root: ~/fabrix
46+
paths: .
47+
deploy:
48+
<<: *defaults
49+
steps:
50+
- attach_workspace:
51+
at: ~/fabrix
52+
- run:
53+
name: Authenticate with registry
54+
command: echo "//registry.npmjs.org/:_authToken=$npm_TOKEN" > ~/fabrix/.npmrc
55+
- run:
56+
name: Publish package
57+
command: npm publish
58+
59+
workflows:
60+
version: 2
61+
test-deploy:
62+
jobs:
63+
- test:
64+
filters:
65+
tags:
66+
only: /^v.*/
67+
- deploy:
68+
requires:
69+
- test
70+
filters:
71+
tags:
72+
only: /^v.*/
73+
branches:
74+
ignore: /.*/

lib/Email.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export class Email extends FabrixGeneric {
5151
value: function(method, subject, data, send) {
5252
return Promise.resolve()
5353
.then(() => {
54-
if (!this.app.templates[this.name] && !this.app.templates[this.name][this.method]) {
54+
if (!this.app.templates[this.name] && !this.app.templates[this.name][method]) {
5555
throw new Error(`Template ${this.name}.${method} not found`)
5656
}
5757
// Get the Email HTML

0 commit comments

Comments
 (0)