forked from kubeflow/training-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (36 loc) · 1.32 KB
/
test-python.yaml
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
name: Python Test
on:
- push
- pull_request
jobs:
python-test:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# TODO (tenzen-y): Once we resolve this compatibility issue, we will test against all Python versions.
# REF: https://github.com/kubeflow/training-operator/issues/2096
# python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11"]
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# TODO (andreyvelich): We need to replace this action with script to do
# linting and formatting for Training Operator SDK.
- name: Check Python code with Black
uses: psf/black@stable
with:
version: 24.2.0
options: --check --exclude '/*kubeflow_org_v1*|__init__.py|api_client.py|configuration.py|exceptions.py|rest.py'
src: sdk/
- name: Install dependencies
run: |
pip install pytest python-dateutil urllib3 kubernetes
pip install -U './sdk/python[huggingface]'
- name: Run unit test for training sdk
run: pytest ./sdk/python/kubeflow/training/api/training_client_test.py