Skip to content

Commit 5ec00bc

Browse files
committed
add ci travis.yml config
1 parent da2f004 commit 5ec00bc

File tree

3 files changed

+26
-7
lines changed

3 files changed

+26
-7
lines changed

.travis.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
language: node_js
2+
3+
node_js:
4+
- '8'
5+
- '9'
6+
- '10'
7+
8+
sudo: false
9+
10+
env:
11+
- NODE_ENV=test
12+
13+
install:
14+
- travis_retry npm install
15+
16+
script:
17+
- npm test

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
[![npm version](https://badge.fury.io/js/serverless-tencent-scf.svg)](https://badge.fury.io/js/serverless-tencent-scf)
2+
[![Build Status](https://api.travis-ci.org/serverless-tencent/serverless-tencent-scf.svg?branch=testing)](https://api.travis-ci.org/serverless-tencent/serverless-tencent-scf)
3+
14
[![Serverless Framework Tencent Cloud Plugin](https://s3.amazonaws.com/assets.github.serverless/github_readme_serverless_plugin_tencent.png)](http://serverless.com)
25

36
Serverless Framework 是业界最受欢迎的无服务器应用框架,开发者无需关心底层资源即可部署完整可用的 Serverless 应用架构。Serverless Framework 具有资源编排、自动伸缩、事件驱动等能力,覆盖编码 - 调试 - 测试 - 部署等全生命周期。帮助开发者通过联动云资源,迅速地构建 serverless 应用。

test/serverless.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,16 @@ class Serverless {
1313
service: 'test-service'
1414
};
1515

16-
this.service.getAllFunctions = function() { //eslint-disable-line
16+
this.service.getAllFunctions = function() {
1717
return Object.keys(this.functions);
1818
};
1919

20-
this.service.getFunction = function(functionName) { //eslint-disable-line
21-
// NOTE the stage is always 'dev'!
22-
this.functions[functionName]
23-
.name = `${this.service}-dev-${functionName}`;
24-
return this.functions[functionName];
20+
this.service.getFunction = function(funcName) {
21+
this.functions[funcName]
22+
.name = `${this.service}-dev-${funcName}`;
23+
return this.functions[funcName];
2524
};
26-
25+
2726
this.utils = {
2827
writeFileSync() {},
2928
readFileSync() {},

0 commit comments

Comments
 (0)