From dc22695155f0d93d3ca95ffcd1389d3e20beb763 Mon Sep 17 00:00:00 2001 From: Azide Date: Sun, 13 Mar 2022 21:21:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E6=B7=BB=E5=8A=A0actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/pytest.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/pytest.yml diff --git a/.github/pytest.yml b/.github/pytest.yml new file mode 100644 index 0000000..53d60a9 --- /dev/null +++ b/.github/pytest.yml @@ -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 + \ No newline at end of file