mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-06 20:06:12 +08:00
尝试添加actions
This commit is contained in:
parent
1ffa7108c7
commit
dc22695155
28
.github/pytest.yml
vendored
Normal file
28
.github/pytest.yml
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
name: auto-pytest
|
||||||
|
on: [push]
|
||||||
|
jobs:
|
||||||
|
do-a-test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
step:
|
||||||
|
- 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
|
||||||
|
- run: Python -V
|
||||||
|
- 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 --cov-report html --cov-report xml --cov=./src/plugins/nonebot_bison --junitxml=test-results/junit.xml -k 'not compare'
|
||||||
|
- name: Collect coverage
|
||||||
|
run: poetry run coverage html --include='src/*'
|
||||||
|
- codecov/upload:
|
||||||
|
file: coverage.xml
|
||||||
|
- store_artifacts:
|
||||||
|
path: htmlcov
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user