-
Notifications
You must be signed in to change notification settings - Fork 10
67 lines (61 loc) · 1.94 KB
/
codecov.yml
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
62
63
64
65
66
67
name: Code Coverage
on:
workflow_dispatch:
push:
branches:
- master
- devel
- pure-py
paths:
- "ktoolbox/**"
- "tests/**"
- ".github/actions/setup-python/**"
- ".github/workflows/codecov.yml"
- "pyproject.toml"
- "prod.env"
pull_request:
paths:
- "ktoolbox/**"
- "tests/**"
- ".github/actions/setup-python/**"
- ".github/workflows/codecov.yml"
- "pyproject.toml"
- "prod.env"
jobs:
test:
name: Test With Coverage
runs-on: ${{ matrix.os }}
concurrency:
group: test-coverage-${{ github.ref }}-${{ matrix.os }}-${{ matrix.python-version }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
# macos-14 aka. macos-latest has switched to being an ARM runner, only supporting newer versions of Python.
# https://github.com/actions/setup-python/issues/855#issuecomment-2096792205
os: [ ubuntu-latest, windows-latest, macos-13 ]
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
include: # Use macos-latest here because it seems that Pydantic currently not support macOS ARM64 on 3.11, 3.12
- os: macos-latest
python-version: "3.11"
exclude:
- os: macos-13
python-version: "3.11"
env:
PYTEST_REPORT_FILENAME: report-${{ matrix.os }}-${{ matrix.python-version }}.html
steps:
- uses: actions/checkout@v4
- name: Setup Python environment
uses: ./.github/actions/setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Run Pytest
run: |
poetry run pytest -v --capture=sys --cov --cov-report=xml tests/
- name: Upload coverage report
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: coverage.xml
flags: ${{ matrix.os }}-${{ matrix.python-version }}