- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
在 CircleCI 上,我在配置文件中运行 npm run test-ci
。
我的 package.json 中有以下脚本:
"test-ci": ". ./envvars/test.sh && nyc --all mocha --recursive --timeout 10000 && npm run report-coverage-ci",
"report-coverage-ci": "nyc report --reporter=text-lcov > coverage.lcov && codecov -f coverage.json && echo CodeCov Done",
问题是,Mocha 测试失败,但在 CircleCI 上仍然显示测试成功。
因此,如果 Mocha 测试失败,它不应该继续到报告代码覆盖率等所有内容的部分。但它正在继续该部分。
您可以看到下面日志的最后一部分(我已经撤回了一些敏感信息)。
我该如何解决这个问题?
✓ Should work with last key (3760ms)
<--- Last few GCs --->
[8488:0x3743ca0] 140011 ms: Scavenge 1328.2 (1422.9) -> 1327.9 (1423.9) MB, 7.2 / 0.0 ms (average mu = 0.151, current mu = 0.118) allocation failure
[8488:0x3743ca0] 140033 ms: Scavenge 1328.7 (1423.9) -> 1328.3 (1424.4) MB, 15.9 / 0.0 ms (average mu = 0.151, current mu = 0.118) allocation failure
[8488:0x3743ca0] 140056 ms: Scavenge 1329.1 (1424.4) -> 1328.8 (1425.4) MB, 7.7 / 0.0 ms (average mu = 0.151, current mu = 0.118) allocation failure
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 0x1581d2a5c01d]
Security context: 0x18382199e549 <JSObject>
1: /* anonymous */ [0x74025342ac9] [/home/circleci/repo/node_modules/q/q.js:~846] [pc=0x1581d355b56f](this=0x1ccc2a3a6ac9 <Object map = 0x3093e6868539>,fulfilled=0x1ccc2a3a67c1 <JSFunction query (sfi = 0x35b314d784e9)>,rejected=0x3344031826f1 <undefined>,progressed=0x3344031826f1 <undefined>)
2: arguments adaptor frame: 1->3
3: /* anonymous */ [0...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0x8c02c0 node::Abort() [/opt/circleci/.nvm/versions/node/v10.9.0/bin/node]
2: 0x8c030c [/opt/circleci/.nvm/versions/node/v10.9.0/bin/node]
3: 0xad15de v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/opt/circleci/.nvm/versions/node/v10.9.0/bin/node]
4: 0xad1814 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/opt/circleci/.nvm/versions/node/v10.9.0/bin/node]
5: 0xebe752 [/opt/circleci/.nvm/versions/node/v10.9.0/bin/node]
6: 0xebe858 v8::internal::Heap::CheckIneffectiveMarkCompact(unsigned long, double) [/opt/circleci/.nvm/versions/node/v10.9.0/bin/node]
7: 0xeca982 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/opt/circleci/.nvm/versions/node/v10.9.0/bin/node]
8: 0xecb2b4 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/opt/circleci/.nvm/versions/node/v10.9.0/bin/node]
9: 0xecdf21 v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/opt/circleci/.nvm/versions/node/v10.9.0/bin/node]
10: 0xe97444 v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationSpace) [/opt/circleci/.nvm/versions/node/v10.9.0/bin/node]
11: 0x1136d5e v8::internal::Runtime_AllocateInNewSpace(int, v8::internal::Object**, v8::internal::Isolate*) [/opt/circleci/.nvm/versions/node/v10.9.0/bin/node]
12: 0x1581d2a5c01d
-----------------------------------------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
-----------------------------------------|----------|----------|----------|----------|-------------------|
All files | 0 | 0 | 0 | 0 | |
repo | 0 | 0 | 100 | 0 | |
create_tables.js | 0 | 0 | 0 | 0 | |
-----------------------------------------|----------|----------|----------|----------|-------------------|
> Project@1.0.0 report-coverage-ci /home/circleci/repo
> nyc report --reporter=text-lcov > coverage.lcov && codecov -f coverage.json && echo CodeCov Done
_____ _
/ ____| | |
| | ___ __| | ___ ___ _____ __
| | / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| | __/ (_| (_) \ V /
\_____\___/ \__,_|\___|\___\___/ \_/
v3.1.0
==> Detecting CI Provider
Circle CI Detected
==> Configuration:
Endpoint: https://codecov.io
{ commit: '',
branch: 'master',
package: 'node-v3.1.0' }
==> Building file structure
==> Generating gcov reports (skip via --disable=gcov)
$ find /home/circleci/repo -type f -name '*.gcno' -exec gcov {} +
==> Targeting specific file
X Failed to read file at /home/circleci/repo/coverage.json
==> Uploading reports
Success!
View report at: https://codecov.io/github/rrainn/package/commit/
CodeCov Done
最佳答案
就 bash 而言,您的命令行是正确的。问题似乎是命令 nyc --all mocha --recursive --timeout 10000 失败,但以零退出代码完成执行。因此 &&
运算符认为可以转到下一个命令。
根本原因似乎是在 mocha 中,或者更具体地说是在 Node 中。 github上发布了一个问题: Mocha exits with 0 exit code with failing tests #2713
从问题评论来看,它似乎已在 Node 8.10 中修复。
关于node.js - Bash 错误的退出代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53455281/
我目前正在为 Cocoa/Objective-C 项目编写一个脚本来完全自动化我的编译-运行-调试过程。 我的最后一行代码是: lldb -f Build/MyApp.app -o "run" 这实际
我有一个带有登录屏幕的脚本,如果按下取消按钮,我想完全退出该应用程序。我尝试了 3 种方法: 系统退出() QApplication.quit() QCoreApplication.instance(
我有一个 Flash 应用程序,可以重定向到另一个页面。我很乐意捕获任何其他窗口卸载事件(单击链接/提交表单)并警告用户他们将丢失 Flash 应用程序中的进度。 但是,我找不到任何方法来判断 URL
我正在尝试在 Ubuntu 上用 Python 编写一个简单的程序,它将在播放视频完成后关闭/退出/退出 VLC Player。 能否请您指导我应该在我的程序中添加什么以获得我需要的结果。 impor
我在 Lynda.com 上学习 PHP 2 视频时遇到了一个问题,因为讲师似乎忽略了告诉我们他在视频中执行的步骤之一。我在这里上传了相关视频http://www.youtube.com/watch?
某天在群内有同学问到,在python下我用input或者raw_input都得输入完后回车才能获取到输入的值,那如何实现任意键退出暂停等功能呢,我当时也没有多想,因为接触python时间也不算长,主
我按顺序调用了几个函数(我无法编辑),但有些函数会重定向用户,所以我永远不会进入下一个函数。 我正在调用一个第三方函数,它调用了我能够阻止的 wp_redirect(),但是下一行是 exit;我不知
终止/退出主函数的 D 方式是什么? import std.stdio; import core.thread; void main() { int i; while (i <= 5)
我正在申请写作。用户可以打开应用程序、写一些文本、保存他们的工作等。 我试图做到这一点,以便点击 window close按钮将提示用户 (a) 保存他们的工作(如有必要)或 (b) 退出。 我正在尝
我正在通过在 repl 中检查别人的代码来玩弄它。 它不断调用 System/exit,这导致我的 repl 崩溃。这真是令人气愤。 在我有权访问的所有代码中,我都模拟了调用。 但它也会调用一些我没有
我正在使用 subprocess执行mimic的模块程序(指定 here )。下面的代码成功地读取了一些文本并写入了一个 mp3 文件。 import subprocess proc = subpro
退出 .then 范围后数组上的值被清除 在下面的代码中tableValues1.length 给我正确的长度,直到它位于每个循环内当它退出时,作用域数组长度为零。 请谁能帮我解决这个问题 - 谢谢
我正在尝试为 s3cmd 编写一个 docker 镜像。当我通过 docker-compose 运行从 Dockerfile 构建的图像时,容器在 docker compose run 命令之前退出。
这个问题已经有答案了: 已关闭12 年前。 Possible Duplicate: Quitting an application - is that frowned upon? 我编写了一个 And
我遇到 Selenium WebDriver 仅执行一次后退出 for 循环的问题。据推测,这是获取内容和在加载页面之前启动循环的问题。是否有可能让 webdriver 等待页面加载? List al
#include #include #include #include "Player.h" using namespace std; void PlayerMenu(); int main()
class Test{ public static void main(String args[]) { Patron list[] = new PatronData(
我正在做一些作业,遇到了这个问题。 Write a program that reads several lines of text and prints a table indicating the
我正在用 C 创建一个简单的 Linux 命令 shell。我无法理解我的代码在哪里出现问题。 “commands”是我希望作为一个父进程的子进程同时执行的 Linux 命令字符串列表。当所有执行完成
我的控制台应用程序有点问题。应用程序应该从用户那里获取数字并将它们添加到列表中,但是如果输入是“c”,它应该关闭。我不知道如何在不使用 Scanner.nextLine() 挂起应用程序并退出循环的情
我是一名优秀的程序员,十分优秀!