nonebot2/.github/workflows/codecov.yml

35 lines
769 B
YAML
Raw Normal View History

2021-12-10 09:01:56 +00:00
name: Code Coverage
on:
push:
pull_request:
jobs:
test:
name: Run Pytest and Upload Coverage
strategy:
matrix:
2022-01-13 10:06:07 +00:00
python-version: ["3.7", "3.8", "3.9", "3.10"]
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
2021-12-10 09:01:56 +00:00
steps:
- uses: actions/checkout@v2
- name: Setup Python environment
uses: ./.github/actions/setup-python
with:
2022-01-13 10:06:07 +00:00
python-version: ${{ matrix.python-version }}
2021-12-20 02:10:22 +00:00
- name: Run Pytest
2021-12-10 09:01:56 +00:00
run: |
cd tests/
2022-01-10 03:53:02 +00:00
poetry run pytest -n auto --cov-report xml
2021-12-10 09:01:56 +00:00
- name: Upload coverage report
uses: codecov/codecov-action@v2
with:
files: ./tests/coverage.xml
flags: unittests