Repository navigation
60 lines (57 loc) · 2.04 KB
/
Copy pathci-python.yml
File metadata and controls
60 lines (57 loc) · 2.04 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
name: CI (Python)
# Ruff lints every .py in the repository, examples included, and the stream plugin's client is
# generated from the spec, so both are among the paths.
# Feature branches run through pull_request; a push of the same commit would be a second,
# uncancellable copy of every job. A push to main runs it on the same paths as a pull request.
# A pull request that changes none of them never starts this workflow, so its check must not
# be made required: it would wait forever on such a pull request.
on:
push:
branches: [ "main" ]
paths:
- '**/*.py'
- '**/pyproject.toml'
- 'uv.lock'
- 'pytest.ini'
- 'sdks/python/**'
- 'plugins/**'
- 'tests/**'
- 'acceleration/api/openapi.yaml'
- '.github/workflows/run_tests.yml'
- '.github/actions/python-uv-setup/**'
- '.github/workflows/ci-python.yml'
- '!**/*.md'
# The example plugins/stream/tests/test_folder.py loads, instructions.md included, so it
# must stay after the *.md exclusion.
- 'examples/text_agents/mcp_plugins/**'
pull_request:
branches: [ "**" ]
paths:
- '**/*.py'
- '**/pyproject.toml'
- 'uv.lock'
- 'pytest.ini'
- 'sdks/python/**'
- 'plugins/**'
- 'tests/**'
- 'acceleration/api/openapi.yaml'
- '.github/workflows/run_tests.yml'
- '.github/actions/python-uv-setup/**'
- '.github/workflows/ci-python.yml'
- '!**/*.md'
# The example plugins/stream/tests/test_folder.py loads, instructions.md included, so it
# must stay after the *.md exclusion.
- 'examples/text_agents/mcp_plugins/**'
permissions:
contents: read
pull-requests: read
# Cancel in-flight runs for the same branch/PR when new commits arrive
concurrency:
group: ci-python-${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
jobs:
# No secrets: unit tests reach no provider, and a pull request's code runs here.
unit:
uses: ./.github/workflows/run_tests.yml
with:
marker: 'not integration'