11name : CI
2- on :
2+
3+ # NOTE: uv version is also pinned in s2-lite-integration-tests sdks config below.
4+ env :
5+ UV_VERSION : " 0.11.3"
6+
7+ on :
38 pull_request :
4- types : [opened, edited, synchronize, labeled, unlabeled, ready_for_review, reopened]
9+ types :
10+ [
11+ opened,
12+ edited,
13+ synchronize,
14+ labeled,
15+ unlabeled,
16+ ready_for_review,
17+ reopened,
18+ ]
519jobs :
6- ci :
7- name : CI
20+ local-checks :
21+ name : Local Checks (code quality, unit tests, docs build, PR title)
822 runs-on : ubuntu-latest
923 steps :
1024 - name : Checkout repository
1125 uses : actions/checkout@v4
1226 - name : Install uv
13- uses : astral-sh/setup-uv@v6
27+ uses : astral-sh/setup-uv@v7
1428 with :
15- version : " 0.8.2 "
29+ version : ${{ env.UV_VERSION }}
1630 - name : Sync dependencies
1731 run : |
1832 uv sync --all-groups
1933 - name : Static code check
2034 run : uv run poe ci_checker
35+ - name : Unit tests
36+ run : uv run pytest tests/ -v -m 'not (account or basin or stream or metrics)'
2137 - name : Check docs build
2238 working-directory : ./docs
2339 run : |
@@ -26,20 +42,60 @@ jobs:
2642 uses : actions/github-script@v7
2743 with :
2844 script : |
29- const title = context.payload.pull_request.title;
30- const labels = context.payload.pull_request.labels.map(l => l.name);
31- if (labels.includes('dev')) {
32- const regex = /^(?!feat|fix|refactor|docs|perf|style|test|chore|revert)[a-z].*$/;
33- if (!regex.test(title)) {
34- core.setFailed(
35- `PR title "${title}" does not match the commit format for non-user-facing changes`
36- );
37- }
38- } else {
39- const regex = /^(feat|fix|refactor|docs|perf|style|test|chore|revert)!?:[ ][a-z].*$/;
40- if (!regex.test(title)) {
41- core.setFailed(
42- `PR title "${title}" does not match the expected conventional commit format for user-facing changes`
43- );
44- }
45+ const title = context.payload.pull_request.title;
46+ const labels = context.payload.pull_request.labels.map(l => l.name);
47+ if (labels.includes('dev')) {
48+ const regex = /^(?!feat|fix|refactor|docs|perf|style|test|chore|revert)[a-z].*$/;
49+ if (!regex.test(title)) {
50+ core.setFailed(
51+ `PR title "${title}" does not match the commit format for non-user-facing changes`
52+ );
4553 }
54+ } else {
55+ const regex = /^(feat|fix|refactor|docs|perf|style|test|chore|revert)!?:[ ][a-z].*$/;
56+ if (!regex.test(title)) {
57+ core.setFailed(
58+ `PR title "${title}" does not match the expected conventional commit format for user-facing changes`
59+ );
60+ }
61+ }
62+
63+ s2-cloud-integration-tests :
64+ name : S2 Cloud Integration Tests
65+ runs-on : ubuntu-latest
66+ steps :
67+ - name : Checkout repository
68+ uses : actions/checkout@v4
69+ - name : Install uv
70+ uses : astral-sh/setup-uv@v7
71+ with :
72+ version : ${{ env.UV_VERSION }}
73+ - name : Sync dependencies
74+ run : uv sync --group test
75+ - name : Run integration tests
76+ env :
77+ S2_ACCESS_TOKEN : ${{ secrets.S2_ACCESS_TOKEN }}
78+ run : uv run pytest tests/ -v -s -m 'account or basin or stream or metrics'
79+
80+ build-s2-lite :
81+ uses : s2-streamstore/s2/.github/workflows/build-s2-lite.yml@main
82+
83+ s2-lite-integration-tests :
84+ name : S2-Lite Integration Tests
85+ needs : build-s2-lite
86+ uses : s2-streamstore/s2/.github/workflows/sdk-tests.yml@main
87+ with :
88+ server-binary : server
89+ server-args : " --port 8080"
90+ server-port : 8080
91+ sdks : |
92+ [
93+ {
94+ "name": "python",
95+ "repo": "${{ github.repository }}",
96+ "ref": "${{ github.ref }}",
97+ "lang": "python",
98+ "uv-version": "0.11.3",
99+ "test_cmd": "uv run pytest tests/ -v -s -m 'account or basin or stream'"
100+ }
101+ ]
0 commit comments