a9c16febf4
* test(skills): align sandbox cache tests with readonly behavior * ci(release): enforce core quality gate before publish * ci: enforce locked dependency installs in workflows * security: remove curl-pipe-shell installs * chore: align project python baseline to 3.12 * ci(dashboard): add explicit typecheck gate * chore(pre-commit): align ruff hook version with project * ci(codeql): add javascript-typescript analysis * chore(ruff): defer py312 migration lint rules * fix: resolve ruff violations without new ignores * fix: resolve ASYNC230 and ASYNC240 without ignores * fix(auth): replace utcnow with timezone-aware UTC now * fix: avoid blocking file read in file_to_base64
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
name: Run tests and upload coverage
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths-ignore:
|
|
- 'README.md'
|
|
- 'changelogs/**'
|
|
- 'dashboard/**'
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
test:
|
|
name: Run tests and collect coverage
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip uv
|
|
uv sync --group dev
|
|
|
|
- name: Run tests
|
|
run: |
|
|
mkdir -p data/plugins
|
|
mkdir -p data/config
|
|
mkdir -p data/temp
|
|
export TESTING=true
|
|
export ZHIPU_API_KEY=${{ secrets.OPENAI_API_KEY }}
|
|
uv run pytest --cov=astrbot -v -o log_cli=true -o log_level=DEBUG
|
|
|
|
- name: Upload results to Codecov
|
|
uses: codecov/codecov-action@v5
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|