Summary:
Similar to the logic provided in https://github.com/pytorch/pytorch/blob/
b2069e7d01814d776c417042e28133c6b0e5082f/.circleci/verbatim-sources/job-specs/pytorch-job-specs.yml#L197-L201
Fixes https://github.com/pytorch/pytorch/issues/63366
Pull Request resolved: https://github.com/pytorch/pytorch/pull/63373
Reviewed By: walterddr
Differential Revision:
D30357737
Pulled By: malfet
fbshipit-source-id:
20b115eb4d6412bd9895680308a9097742d2ae7b
docker_image_base: str = ''
enable_doc_jobs: bool = False
exclude_test: bool = False
+ is_coverage: bool = False
is_libtorch: bool = False
is_scheduled: str = ''
num_test_shards: int = 1
docker_image_base=f"{DOCKER_REGISTRY}/pytorch/pytorch-linux-bionic-py3.8-gcc9",
test_runner_type=LINUX_CPU_TEST_RUNNER,
on_pull_request=True,
+ is_coverage=True,
num_test_shards=2,
ciflow_config=CIFlowConfig(
enabled=True,
run: |
# Ensure the working directory gets chowned back to the current user
docker run --rm -v "$(pwd)":/v -w /v "${ALPINE_IMAGE}" chown -R "$(id -u):$(id -g)" .
+ {%- if is_coverage %}
+ - name: Report coverage
+ run: |
+ python3 -mpip install codecov
+ python3 -mcodecov
+ {%- endif %}
- name: Zip test reports for upload
if: always()
env:
run: |
# Ensure the working directory gets chowned back to the current user
docker run --rm -v "$(pwd)":/v -w /v "${ALPINE_IMAGE}" chown -R "$(id -u):$(id -g)" .
+ - name: Report coverage
+ run: |
+ python3 -mpip install codecov
+ python3 -mcodecov
- name: Zip test reports for upload
if: always()
env: