Repository navigation
53 lines (46 loc) · 1.59 KB
/
Copy pathtest.yml
File metadata and controls
53 lines (46 loc) · 1.59 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
name: Test
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions: {}
jobs:
test:
permissions:
contents: read
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.14", "3.13", "3.12", "3.11", "3.10"]
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Setup uv
uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
- name: Install dependencies
run: uv sync --dev
- name: Run tests and collect coverage
run: |-
uv run coverage run --source=tests,cpp_linter_hooks -m pytest -vv
uv run coverage report
uv run coverage xml
- uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13'
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
plugins: noop # coverage.xml is generated above
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)
- name: Test cpp-linter-hooks
run: bash testing/run.sh