-
Notifications
You must be signed in to change notification settings - Fork 0
117 lines (96 loc) · 2.92 KB
/
Copy pathci.yml
File metadata and controls
117 lines (96 loc) · 2.92 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# CI runs only on PR to main (with manual approval) or via workflow_dispatch.
# Configure environment "approval-required" in repo Settings > Environments with required reviewers.
name: CI/CD Pipeline
on:
pull_request:
branches: [main] # PRs to dev do not run CI; use workflow_dispatch for other branches
workflow_dispatch:
jobs:
lint:
name: lint
runs-on: ubuntu-latest
environment: approval-required
permissions:
contents: read
actions: read
pull-requests: read
steps:
- uses: actions/checkout@v4
- name: Install UV
uses: astral-sh/setup-uv@v4
with:
version: "latest"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
uv sync --dev
- name: Run Ruff linting
run: |
uv run ruff --config dev/ruff.toml check ccbt/ --fix --exit-non-zero-on-fix
- name: Run Ruff formatting check
run: |
uv run ruff --config dev/ruff.toml format --check ccbt/
- name: Run compatibility linter
run: |
uv run python dev/compatibility_linter.py ccbt/
type-check:
name: type-check
runs-on: ubuntu-latest
environment: approval-required
permissions:
contents: read
actions: read
pull-requests: read
steps:
- uses: actions/checkout@v4
- name: Install UV
uses: astral-sh/setup-uv@v4
with:
version: "latest"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
uv sync --dev
- name: Run Ty type checking
run: |
uv run ty check --config-file=dev/ty.toml --output-format=concise
i18n:
name: i18n
runs-on: ubuntu-latest
continue-on-error: true
environment: approval-required
permissions:
contents: read
actions: read
pull-requests: read
steps:
- uses: actions/checkout@v4
- name: Install UV
uses: astral-sh/setup-uv@v4
with:
version: "latest"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
uv sync --dev
- name: Extract translatable strings
run: |
uv run python -m ccbt.i18n.extract ccbt ccbt/i18n/locales/en/LC_MESSAGES/ccbt.pot
- name: Check string coverage
run: |
uv run python -m ccbt.i18n.scripts.check_string_coverage --source-dir ccbt --fail-on-gap
- name: Validate .po files
run: |
uv run python -m ccbt.i18n.scripts.validate_po
- name: Check translation completeness
run: |
uv run python -m ccbt.i18n.scripts.check_completeness