-
Notifications
You must be signed in to change notification settings - Fork 69
81 lines (79 loc) · 2.46 KB
/
python-package-shared.yml
File metadata and controls
81 lines (79 loc) · 2.46 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
name: Labelbox Python SDK Shared
on:
workflow_call:
inputs:
python-version:
required: true
type: string
api-key:
required: true
type: string
da-test-key:
required: true
type: string
sdk-version:
required: false
type: string
test-env:
required: true
type: string
fixture-profile:
required: true
type: boolean
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- uses: ./.github/actions/python-package-shared-setup
with:
rye-version: ${{ vars.RYE_VERSION }}
python-version: ${{ inputs.python-version }}
- name: Linting
working-directory: libs/labelbox
run: rye run lint
integration:
runs-on: ubuntu-latest
concurrency:
group: labelbox-python-${{ inputs.test-env }}-${{ inputs.python-version }}-integration
cancel-in-progress: false
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.sdk-version || github.head_ref }}
- uses: ./.github/actions/python-package-shared-setup
with:
rye-version: ${{ vars.RYE_VERSION }}
python-version: ${{ inputs.python-version }}
- name: Integration Testing
env:
LABELBOX_TEST_API_KEY: ${{ secrets[inputs.api-key] }}
DA_GCP_LABELBOX_API_KEY: ${{ secrets[inputs.da-test-key] }}
LABELBOX_TEST_ENVIRON: ${{ inputs.test-env }}
working-directory: libs/labelbox
run: rye run integration -n 32
unit-data:
runs-on: ubuntu-latest
concurrency:
group: labelbox-python-${{ inputs.test-env }}-${{ inputs.python-version }}-unit-data
cancel-in-progress: false
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.sdk-version || github.head_ref }}
- uses: ./.github/actions/python-package-shared-setup
with:
rye-version: ${{ vars.RYE_VERSION }}
python-version: ${{ inputs.python-version }}
- name: Unit && Data Testing
env:
LABELBOX_TEST_API_KEY: ${{ secrets[inputs.api-key] }}
DA_GCP_LABELBOX_API_KEY: ${{ secrets[inputs.da-test-key] }}
LABELBOX_TEST_ENVIRON: ${{ inputs.test-env }}
working-directory: libs/labelbox
run: |
rye sync -f --features labelbox/data
rye run unit -n 32
rye run data -n 32