mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-24 22:50:02 +00:00
Omit ui from coverage tests
This commit is contained in:
parent
901cfcd647
commit
83f3a48539
4 changed files with 6 additions and 28 deletions
11
.github/workflows/coverage-badge.yaml
vendored
11
.github/workflows/coverage-badge.yaml
vendored
|
|
@ -16,11 +16,8 @@ on:
|
|||
jobs:
|
||||
unit-tests:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python:
|
||||
- "3.12"
|
||||
env:
|
||||
PYTHON_VERSION: "3.12"
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
|
@ -30,11 +27,11 @@ jobs:
|
|||
|
||||
- name: Run unit tests
|
||||
run: |
|
||||
PYTHON_VERSION=${{ matrix.python }} ./scripts/unit-tests.sh
|
||||
PYTHON_VERSION=${{ env.PYTHON_VERSION }} ./scripts/unit-tests.sh
|
||||
|
||||
- name: Coverage Badge
|
||||
uses: tj-actions/coverage-badge-py@1788babcb24544eb5bbb6e0d374df5d1e54e670f # v2.0.4
|
||||
|
||||
|
||||
- name: Verify Changed files
|
||||
uses: tj-actions/verify-changed-files@a1c6acee9df209257a246f2cc6ae8cb6581c1edf # v20.0.4
|
||||
id: verify-changed-files
|
||||
|
|
|
|||
13
.github/workflows/unit-tests.yml
vendored
13
.github/workflows/unit-tests.yml
vendored
|
|
@ -48,16 +48,3 @@ jobs:
|
|||
pytest-report-${{ matrix.python }}.xml
|
||||
htmlcov-${{ matrix.python }}/
|
||||
retention-days: 7
|
||||
|
||||
- name: Check coverage
|
||||
run: |
|
||||
coverage=$(uv run --python ${{ matrix.python }} --group unit coverage report -m | tail -1 | tail -c 4 | head -c 2)
|
||||
echo "Total coverage: ${coverage}%"
|
||||
|
||||
# Check if coverage is below the threshold
|
||||
if (( ${coverage} < 40 )); then
|
||||
echo "Coverage failed at ${coverage}%, expected at least 40%"
|
||||
exit 1
|
||||
else
|
||||
echo "Coverage check passed with ${coverage}%"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue