Skip to content

Commit f3550c2

Browse files
rbell517Richard Bell
andauthored
test: Stop running test in parallel (#117)
Co-authored-by: Richard Bell <[email protected]>
1 parent c00fd64 commit f3550c2

File tree

4 files changed

+23
-10
lines changed

4 files changed

+23
-10
lines changed

.github/workflows/python-package.yml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,31 @@ on:
77
branches: [master, main]
88

99
jobs:
10-
build:
10+
build-lint-unit-test:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
1414
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
15-
# Limit parallel runs on pushes to master to 1 to limit integration test rate limited failures
16-
max-parallel: ${{ github.event_name == 'pull_request' && 5 || 1 }}
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Install poetry
18+
run: pipx install poetry
19+
- uses: actions/setup-python@v5
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
cache: "poetry"
23+
- run: poetry install
24+
- run: poetry run poe test
25+
- run: poetry run poe check
26+
- run: poetry run poe lint
27+
- run: poetry run poe types
28+
integration-test:
29+
runs-on: ubuntu-latest
30+
strategy:
31+
matrix:
32+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
33+
# Do not run in parallel to limit parallel integration tests stomping on each other
34+
max-parallel: 1
1735
steps:
1836
- uses: actions/checkout@v4
1937
- name: Install poetry
@@ -25,14 +43,12 @@ jobs:
2543
- run: poetry install
2644
- run: >
2745
poetry run pytest
46+
-m integration
2847
--cloud-api-key "${{ secrets.CLOUD_API_KEY }}"
2948
--enterprise-uri "https://test-api.lifecyclesolutions.ni.com" --enterprise-api-key "${{ secrets.ENTERPRISE_API_KEY }}"
30-
- run: poetry run poe check
31-
- run: poetry run poe lint
32-
- run: poetry run poe types
3349
release:
3450
runs-on: ubuntu-latest
35-
needs: build
51+
needs: [build-lint-unit-test, integration-test]
3652
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')
3753
steps:
3854
- uses: actions/checkout@v3

tests/product/test_product_dataframe_utilities.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ def empty_products_data() -> List:
7070
return []
7171

7272

73-
@pytest.mark.enterprise
7473
@pytest.mark.unit
7574
class TestProductDataframeUtilities:
7675
def test__convert_products_to_dataframe__with_complete_data(

tests/spec/test_spec_dataframe_utilitites.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ def specs() -> List[Specification]:
117117
return specs
118118

119119

120-
@pytest.mark.enterprise
121120
@pytest.mark.unit
122121
class TestSpecDataframeUtilities:
123122
def test__convert_specs_to_dataframe_with_summarize_conditions__returns_specs_dataframe_with_string_conditions(

tests/testmonitor/test_testmonitor_dataframe_utilities.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ def empty_steps_data() -> List:
195195
return []
196196

197197

198-
@pytest.mark.enterprise
199198
@pytest.mark.unit
200199
class TestTestmonitorDataframeUtilities:
201200
def test__convert_results_with_all_fields_to_dataframe__returns_whole_results_dataframe(

0 commit comments

Comments
 (0)