-
Notifications
You must be signed in to change notification settings - Fork 101
76 lines (65 loc) · 1.72 KB
/
Copy pathci_pytest.yaml
File metadata and controls
76 lines (65 loc) · 1.72 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: ci_pytest
on:
workflow_dispatch:
pull_request:
branches:
- main
types:
- opened
- reopened
- synchronize
paths:
- "src/**"
- "tests/**"
- "pyproject.toml"
- "uv.lock"
push:
branches:
- main
paths:
- "src/**"
- "tests/**"
- "pyproject.toml"
- "uv.lock"
jobs:
build:
strategy:
fail-fast: true
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
python-version:
- "3.12"
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Install dependencies
run: |
uv pip install --system .[dev]
uv pip install --system pylint
- name: Set up Homebrew
if: matrix.os == 'macos-latest'
uses: Homebrew/actions/setup-homebrew@master
- name: Install PyICU dependencies
if: matrix.os == 'macos-latest'
run: |
brew install icu4c
# Configure PATH & PKG_CONFIG_PATH as in https://gitlab.pyicu.org/main/pyicu.
export PATH="$(brew --prefix)/opt/icu4c/bin:$(brew --prefix)/opt/icu4c/sbin:$PATH"
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$(brew --prefix)/opt/icu4c/lib/pkgconfig"
- name: Run pytest - Unit Tests
run:
uv run pytest . --cov=. --cov-report=term-missing --cov-fail-under=70
--cov-config=./pyproject.toml