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

Enable JS branch coverage #2545

Merged
merged 8 commits into from Jan 3, 2018
@@ -194,9 +194,6 @@ jobs:
rm --recursive --force girder_build/env
# Remove node_module caches
rm --recursive --force girder/node_modules/.cache
# Aggresively remove recursed node modules; we only need enough of
# the node_modules to perform javascript coverage aggregation
find girder/node_modules/ -mindepth 1 -name node_modules -exec rm --recursive --force {} \+
- persist_to_workspace:
root: /home/circleci/project
paths:
@@ -301,8 +298,7 @@ jobs:
command: pip install codecov
- run:
name: Upload coverage
command: codecov --disable search pycov gcov --file $CIRCLE_WORKING_DIRECTORY/girder/build/test/coverage/py_coverage.xml
working_directory: girder
command: codecov --disable search pycov gcov --file girder/build/test/coverage/py_coverage.xml

py3_integrationTests:
machine: true
@@ -404,21 +400,20 @@ jobs:
JASMINE_TIMEOUT: 15000
BUILD_JAVASCRIPT_TESTS: ON
working_directory: girder_build
- run:
name: Move machine-readable web coverage file to coverage directory
# Ideally, this would be output natively to the correct location (outside of the
# "artifacts" directory for human-readable files), but nyc does not yet support
# per-reporter configuration of output paths.
command: mv girder/build/test/artifacts/web_coverage/cobertura-coverage.xml girder/build/test/coverage
- store_artifacts:
path: girder/build/test/artifacts
- run:
name: Install Codecov client
command: pip install codecov
- run:
name: Upload coverage
# Including lcov.info has two effects on Codecov's javascript
# coverage reporting: it adds function definitions to the list of
# statements that are considered for coverage (this substantially
# increases the reported coverage), and it functionally disables
# branch coverage reporting (thus considering all partially coveraged
# statements as completely covered).
command: codecov --disable search pycov gcov --file $CIRCLE_WORKING_DIRECTORY/girder/build/test/coverage/web/js_coverage.xml $CIRCLE_WORKING_DIRECTORY/girder/build/test/coverage/py_coverage.xml $CIRCLE_WORKING_DIRECTORY/girder/build/test/coverage/web/lcov.info
working_directory: girder
command: codecov --disable search pycov gcov --file girder/build/test/coverage/py_coverage.xml girder/build/test/coverage/cobertura-coverage.xml
deploy:
docker:
- image: girder/girder_test:latest-py3
@@ -1,6 +1,23 @@
comment: false
coverage:
status:
# Patch status gives meaningless results whenever a test is modified without changing the
# correspondingly tested code, and may be difficult to interpret without context. Disable
# posting it to GitHub.
patch: false
project:
default:
threshold: 1

This comment has been minimized.

Copy link
@jbeezley

jbeezley Jan 3, 2018

Member

You might keep the threshold option. Our javascript coverage in particular tends to vary from run to run due to async timing.

This comment has been minimized.

Copy link
@brianhelba

brianhelba Jan 3, 2018

Author Member

This is obsoleted by the target option. The check now passes if the coverage is above the threshold (which means we can insist on it always passing).

default: false
server:
target: 85%
paths:
- girder
- plugins/*/server
python_client:
target: 80%
paths:
- clients/python/girder_client
web_client:
target: 80%
paths:
- clients/web/src
- plugins/*/web_client

This file was deleted.

@@ -0,0 +1,9 @@
{
"reporter": [
"cobertura",
"html",
"text-summary"
],
"report-dir": "build/test/artifacts/web_coverage",
"temp-directory": "build/test/coverage/web_temp"
}
@@ -17,6 +17,9 @@ Added Features
(`#2438 <https://github.com/girder/girder/pull/2438>`_)
* API endpoint in the hashsum_download plugin that returns a list of files matching a given hash sum.
(`#2548 <https://github.com/girder/girder/pull/2458>`_)
* Flake8 settings are now able to be automatically detected by many editors and IDEs. The ``flake8``
tool may now be invoked directly from the command line, without necessarily using a CMake test.
(`#2543 <https://github.com/girder/girder/pull/2543>`_)

Web Client
^^^^^^^^^^
@@ -50,6 +53,9 @@ Removals
Python tests will always output coverage information, using a standardized configuration. If external test infrastructure needs to be run with
different options, it should invoke ``pytest -cov-config ...` or `coverage run --rcfile=...` directly.
(`#2517 <https://github.com/girder/girder/pull/2517>`_)
* The CMake options ``COVERAGE_MINIMUM_PASS`` and ``JS_COVERAGE_MINIMUM_PASS`` are removed, and will have no effect if set.
If external test infrastructure needs to set a coverage threshold, it should be done with a Codecov (or similar service) configuration.
(`#2545 <https://github.com/girder/girder/pull/2545>`_)

Girder 2.4.0
============
@@ -40,7 +40,7 @@ if(JAVASCRIPT_STYLE_TESTS)
endif()

if(BUILD_JAVASCRIPT_TESTS)
find_program(ISTANBUL_EXECUTABLE istanbul
find_program(NYC_EXECUTABLE nyc
PATHS "${PROJECT_SOURCE_DIR}/node_modules/.bin"
NO_DEFAULT_PATH)
endif()
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.