Skip to content

Commit

Permalink
enable python coverage (#149)
Browse files Browse the repository at this point in the history
Signed-off-by: Sun, Xuehao <[email protected]>
Signed-off-by: chensuyue <[email protected]>
  • Loading branch information
chensuyue authored Jun 13, 2024
1 parent e850339 commit cd91cfc
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 2 deletions.
File renamed without changes.
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 /
File renamed without changes.
3 changes: 2 additions & 1 deletion .github/workflows/scripts/test_ut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ 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=$(python -c 'import comps; print(comps.__path__[0])')
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"
Expand Down

0 comments on commit cd91cfc

Please sign in to comment.