Skip to content

Commit

Permalink
add python coverage
Browse files Browse the repository at this point in the history
Signed-off-by: chensuyue <[email protected]>
  • Loading branch information
chensuyue committed Jun 11, 2024
1 parent 597b3ca commit 69615b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker/ut.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends --fix-missing \
wget

RUN ln -sf $(which python3) /usr/bin/python
RUN python -m pip install --no-cache-dir pytest
RUN python -m pip install --no-cache-dir pytest pytest-cov

WORKDIR /
4 changes: 3 additions & 1 deletion .github/workflows/scripts/test_ut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ if [ $test_name = 'mega' ]; then
echo "run mega test"
cd cores
find . -name "*.yaml" -exec sh -c 'x="{}"; cp $x ./' \;
find . -name "test*.py" | sed 's,\.\/,python -m pytest -vs --disable-warnings ,g' > run.sh
comps_path=/GenAIComps/comps/cores
find . -name "test*.py" | sed 's,\.\/,python -m pytest --cov="${comps_path}" --cov-append -vs --disable-warnings ,g' > run.sh
bash run.sh 2>&1 | tee ${ut_log_name}

else
echo "run other test"
python -m pytest -vs --disable-warnings ./test_${test_name}*.py 2>&1 | tee ${ut_log_name}
Expand Down

0 comments on commit 69615b1

Please sign in to comment.