This repository was archived by the owner on Apr 7, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (97 loc) · 3.12 KB
/
ci.yml
File metadata and controls
102 lines (97 loc) · 3.12 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
name: CI
# NOTE: keep UV_VERSION in sync with uv-version in s2-lite-integration-tests sdks JSON below.
env:
UV_VERSION: "0.11.3"
on:
pull_request:
types:
[
opened,
edited,
synchronize,
labeled,
unlabeled,
ready_for_review,
reopened,
]
jobs:
local-checks:
name: Local Checks (code quality, unit tests, docs build, PR title)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: ${{ env.UV_VERSION }}
- name: Sync dependencies
run: |
uv sync --all-groups
- name: Static code check
run: uv run poe ci_checker
- name: Unit tests
run: uv run pytest tests/ -v -m 'not (account or basin or stream or metrics)'
- name: Check docs build
working-directory: ./docs
run: |
make html
- name: Check PR title style
uses: actions/github-script@v7
with:
script: |
const title = context.payload.pull_request.title;
const labels = context.payload.pull_request.labels.map(l => l.name);
if (labels.includes('dev')) {
const regex = /^(?!feat|fix|refactor|docs|perf|style|test|chore|revert)[a-z].*$/;
if (!regex.test(title)) {
core.setFailed(
`PR title "${title}" does not match the commit format for non-user-facing changes`
);
}
} else {
const regex = /^(feat|fix|refactor|docs|perf|style|test|chore|revert)!?:[ ][a-z].*$/;
if (!regex.test(title)) {
core.setFailed(
`PR title "${title}" does not match the expected conventional commit format for user-facing changes`
);
}
}
s2-cloud-integration-tests:
name: s2-cloud integration tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: ${{ env.UV_VERSION }}
- name: Sync dependencies
run: uv sync --group test
- name: Run integration tests
env:
S2_ACCESS_TOKEN: ${{ secrets.S2_ACCESS_TOKEN }}
run: uv run pytest tests/ -v -s -m 'account or basin or stream or metrics'
build-s2-lite:
name: Build s2-lite
uses: s2-streamstore/s2/.github/workflows/build-s2-lite.yml@main
s2-lite-integration-tests:
name: s2-lite integration tests
needs: build-s2-lite
uses: s2-streamstore/s2/.github/workflows/sdk-tests.yml@main
with:
server-binary: server
server-args: "--port 8080"
server-port: 8080
sdks: |
[
{
"name": "python",
"repo": "${{ github.repository }}",
"ref": "${{ github.ref }}",
"lang": "python",
"uv-version": "0.11.3",
"test_cmd": "uv run pytest tests/ -v -s -m '(account or basin or stream) and not cloud_only'"
}
]