Skip to content

Commit bf12de8

Browse files
authored
Merge pull request #16 from pankaj4u4m/telemetry
Telemetry
2 parents beb472f + 59d1acd commit bf12de8

377 files changed

Lines changed: 7136 additions & 5010 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/tests.yml

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
18+
19+
defaults:
20+
run:
21+
shell: bash
22+
23+
jobs:
24+
codeql:
25+
name: CodeQL
26+
runs-on: ubuntu-latest
27+
timeout-minutes: 15
28+
permissions:
29+
actions: read
30+
contents: read
31+
security-events: write
32+
33+
steps:
34+
- name: Check out repository
35+
uses: actions/checkout@v4
36+
37+
- name: Initialize CodeQL
38+
uses: github/codeql-action/init@v3
39+
with:
40+
languages: python
41+
42+
- name: Analyze
43+
uses: github/codeql-action/analyze@v3
44+
with:
45+
category: /language:python
46+
47+
lint-format:
48+
name: Lint and format
49+
runs-on: ubuntu-latest
50+
timeout-minutes: 10
51+
52+
steps:
53+
- name: Check out repository
54+
uses: actions/checkout@v4
55+
56+
- name: Set up Python
57+
uses: actions/setup-python@v5
58+
with:
59+
python-version: "3.11"
60+
61+
- name: Set up uv
62+
uses: astral-sh/setup-uv@v5
63+
with:
64+
enable-cache: true
65+
66+
- name: Install dependencies
67+
run: uv sync --frozen --group dev
68+
69+
- name: Run Ruff
70+
run: make lint
71+
72+
- name: Check Black formatting
73+
run: uv run black --check src tests
74+
75+
typecheck:
76+
name: Type check
77+
runs-on: ubuntu-latest
78+
timeout-minutes: 15
79+
80+
steps:
81+
- name: Check out repository
82+
uses: actions/checkout@v4
83+
84+
- name: Set up Python
85+
uses: actions/setup-python@v5
86+
with:
87+
python-version: "3.11"
88+
89+
- name: Set up uv
90+
uses: astral-sh/setup-uv@v5
91+
with:
92+
enable-cache: true
93+
94+
- name: Install dependencies
95+
run: uv sync --frozen --group dev
96+
97+
- name: Run mypy
98+
run: make typecheck
99+
100+
test:
101+
name: Tests / Python ${{ matrix.python-version }}
102+
runs-on: ubuntu-latest
103+
timeout-minutes: 20
104+
strategy:
105+
fail-fast: false
106+
matrix:
107+
python-version:
108+
- "3.11"
109+
- "3.13"
110+
111+
steps:
112+
- name: Check out repository
113+
uses: actions/checkout@v4
114+
115+
- name: Set up Python
116+
uses: actions/setup-python@v5
117+
with:
118+
python-version: ${{ matrix.python-version }}
119+
120+
- name: Set up uv
121+
uses: astral-sh/setup-uv@v5
122+
with:
123+
enable-cache: true
124+
125+
- name: Install dependencies
126+
run: uv sync --frozen --group dev
127+
128+
- name: Run tests
129+
run: make test
130+
131+
security:
132+
name: Dependency audit
133+
runs-on: ubuntu-latest
134+
timeout-minutes: 10
135+
136+
steps:
137+
- name: Check out repository
138+
uses: actions/checkout@v4
139+
140+
- name: Set up Python
141+
uses: actions/setup-python@v5
142+
with:
143+
python-version: "3.11"
144+
145+
- name: Set up uv
146+
uses: astral-sh/setup-uv@v5
147+
with:
148+
enable-cache: true
149+
150+
- name: Install dependencies
151+
run: uv sync --frozen --group dev
152+
153+
- name: Audit Python dependencies
154+
run: |
155+
uv export --frozen --group dev --format requirements-txt --no-hashes --output-file requirements-audit.txt
156+
uvx pip-audit --requirement requirements-audit.txt

0 commit comments

Comments
 (0)