Unverified Commit 9a950651 authored by anj-s's avatar anj-s Committed by GitHub
Browse files

[chore] Enable codecov for fairscale (#551)



* codedcov testing

* codecov testnig

* more changes for uploading cov

* fix invalid config

* fix invalid config

* modify name

* fix config
Co-authored-by: default avatarAnjali Sridhar <anj@devfair0443.h2.fair>
parent c9db4775
...@@ -8,7 +8,8 @@ ...@@ -8,7 +8,8 @@
# Pro tip: download circle ci cli to validate the config locally during development. # Pro tip: download circle ci cli to validate the config locally during development.
version: 2.1 version: 2.1
orbs:
codecov: codecov/codecov@1.0.2
# ------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------
# Environments to run the jobs in # Environments to run the jobs in
# ------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------
...@@ -159,17 +160,10 @@ check_test_list: &check_test_list ...@@ -159,17 +160,10 @@ check_test_list: &check_test_list
bash ./tests/ci_test_list_check.sh bash ./tests/ci_test_list_check.sh
# TODO (Min): figure out how to do coverage nightly or on-demand. Doing it upload_coverage: &upload_coverage
# on every commit seems like an overkill since we can easily figure out which - codecov/upload:
# code is not covered without looking at coverage results from each commit. file: 'coverage.xml'
# Also, it is a long pole for testing time, which slows down development a lot. token: $CODECOV_TOKEN
run_coverage: &run_coverage
- run:
name: Run Unit Tests With Coverage
command: |
pytest --junitxml=test-results/junit.xml --verbose --timeout 60 --cov-report=xml --cov=./
#Uploading test coverage for Python code
bash <(curl -s https://codecov.io/bash) -f coverage.xml -cF Python
run_mpi_unittests: &run_mpi_unittests run_mpi_unittests: &run_mpi_unittests
- run: - run:
...@@ -233,7 +227,7 @@ run_unittests: &run_unittests ...@@ -233,7 +227,7 @@ run_unittests: &run_unittests
name: Run all unit tests. name: Run all unit tests.
# We run all and not stopping on failure on CPU since docker time is cheaper. # We run all and not stopping on failure on CPU since docker time is cheaper.
command: | command: |
pytest --junitxml=test-results/junit.xml --verbose --timeout 60 pytest --junitxml=test-results/junit.xml --verbose --timeout 60 --cov-report=xml --cov=./
commands: commands:
...@@ -249,7 +243,7 @@ commands: ...@@ -249,7 +243,7 @@ commands:
name: Run Unit Tests name: Run Unit Tests
command: | command: |
if [ ! -f <<parameters.test_list_file>> ]; then exit 1; fi if [ ! -f <<parameters.test_list_file>> ]; then exit 1; fi
pytest --junitxml=test-results/junit.xml --verbose --timeout 60 `cat <<parameters.test_list_file>>` pytest --junitxml=test-results/junit.xml --verbose --timeout 60 --cov-report=xml --cov=./ `cat <<parameters.test_list_file>>`
# ------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------
# Jobs to run # Jobs to run
...@@ -399,6 +393,8 @@ jobs: ...@@ -399,6 +393,8 @@ jobs:
- store_test_results: - store_test_results:
path: test-results path: test-results
- <<: *upload_coverage
gpu_tests_171: gpu_tests_171:
parameters: parameters:
...@@ -439,6 +435,8 @@ jobs: ...@@ -439,6 +435,8 @@ jobs:
- store_test_results: - store_test_results:
path: test-results path: test-results
- <<: *upload_coverage
gpu_tests_181: gpu_tests_181:
parameters: parameters:
...@@ -479,6 +477,8 @@ jobs: ...@@ -479,6 +477,8 @@ jobs:
- store_test_results: - store_test_results:
path: test-results path: test-results
- <<: *upload_coverage
benchmarks_1: benchmarks_1:
<<: *gpu <<: *gpu
......
codecov:
require_ci_to_pass: yes
coverage: coverage:
status: status:
project: project:
default: default:
target: 94% target: 94%
threshold: 0.1% threshold: 0.1%
status:
project: yes
patch: yes
changes: no
parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no
comment:
layout: "reach,diff,flags,tree"
behavior: default
require_changes: no
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment