class
  • Node.js安裝與NPM使用
  • require 、 module.exports
  • fs(文件操作)
  • EventEmitter(事件觸發)
  • util(工具類)
  • stream(流)
  • Assert(斷言)
  • Process(進程)
  • Repl(自訂命令列)
  • Path與URL
  • TCP, UDP
  • HTTP, HTTPS
  • ES6,ES7,ES8
  • Express框架
  • Koa框架
  • MySQL
  • MongoDB
  • RESTful API 與 API 文件撰寫
  • 使用Babel, ESLint
  • Webpack
  • WebSocket
  • Redis
  • React 基本概念1
  • React 基本概念1-1(搭配webpack)
  • React基本概念1-2(新增元件)
  • React 基本概念2
  • react-router
  • Redux 基本概念1
  • Redux 基本概念2
  • 結合Node.js與React.js搭建論壇網站1
  • 結合Node.js與React.js搭建論壇網站2
  • 結合Node.js與React.js搭建論壇網站3
  • 結合Node.js與React.js搭建論壇網站4
  • 結合Node.js與React.js搭建論壇網站5
  • 部署
  • 快取與緩存
  • Web安全機制
  • 單元測試
  • 自動化流程與搭建travis ci
  • 結合jenkins與bitBucket
  • 團隊合作Git flow與Telegram bot
Powered by GitBook
On this page
  • 自動化流程Jenkins CI與搭建Travis CI
  • Travis CI

Was this helpful?

自動化流程與搭建travis ci

自動化流程Jenkins CI與搭建Travis CI

Travis CI

1.在剛才單元測試專案新增.travis.yml

language: node_js
node_js:
- stable
cache:
  directories:
  - node_modules
branches:
  only:
  - master

2.之後把project上傳到github上

新增.gitignore

node_modules

讓node_modules不要上傳到github上

git init
git remote add origin <url>
git add .
git commit -m 'add'
git push origin master

使用github帳號登入 然後點選右上方你的頭像,進入profile

點選右上方的紅色按鈕sync account

找到剛上傳的專案,把他的開關打開

4.到剛才程式專案的index.js加入

exports.test2 = (num) => {
  return true;
}

5.再次上傳

git add .
git commit -m 'add'
git push origin master

6.回到travis網頁點選重新整理,之後點選剛才專案,即可看到他自動跑測試

Previous單元測試Next結合jenkins與bitBucket

Last updated 3 years ago

Was this helpful?

3.進入

https://travis-ci.org/