-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (57 loc) · 1.89 KB
/
Copy pathci-test.yml
File metadata and controls
61 lines (57 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# SPDX-FileCopyrightText: 2026 William Jin <AuraMindNest@outlook.com>
#
# SPDX-License-Identifier: BSL-1.0
name: Tests and coverage
on:
workflow_call:
permissions:
contents: read
jobs:
test-and-coverage:
name: Test and coverage (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.12', '3.13', '3.14']
steps:
# actions/checkout v6.0.2
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
with:
persist-credentials: false
# actions/setup-python v6.2.0
- name: Setup Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1
with:
python-version: ${{ matrix.python-version }}
# astral-sh/setup-uv v8.1.0
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39
with:
version: 0.11.12
- name: Install apt dependencies (Weblate venv)
run: sudo ./.github/ci/apt-install
- name: Install dependencies (incl. dev)
run: uv sync --frozen --group dev --group pre-commit
- name: Pytest with coverage
env:
HYPOTHESIS_PROFILE: ci
run: >
uv run --group dev --group pre-commit pytest -v --tb=short
-m "not plugin and not benchmark"
--cov=boost_weblate
--cov-report=term-missing
--cov-report=xml:coverage.xml
--cov-report=html:htmlcov
--cov-fail-under=90
- name: Coverage report (summary table)
run: uv run --group dev coverage report
# actions/upload-artifact v4.6.2
- name: Upload coverage artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: coverage-py${{ matrix.python-version }}-${{ github.event.pull_request.number || github.run_id }}
path: |
coverage.xml
htmlcov/
.coverage
if-no-files-found: error