mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-26 15:51:26 +00:00
✅ add pytest
This commit is contained in:
32
.github/workflows/codecov.yml
vendored
Normal file
32
.github/workflows/codecov.yml
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
name: Code Coverage
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
name: Run Pytest and Upload Coverage
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python environment
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: "3.9"
|
||||
architecture: "x64"
|
||||
|
||||
- uses: Gr1N/setup-poetry@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
poetry install
|
||||
cd tests/
|
||||
poetry run pytest --cov-report xml
|
||||
|
||||
- name: Upload coverage report
|
||||
uses: codecov/codecov-action@v2
|
||||
with:
|
||||
files: ./tests/coverage.xml
|
||||
flags: unittests
|
Reference in New Issue
Block a user