Skip to content

Commit d6d66d2

Browse files
author
Adrian Chang
committed
cli tuning
1 parent 1a8a5a0 commit d6d66d2

File tree

3 files changed

+29
-7
lines changed

3 files changed

+29
-7
lines changed

.github/workflows/python-package-develop.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ jobs:
1717
build:
1818
strategy:
1919
fail-fast: false
20-
max-parallel: 2
2120
matrix:
2221
include:
2322
- python-version: 3.8

.github/workflows/python-package-shared.yml

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,20 @@ jobs:
4848
python-version: ${{ inputs.python-version }}
4949
- name: Integration Testing
5050
env:
51-
PYTEST_XDIST_AUTO_NUM_WORKERS: 20
5251
LABELBOX_TEST_API_KEY: ${{ secrets[inputs.api-key] }}
5352
DA_GCP_LABELBOX_API_KEY: ${{ secrets[inputs.da-test-key] }}
5453
LABELBOX_TEST_ENVIRON: ${{ inputs.test-env }}
5554
working-directory: libs/labelbox
56-
run: rye run integration
55+
run: |
56+
rye run pytest --ignore=tests/integration/test_data_rows.py --ignore=tests/integration/test_data_rows_upsert.py --ignore=tests/integration/test_data_row_delete_metadata.py --ignore=tests/integration/test_batch.py --timeout=120 --rerun-except Timeout tests/integration
57+
- name: Integration Testing Slow
58+
env:
59+
LABELBOX_TEST_API_KEY: ${{ secrets[inputs.api-key] }}
60+
DA_GCP_LABELBOX_API_KEY: ${{ secrets[inputs.da-test-key] }}
61+
LABELBOX_TEST_ENVIRON: ${{ inputs.test-env }}
62+
working-directory: libs/labelbox
63+
run: |
64+
rye run pytest -p no:xdist --timeout=300 --rerun-except Timeout tests/integration/test_data_rows.py tests/integration/test_data_rows_upsert.py tests/integration/test_data_row_delete_metadata.py tests/integration/test_batch.py
5765
unit-data:
5866
runs-on: ubuntu-latest
5967
steps:
@@ -64,14 +72,29 @@ jobs:
6472
with:
6573
rye-version: ${{ vars.RYE_VERSION }}
6674
python-version: ${{ inputs.python-version }}
67-
- name: Unit && Data Testing
75+
- name: Unit
6876
env:
69-
PYTEST_XDIST_AUTO_NUM_WORKERS: 20
7077
LABELBOX_TEST_API_KEY: ${{ secrets[inputs.api-key] }}
7178
DA_GCP_LABELBOX_API_KEY: ${{ secrets[inputs.da-test-key] }}
7279
LABELBOX_TEST_ENVIRON: ${{ inputs.test-env }}
7380
working-directory: libs/labelbox
7481
run: |
7582
rye sync -f --features labelbox/data
7683
rye run unit
77-
rye run data
84+
- name: Data
85+
env:
86+
LABELBOX_TEST_API_KEY: ${{ secrets[inputs.api-key] }}
87+
DA_GCP_LABELBOX_API_KEY: ${{ secrets[inputs.da-test-key] }}
88+
LABELBOX_TEST_ENVIRON: ${{ inputs.test-env }}
89+
working-directory: libs/labelbox
90+
run: |
91+
rye run pytest --ignore=tests/data/annotation_import --ignore-glob='tests/data/**/*export*.py' --timeout=120 --rerun-except Timeout tests/data
92+
rye run pytest --timeout=300 --rerun-except Timeout --dist no tests/data/annotation_import
93+
- name: Data Slow
94+
env:
95+
LABELBOX_TEST_API_KEY: ${{ secrets[inputs.api-key] }}
96+
DA_GCP_LABELBOX_API_KEY: ${{ secrets[inputs.da-test-key] }}
97+
LABELBOX_TEST_ENVIRON: ${{ inputs.test-env }}
98+
working-directory: libs/labelbox
99+
run: |
100+
rye run pytest --timeout=300 --rerun-except Timeout --dist no tests/data/annotation_import tests/data/**/*export*.py

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ members = ["libs/*", "examples"]
3434

3535
[tool.pytest.ini_options]
3636
# https://github.com/pytest-dev/pytest-rerunfailures/issues/99
37-
addopts = "-rP -vvv --reruns 1 --reruns-delay 5 --durations=20 -n auto --maxprocesses=10 --cov=labelbox --import-mode=importlib --timeout=60 --rerun-except Timeout"
37+
addopts = "-rP -vvv --reruns 1 --reruns-delay 5 --durations=20 -n auto --cov=labelbox --import-mode=importlib"
3838
markers = """
3939
slow: marks tests as slow (deselect with '-m "not slow"')
4040
"""

0 commit comments

Comments
 (0)