Skip to content

📝 项目更名为YiriOneBot (#9) #53

📝 项目更名为YiriOneBot (#9)

📝 项目更名为YiriOneBot (#9) #53

Workflow file for this run

name: Pytest
on: [push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
# os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest]
steps:
- name: 检出仓库
uses: actions/checkout@v4
- name: 安装Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: 安装Poetry
uses: abatilo/actions-poetry@v2
- name: 设置本地venv
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- name: 使用缓存
uses: actions/cache@v3
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: 安装依赖
run: poetry install
- name: 运行测试
run: poetry run pytest --cov=./ --cov-report=xml
- name: 上传到codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
slug: XYCode-Kerman/YiriOneBot
env_vars: OS,PYTHON