Files
wehub-resource-sync a0c8464e58
Build Package / build (ubuntu-latest) (push) Failing after 1s
CodeQL / Analyze (python) (push) Failing after 1s
Core Typecheck / core-typecheck (push) Failing after 1s
Linting / lint (push) Failing after 1s
llama-dev tests / test-llama-dev (push) Failing after 1s
Publish Sub-Package to PyPI if Needed / publish_subpackage_if_needed (push) Has been skipped
Sync Docs to Developer Hub / sync-docs (push) Failing after 0s
Build Package / build (windows-latest) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:26:52 +08:00

46 lines
1.3 KiB
YAML

name: Unit Testing
on:
pull_request:
env:
# How many concurrent processes running pytest in a single CI job
NUM_WORKERS: 8
# Tests will fail if coverage percentage is below this number
COV_FAIL_UNDER: 50
jobs:
test:
runs-on: ubuntu-latest-unit-tester
strategy:
fail-fast: false
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y portaudio19-dev
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
- name: Run tests with coverage
shell: bash
working-directory: llama-dev
run: |
git fetch origin ${{ github.event.pull_request.base.ref }}:${{ github.event.pull_request.base.ref }}
uv run -- llama-dev \
--repo-root ".." ${{ runner.debug && '--debug' || '' }} test \
--workers ${{ env.NUM_WORKERS }} \
--base-ref=${{ github.event.pull_request.base.ref }} \
--cov \
--cov-fail-under=${{ env.COV_FAIL_UNDER }}