Skip to content

add python coverage #149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 /
5 changes: 4 additions & 1 deletion .github/workflows/megaservice-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
branches: [main]
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
paths:
- .github/workflows/megaservice-test.yml
- .github/workflows/megaservice-test.yaml
- comps/cores/**
- requirements.txt
- setup.py
Expand Down Expand Up @@ -66,6 +66,9 @@ jobs:
# HF_TOKEN: ${{ secrets.HF_TOKEN }}
# run: |
# xxx
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}

- name: Publish pipeline artifact
if: ${{ !cancelled() }}
Expand Down
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=/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"
Expand Down