2022-03-16 13:57:38 +08:00

33 lines
1.2 KiB
YAML

name: auto-pytest
on: [push]
jobs:
Pytest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up python 3.10
uses: actions/setup-python@v2
with:
python-version: '3.10' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- name: Dependencies install
run: |
python -m pip install --upgrade pip poetry
poetry install
- name: Browser install
run: poetry run playwright install-deps && poetry run playwright install chromium
- name: Coverage test
run: poetry run pytest -v --cov-report=xml --cov=./src/plugins/nonebot_bison -k 'not compare'
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v2
# with:
# directory: ./coverage/reports/
# env_vars: ubuntu-latest,'3.10'
# fail_ci_if_error: true
# files: ./coverage.xml
# flags: unittests
# name: codecov-umbrella
# path_to_write_report: ./coverage/codecov_report.txt
# verbose: true