我正在尝试为我的学生实现自动化测试。作为一个非常基本的示例:编写一些 HTML。所以我创建了一个测试用例来检查无序列表。 无论如何:它在本地工作,但似乎我无法让它在特拉维斯上工作。我可能会错过一件小事,但不知道出了什么问题:
https://travis-ci.com/maciossek/hft-asgmt-html-01/jobs/127338669/config https://github.com/maciossek/hft-asgmt-html-01
非常感谢任何帮助!
最佳答案
这是我最终得到的 travis.yml(正在工作)
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:
- yarn test
关于travis-ci - Puppeteer Travis-CI chrome headless 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50682848/