Skip to content

Commit

Permalink
Enable codecov (#1171)
Browse files Browse the repository at this point in the history
This PR enables `codecov` for GitHub Actions for `rmm`. The `codecov` results can be placed in the directory defined by the `RAPIDS_COVERAGE_DIR` variable, which is set in our shared workflows.

Additionally, this PR configures the unit test results to be placed in the directory defined by the `RAPIDS_TESTS_DIR` variable, which is also set in our shared workflows.

Authors:
   - AJ Schmidt (https://github.com/ajschmidt8)

Approvers:
   - Bradley Dice (https://github.com/bdice)
ajschmidt8 authored Nov 30, 2022
1 parent d132e52 commit 8a01696
Showing 3 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion ci/check_style.sh
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ rapids-logger "Create checks conda environment"
rapids-dependency-file-generator \
--output conda \
--file_key checks \
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" > env.yaml
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee env.yaml

rapids-mamba-retry env create --force -f env.yaml -n checks
conda activate checks
8 changes: 4 additions & 4 deletions ci/test_cpp.sh
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ conda activate base
rapids-dependency-file-generator \
--output conda \
--file_key test_cpp \
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*}" > env.yaml
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*}" | tee env.yaml

rapids-mamba-retry env create --force -f env.yaml -n test
conda activate test
@@ -21,8 +21,8 @@ rapids-mamba-retry install \
-c "${CPP_CHANNEL}" \
librmm librmm-tests

TESTRESULTS_DIR=test-results
mkdir -p ${TESTRESULTS_DIR}
RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"}
mkdir -p "${RAPIDS_TESTS_DIR}"
SUITEERROR=0

rapids-logger "Check GPU usage"
@@ -32,7 +32,7 @@ set +e

rapids-logger "Running googletests"
for gt in "$CONDA_PREFIX/bin/gtests/librmm/"* ; do
${gt} --gtest_output=xml:${TESTRESULTS_DIR}/
${gt} --gtest_output=xml:${RAPIDS_TESTS_DIR}/
exitcode=$?
if (( ${exitcode} != 0 )); then
SUITEERROR=${exitcode}
17 changes: 13 additions & 4 deletions ci/test_python.sh
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ rapids-logger "Create test conda environment"
rapids-dependency-file-generator \
--output conda \
--file_key test_python \
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" > env.yaml
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee env.yaml

rapids-mamba-retry env create --force -f env.yaml -n test
conda activate test
@@ -24,8 +24,9 @@ rapids-mamba-retry install \
-c "${PYTHON_CHANNEL}" \
rmm librmm

TESTRESULTS_DIR="${PWD}/test-results"
mkdir -p "${TESTRESULTS_DIR}"
RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"}
RAPIDS_COVERAGE_DIR=${RAPIDS_COVERAGE_DIR:-"${PWD}/coverage-results"}
mkdir -p "${RAPIDS_TESTS_DIR}" "${RAPIDS_COVERAGE_DIR}"
SUITEERROR=0

rapids-logger "Check GPU usage"
@@ -36,7 +37,15 @@ cd python
set +e

rapids-logger "pytest rmm"
pytest --cache-clear --junitxml="${TESTRESULTS_DIR}/junit-rmm.xml" -v --cov-config=.coveragerc --cov=rmm --cov-report=xml:python/rmm-coverage.xml --cov-report term
pytest \
--cache-clear \
--junitxml="${RAPIDS_TESTS_DIR}/junit-rmm.xml" \
-v \
--cov-config=.coveragerc \
--cov=rmm \
--cov-report=xml:"${RAPIDS_COVERAGE_DIR}/rmm-coverage.xml" \
--cov-report term

exitcode=$?
if (( ${exitcode} != 0 )); then
SUITEERROR=${exitcode}

0 comments on commit 8a01696

Please sign in to comment.