mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-16 01:40:15 +08:00
Bumps the github-actions group with 1 update: [codecov/codecov-action](https://github.com/codecov/codecov-action). Updates `codecov/codecov-action` from 6 to 7 - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v6...v7) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install pytest pytest-asyncio pytest-cov
|
|
pip install --editable .
|
|
|
|
- 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 }}
|
|
pytest --cov=astrbot -v -o log_cli=true -o log_level=DEBUG
|
|
|
|
- name: Upload results to Codecov
|
|
if: github.repository == 'AstrBotDevs/AstrBot'
|
|
uses: codecov/codecov-action@v7
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|