5858
5959jobs :
6060 beam_PreCommit_Python_Coverage :
61- name : ${{ matrix.job_name }} (${{ matrix.job_phrase }} ${{ matrix.python_version }}) (${{ join(matrix.os, ', ') }})
62- runs-on : ${{ matrix.os }}
61+ name : ${{ matrix.job_name }} (${{ matrix.job_phrase }} ${{ matrix.python_version }})
62+ runs-on : [self-hosted, ubuntu-20.04, highmem]
6363 strategy :
6464 fail-fast : false
6565 matrix :
6666 job_name : [beam_PreCommit_Python_Coverage]
6767 job_phrase : [Run Python_Coverage PreCommit]
6868 python_version : ['3.10']
69- # Run on both self-hosted and GitHub-hosted runners.
70- # Some tests (marked require_docker_in_docker) can't run on Beam's
71- # self-hosted runners due to Docker-in-Docker environment constraint.
72- # These tests will only execute on ubuntu-latest (GitHub-hosted).
73- # Context: https://github.com/apache/beam/pull/35585
74- os : [[self-hosted, ubuntu-20.04, highmem], [ubuntu-latest]]
7569 timeout-minutes : 180
7670 if : |
7771 github.event_name == 'push' ||
@@ -92,41 +86,16 @@ jobs:
9286 with :
9387 java-version : default
9488 python-version : ${{ matrix.python_version }}
95- - name : Start DinD
96- uses : ./.github/actions/dind-up-action
97- id : dind
98- if : contains(matrix.os, 'self-hosted')
99- with :
100- # Pin to stable Docker version to avoid compatibility issues
101- dind-image : " docker:27-dind"
102- # Enable all the new features
103- cleanup-dind-on-start : " true"
104- smoke-test-port-mapping : " true"
105- prime-testcontainers : " true"
106- tmpfs-run-size : 2g
107- tmpfs-varrun-size : 4g
108- export-gh-env : " true"
10989 - name : Run preCommitPyCoverage
11090 env :
111- DOCKER_HOST : ${{ contains(matrix.os, 'self-hosted') && steps.dind.outputs.docker-host || '' }}
11291 TOX_TESTENV_PASSENV : " DOCKER_*,TESTCONTAINERS_*,TC_*,BEAM_*,GRPC_*,OMP_*,OPENBLAS_*,PYTHONHASHSEED,PYTEST_*"
113- TESTCONTAINERS_HOST_OVERRIDE : ${{ contains(matrix.os, 'self-hosted') && env.DIND_IP || '' }}
114- TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE : " /var/run/docker.sock"
115- TESTCONTAINERS_RYUK_DISABLED : " false"
116- TESTCONTAINERS_RYUK_CONTAINER_PRIVILEGED : " true"
11792 PYTEST_ADDOPTS : " -v --tb=short --maxfail=3 --durations=20 --reruns=2 --reruns-delay=5"
11893 TC_TIMEOUT : " 120"
11994 TC_MAX_TRIES : " 120"
12095 TC_SLEEP_TIME : " 1"
12196 uses : ./.github/actions/gradle-command-self-hosted-action
12297 with :
12398 gradle-command : :sdks:python:test-suites:tox:py310:preCommitPyCoverage
124- arguments : |
125- -Pposargs="${{
126- contains(matrix.os, 'self-hosted') &&
127- '-m (not require_docker_in_docker)' ||
128- '-m require_docker_in_docker'
129- }}"
13099 - uses : codecov/codecov-action@v3
131100 with :
132101 flags : python
0 commit comments