|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +# or more contributor license agreements. See the NOTICE file |
| 3 | +# distributed with this work for additional information |
| 4 | +# regarding copyright ownership. The ASF licenses this file |
| 5 | +# to you under the Apache License, Version 2.0 (the |
| 6 | +# "License"); you may not use this file except in compliance |
| 7 | +# with the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, |
| 12 | +# software distributed under the License is distributed on an |
| 13 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +# KIND, either express or implied. See the License for the |
| 15 | +# specific language governing permissions and limitations |
| 16 | +# under the License. |
| 17 | + |
| 18 | +name: PostCommit Java PVR Flink Batch |
| 19 | + |
| 20 | +on: |
| 21 | + push: |
| 22 | + tags: ['v*'] |
| 23 | + branches: ['master', 'release-*'] |
| 24 | + paths: |
| 25 | + - 'runners/flink/**' |
| 26 | + - 'runners/java-fn-execution/**' |
| 27 | + - 'sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/**' |
| 28 | + - '.github/workflows/beam_PostCommit_Java_PVR_Flink_Batch.yml' |
| 29 | + pull_request_target: |
| 30 | + branches: ['master', 'release-*'] |
| 31 | + paths: |
| 32 | + - 'release/trigger_all_tests.json' |
| 33 | + - '.github/trigger_files/beam_PostCommit_Java_PVR_Flink_Batch.json' |
| 34 | + schedule: |
| 35 | + - cron: '15 2/6 * * *' |
| 36 | + workflow_dispatch: |
| 37 | + |
| 38 | +# This allows a subsequently queued workflow run to interrupt previous runs |
| 39 | +concurrency: |
| 40 | + group: '${{ github.workflow }} @ ${{ github.event.issue.number || github.event.pull_request.head.label || github.sha || github.head_ref || github.ref }}-${{ github.event.schedule || github.event.comment.id || github.event.sender.login }}' |
| 41 | + cancel-in-progress: true |
| 42 | + |
| 43 | +#Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event |
| 44 | +permissions: |
| 45 | + actions: write |
| 46 | + pull-requests: write |
| 47 | + checks: write |
| 48 | + contents: read |
| 49 | + deployments: read |
| 50 | + id-token: none |
| 51 | + issues: write |
| 52 | + discussions: read |
| 53 | + packages: read |
| 54 | + pages: read |
| 55 | + repository-projects: read |
| 56 | + security-events: read |
| 57 | + statuses: read |
| 58 | + |
| 59 | +env: |
| 60 | + DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} |
| 61 | + GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }} |
| 62 | + GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GE_CACHE_PASSWORD }} |
| 63 | + |
| 64 | +jobs: |
| 65 | + beam_PostCommit_Java_PVR_Flink_Batch: |
| 66 | + name: ${{ matrix.job_name }} (${{ matrix.job_phrase }}) |
| 67 | + strategy: |
| 68 | + matrix: |
| 69 | + job_name: ["beam_PostCommit_Java_PVR_Flink_Batch"] |
| 70 | + job_phrase: ["Run Java_PVR_Flink_Batch PostCommit"] |
| 71 | + timeout-minutes: 240 |
| 72 | + runs-on: [self-hosted, ubuntu-20.04, highmem] |
| 73 | + if: | |
| 74 | + github.event_name == 'push' || |
| 75 | + github.event_name == 'pull_request_target' || |
| 76 | + (github.event_name == 'schedule' && github.repository == 'apache/beam') || |
| 77 | + github.event_name == 'workflow_dispatch' || |
| 78 | + github.event.comment.body == 'Run Java_PVR_Flink_Batch PostCommit' |
| 79 | + steps: |
| 80 | + - uses: actions/checkout@v4 |
| 81 | + - name: Setup repository |
| 82 | + uses: ./.github/actions/setup-action |
| 83 | + with: |
| 84 | + comment_phrase: ${{ matrix.job_phrase }} |
| 85 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 86 | + github_job: ${{ matrix.job_name }} (${{ matrix.job_phrase }}) |
| 87 | + - name: Setup environment |
| 88 | + uses: ./.github/actions/setup-environment-action |
| 89 | + - name: run validatesPortableRunnerBatch script |
| 90 | + uses: ./.github/actions/gradle-command-self-hosted-action |
| 91 | + with: |
| 92 | + gradle-command: :runners:flink:1.20:job-server:validatesPortableRunnerBatchDataSet |
| 93 | + env: |
| 94 | + CLOUDSDK_CONFIG: ${{ env.KUBELET_GCLOUD_CONFIG_PATH }} |
| 95 | + - name: Archive JUnit Test Results |
| 96 | + uses: actions/upload-artifact@v4 |
| 97 | + if: ${{ !success() }} |
| 98 | + with: |
| 99 | + name: JUnit Test Results |
| 100 | + path: "**/build/reports/tests/" |
| 101 | + - name: Upload test report |
| 102 | + uses: actions/upload-artifact@v4 |
| 103 | + with: |
| 104 | + name: java-code-coverage-report |
| 105 | + path: "**/build/test-results/**/*.xml" |
| 106 | +# TODO: Investigate 'Max retries exceeded' issue with EnricoMi/publish-unit-test-result-action@v2. |
0 commit comments