通过 travis-ci 可以构建基于 puppeteer 的自动化任务,基于此构建的一个 计划任务

puppeteer中调用需要禁用沙箱环境

https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#running-puppeteer-on-travis-ci

const browser = await puppeteer.launch({args: ['--no-sandbox']});

.travis.yml 文件的配置

https://stackoverflow.com/questions/50682848/puppeteer-travis-ci-chrome-headless-not-working

language: node_js
node_js:
- "9"
dist: trusty
sudo: false
addons:
chrome: stable
before_install:
- google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost &
cache:
yarn: true
directories:
- node_modules install:
- yarn install script:
- node -v branches:
only:
- master
env:
global:

最新文章

  1. 深入理解openstack网络架构(1)
  2. Entity Framework 4、5 多字段排序
  3. proxy解析
  4. 基于局部敏感哈希的协同过滤算法之simHash算法
  5. mysql 日期时间运算函数(转)
  6. 常用LINUX脚本汇总(1)
  7. ODI 11g Studio 修改界面语言
  8. 数组Magic Index
  9. Advanced Customization of the jQuery Mobile Buttons | Appcropolis
  10. IOS文件沙盒
  11. MYSQL 好文章集锦
  12. Android查缺补漏--Service和IntentService
  13. python中报错"json.decoder.JSONDecodeError: Expecting value:"的解决
  14. 向Spring容器中注册组件的方法汇总小结
  15. idea2018版tomcat基本配置
  16. getnameinfo函数
  17. Ubuntu命令行运行C程序和C++程序
  18. bzoj 1143
  19. Django:学习笔记(9)——视图
  20. Mac Xcode下配置OpenGL

热门文章

  1. Linux从入门到入门
  2. syntax error near unexpected token `do(写的shell脚本出现格式问题)--->1.问题2.展示信息3.解决方案
  3. iOS UINavigationController Class Translation
  4. 图的最小环floyed
  5. 通过View.post()获取View的宽高
  6. 星环大数据安全组件Guardian与hadoop自带的安全组件区别
  7. 数据分析入门——Pandas类库基础知识
  8. 为什么 kubernetes 天然适合微服务
  9. C++ 使用 curl 进行 http 请求(GET、POST、Download)的封装
  10. iOS开发只简单动画实现