Skip to content

Commit

Permalink
pants ci: drop sharding of itests
Browse files Browse the repository at this point in the history
  • Loading branch information
cognifloyd committed Nov 6, 2024
1 parent 2f47f62 commit 18fe05a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ jobs:
if: always() # We want the log even on failures.

integration-tests:
name: 'Integration Tests Shard ${{ matrix.shard.k }}/${{ matrix.shard.n }} (pants runs: pytest) - Python ${{ matrix.python.version-short }}'
name: 'Integration Tests (pants runs: pytest) - Python ${{ matrix.python.version-short }}'
runs-on: ubuntu-20.04
strategy:
fail-fast: false
Expand All @@ -323,10 +323,6 @@ jobs:
python:
- {version-short: '3.8', version: '3.8.10'}
- {version-short: '3.9', version: '3.9.14'}
shard:
# Sharding of tests is handled by pants:
# https://www.pantsbuild.org/stable/docs/using-pants/advanced-target-selection#sharding-the-input-targets
- {k: '0', n: '1'}

services:
mongo:
Expand Down Expand Up @@ -403,13 +399,12 @@ jobs:
--python-bootstrap-search-path=${{ steps.python.outputs.python-path }}
--tag=integration
--tag=-st2cluster
--test-shard=${{ matrix.shard.k }}/${{ matrix.shard.n }}
test '::'
- name: Upload pants log
uses: actions/upload-artifact@v4
with:
name: pants-log-py${{ matrix.python.version }}-integration-tests-shard-${{ matrix.shard.k }}_${{ matrix.shard.n }}
name: pants-log-py${{ matrix.python.version }}-integration-tests
path: .pants.d/pants.log
if: always() # We want the log even on failures.

Expand Down Expand Up @@ -514,7 +509,6 @@ jobs:
--python-bootstrap-search-path=${{ steps.python.outputs.python-path }}
--tag=integration
--tag=st2cluster
--test-shard=${{ matrix.shard.k }}/${{ matrix.shard.n }}
test '::'
# these need launchdev.sh (full running st2 instance)
# contrib/runners/orquesta_runner/::
Expand All @@ -530,14 +524,14 @@ jobs:
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: logs-itest-py${{ matrix.python-version }}
name: logs-py${{ matrix.python-version }}-st2cluster-integration-tests
path: logs.tar.gz
retention-days: 7

- name: Upload pants log
uses: actions/upload-artifact@v4
with:
name: pants-log-py${{ matrix.python.version }}-integration-tests-shard-${{ matrix.shard.k }}_${{ matrix.shard.n }}
name: pants-log-py${{ matrix.python.version }}-st2cluster-integration-tests
path: .pants.d/pants.log
if: always() # We want the log even on failures.

Expand Down
1 change: 1 addition & 0 deletions pants-plugins/uses_services/st2cluster_rules_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def run_st2cluster_is_running(
)
return result


@pytest.fixture
def mock_st2cluster() -> tuple[int, int, int]:
sock1: socket.socket
Expand Down

0 comments on commit 18fe05a

Please sign in to comment.