Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send code coverage reports from Cirrus #608

Merged
merged 15 commits into from
Nov 25, 2019
Merged

Send code coverage reports from Cirrus #608

merged 15 commits into from
Nov 25, 2019

Conversation

regisd
Copy link
Member

@regisd regisd commented Nov 25, 2019

  1. Run bazel coverage
  2. Make Cirrus send the lcov report to Codacy
    https://app.codacy.com/manual/regisd/jflex/dashboard

@regisd regisd requested a review from lsf37 as a code owner November 25, 2019 20:55
@regisd regisd self-assigned this Nov 25, 2019
@regisd regisd added code quality Code health and clean-up testing Adding tests or test infrastructure. labels Nov 25, 2019
Workaround suggested by codesuki bazelbuild/bazel#6450 (comment)

Against
Internal error thrown during build. Printing stack trace: java.lang.RuntimeException: Unrecoverable error while evaluating node 'ActionLookupData{actionLookupKey=com.google.devtools.build.lib.skyframe.CoverageReportValue$CoverageReportKey@7beaf6d6, actionIndex=1}' (requested by nodes )
	at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:531)
	at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:399)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: null for File:[[<execution_root>]bazel-out/host/bin]external/bazel_tools/tools/test/CoverageOutputGenerator/java/com/google/devtools/coverageoutputgenerator/Main.jar
	at com.google.devtools.build.lib.skyframe.ActionMetadataHandler.getMetadata(ActionMetadataHandler.java:210)
	at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$DelegatingPairFileCache.getMetadata(SkyframeActionExecutor.java:1604)

https://cirrus-ci.com/task/5105954051325952?command=measure_and_aggregate_coverage#L279
only_if applies only to tasks, not to scripts
> Error while loading tasks: FAILED_PRECONDITION: There is no task with name 'build' and task 'measure_coverage' depends on it!!
@regisd regisd merged commit 582504f into master Nov 25, 2019
@regisd regisd deleted the cirrus branch November 25, 2019 23:18
regisd pushed a commit that referenced this pull request Nov 25, 2019
Author: Régis Décamps <regisd@google.com>
Date:   Tue Nov 26 00:18:30 2019 +0100

    Send code coverage reports (#608)

    * Build coverage reports with Bazel
      * Gave up with aggregated report (combined_report)
         bazelbuild/bazel#6450
         https://cirrus-ci.com/task/5105954051325952?command=measure_and_aggregate_coverage#L279

    * Add code coverage as a Cirrus CI task
      * Add CODACY_PROJECT_TOKEN to Cirrus env variables

    * Remove Maven report-module

Updated from target/jflex-parent-1.8.0-SNAPSHOT-sources.jar
@regisd regisd mentioned this pull request Nov 26, 2019
@regisd regisd changed the title Send code coverage reports Send code coverage reports from Cirrus Dec 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality Code health and clean-up testing Adding tests or test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant