Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 21 additions & 10 deletions .github/workflows/beam_PreCommit_Python_Coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,35 +58,45 @@ env:

jobs:
beam_PreCommit_Python_Coverage:
name: ${{ matrix.job_name }} (${{ matrix.job_phrase }})
runs-on: [self-hosted, ubuntu-20.04, highmem]
name: ${{ matrix.job_name }} (${{ matrix.job_phrase }} ${{ matrix.python_version }}) (${{ join(matrix.os, ', ') }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
job_name: [beam_PreCommit_Python_Coverage]
job_phrase: [Run Python_Coverage PreCommit]
python_version: ['3.9']
# Run on both self-hosted and GitHub-hosted runners.
# Some tests (marked require_docker_in_docker) can't run on Beam's
# self-hosted runners due to Docker-in-Docker environment constraint.
# These tests will only execute on ubuntu-latest (GitHub-hosted).
# Context: https://github.com/apache/beam/pull/35585
# Temporary removed the ubuntu-latest env till resolving deps issues.
os: [[self-hosted, ubuntu-20.04, highmem]]
timeout-minutes: 180
if: |
github.event_name == 'push' ||
github.event_name == 'pull_request_target' ||
(github.event_name == 'schedule' && github.repository == 'apache/beam') ||
github.event_name == 'workflow_dispatch' ||
github.event.comment.body == 'Run Python_Coverage PreCommit'
startswith(github.event.comment.body, 'Run Python_Coverage PreCommit 3.')
steps:
- uses: actions/checkout@v4
- name: Setup repository
uses: ./.github/actions/setup-action
with:
comment_phrase: ${{ matrix.job_phrase }}
comment_phrase: ${{ matrix.job_phrase }} ${{ matrix.python_version }}
github_token: ${{ secrets.GITHUB_TOKEN }}
github_job: ${{ matrix.job_name }} (${{ matrix.job_phrase }})
github_job: ${{ matrix.job_name }} (${{ matrix.job_phrase }} ${{ matrix.python_version }}) (${{ join(matrix.os, ', ') }})
- name: Setup environment
uses: ./.github/actions/setup-environment-action
with:
java-version: default
python-version: default
python-version: ${{ matrix.python_version }}
- name: Start DinD
uses: ./.github/actions/dind-up-action
id: dind
if: contains(matrix.os, 'self-hosted')
with:
# Enable all the new features
cleanup-dind-on-start: "true"
Expand All @@ -97,9 +107,9 @@ jobs:
export-gh-env: "true"
- name: Run preCommitPyCoverage
env:
DOCKER_HOST: ${{ steps.dind.outputs.docker-host }}
DOCKER_HOST: ${{ contains(matrix.os, 'self-hosted') && steps.dind.outputs.docker-host || '' }}
TOX_TESTENV_PASSENV: "DOCKER_*,TESTCONTAINERS_*,TC_*,BEAM_*,GRPC_*,OMP_*,OPENBLAS_*,PYTHONHASHSEED,PYTEST_*"
TESTCONTAINERS_HOST_OVERRIDE: ${{ env.DIND_IP }}
TESTCONTAINERS_HOST_OVERRIDE: ${{ contains(matrix.os, 'self-hosted') && env.DIND_IP || '' }}
TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE: "/var/run/docker.sock"
TESTCONTAINERS_RYUK_DISABLED: "false"
TESTCONTAINERS_RYUK_CONTAINER_PRIVILEGED: "true"
Expand All @@ -118,7 +128,7 @@ jobs:
uses: actions/upload-artifact@v4
if: failure()
with:
name: Python Test Results
name: Python ${{ matrix.python_version }} Test Results (${{ join(matrix.os, ', ') }})
path: '**/pytest*.xml'
- name: Publish Python Test Results
env:
Expand All @@ -129,4 +139,5 @@ jobs:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/pytest*.xml'
large_files: true
large_files: true
check_name: "Python ${{ matrix.python_version }} Test Results (${{ join(matrix.os, ', ') }})"
Loading