1
+ name : test
2
+
3
+ on :
4
+ push :
5
+ branches : main
6
+ pull_request :
7
+ branches : main
8
+
9
+ jobs :
10
+ python :
11
+ name : Python SDK Tests
12
+ runs-on : ubuntu-latest
13
+
14
+ steps :
15
+ - name : Checkout code
16
+ uses : actions/checkout@v4
17
+
18
+ - name : Set up Python
19
+ uses : actions/setup-python@v5
20
+ with :
21
+ python-version : ' 3.9'
22
+
23
+ - name : Install Poetry
24
+ uses : snok/install-poetry@v1
25
+ with :
26
+ version : latest
27
+ virtualenvs-create : true
28
+ virtualenvs-in-project : true
29
+
30
+ - name : Load cached venv
31
+ id : cached-poetry-dependencies
32
+ uses : actions/cache@v4
33
+ with :
34
+ path : python-sdk/.venv
35
+ key : venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
36
+
37
+ - name : Install dependencies
38
+ if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
39
+ working-directory : python-sdk
40
+ run : poetry install --no-interaction --no-root
41
+
42
+ - name : Install project
43
+ working-directory : python-sdk
44
+ run : poetry install --no-interaction
45
+
46
+ - name : Run tests
47
+ working-directory : python-sdk
48
+ run : poetry run python -m unittest discover tests -v
49
+
50
+ typescript :
51
+ name : TypeScript SDK Tests
52
+ runs-on : ubuntu-latest
53
+
54
+ steps :
55
+ - name : Checkout code
56
+ uses : actions/checkout@v4
57
+
58
+ - name : Set up Node.js
59
+ uses : actions/setup-node@v4
60
+ with :
61
+ node-version : ' 18'
62
+
63
+ - name : Install protoc
64
+ uses : arduino/setup-protoc@v3
65
+ with :
66
+ version : " 25.x"
67
+ repo-token : ${{ secrets.GITHUB_TOKEN }}
68
+
69
+ - name : Install pnpm
70
+ uses : pnpm/action-setup@v4
71
+ with :
72
+ version : 9.0.0
73
+
74
+ - name : Setup pnpm cache
75
+ uses : actions/cache@v4
76
+ with :
77
+ path : ~/.local/share/pnpm/store
78
+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
79
+ restore-keys : |
80
+ ${{ runner.os }}-pnpm-store-
81
+
82
+ - name : Install dependencies
83
+ working-directory : typescript-sdk
84
+ run : pnpm install --frozen-lockfile
85
+
86
+ - name : Run tests
87
+ working-directory : typescript-sdk
88
+ run : pnpm run test
0 commit comments