From d27c6f0bf50bc6a7c7cd875463c2f1b43bbb24e5 Mon Sep 17 00:00:00 2001 From: Marco Robles Date: Wed, 28 Sep 2022 11:05:31 -0500 Subject: [PATCH 1/4] postcommit py io jdbc --- .../job-postcommit-python-io-jdbc.yml | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 .github/workflows/job-postcommit-python-io-jdbc.yml diff --git a/.github/workflows/job-postcommit-python-io-jdbc.yml b/.github/workflows/job-postcommit-python-io-jdbc.yml new file mode 100644 index 000000000000..ef3f2079efd9 --- /dev/null +++ b/.github/workflows/job-postcommit-python-io-jdbc.yml @@ -0,0 +1,80 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# Test for Python Postcommit IO JDBC + + +name: Python Postcommit IO JDBC +on: + workflow_dispatch: + schedule: + - cron: '0 */6 * * *' + push: + branches: ['master', 'release-*'] + tags: ['v*'] + paths: [ 'sdks/python/apache_beam/io/external/xlang_jdbcio_it_test.py'] + pull_request: + branches: [ 'master', 'release-*'] + tags: [ 'v*' ] +permissions: read-all + +env: + tests: 'sdks/python/apache_beam/io/external/xlang_jdbcio_it_test.py' + +jobs: + set-properties: + runs-on: [self-hosted, ubuntu-20.04] + outputs: + properties: ${{ steps.test-properties.outputs.properties }} + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + persist-credentials: false + submodules: recursive + - id: test-properties + uses: ./.github/actions/setup-default-test-properties + + py_io_jdbc: + needs: set-properties + name: Python IO JDBC + runs-on: [self-hosted, ubuntu-20.04] + strategy: + fail-fast: false + matrix: + version: ${{fromJson(needs.set-properties.outputs.properties).PythonTestProperties.ALL_SUPPORTED_VERSIONS}} + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + persist-credentials: false + submodules: recursive + - name: Set python version and tox env + run: | + echo "PYTHON_VERSION=$(echo ${{ matrix.version }} | sed -e 's/\.//g')" >> $GITHUB_ENV + - name: Setup environment + uses: ./.github/actions/setup-self-hosted-action + - name: Run :sdks:python:test-suites:tox:${{ env.PYTHON_VERSION }}:testPy${{ env.PYTHON_VERSION }}Cloud + uses: ./.github/actions/gradle-command-self-hosted-action + with: + gradle-command: :sdks:python:test-suites:tox:py${{ env.PYTHON_VERSION }}:testPy${{ env.PYTHON_VERSION }}Cloud + arguments: "-Pposargs=${{env.tests}}" + - name: Run :sdks:python:test-suites:tox:y${{ env.PYTHON_VERSION }}:testPy${{ env.PYTHON_VERSION }}Cython + uses: ./.github/actions/gradle-command-self-hosted-action + with: + gradle-command: :sdks:python:test-suites:tox:py${{ env.PYTHON_VERSION }}:testPy${{ env.PYTHON_VERSION }}Cython + arguments: "-Pposargs=${{env.tests}}" \ No newline at end of file From c642c0e6e4c0a00ed66c6088105522bc8c1629d5 Mon Sep 17 00:00:00 2001 From: Marco Robles Date: Thu, 29 Sep 2022 15:26:06 -0500 Subject: [PATCH 2/4] fix jdbc job and modify CI file --- .github/workflows/job-postcommit-python-io-jdbc.yml | 3 --- CI.md | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/job-postcommit-python-io-jdbc.yml b/.github/workflows/job-postcommit-python-io-jdbc.yml index ef3f2079efd9..599af00eacb1 100644 --- a/.github/workflows/job-postcommit-python-io-jdbc.yml +++ b/.github/workflows/job-postcommit-python-io-jdbc.yml @@ -27,9 +27,6 @@ on: branches: ['master', 'release-*'] tags: ['v*'] paths: [ 'sdks/python/apache_beam/io/external/xlang_jdbcio_it_test.py'] - pull_request: - branches: [ 'master', 'release-*'] - tags: [ 'v*' ] permissions: read-all env: diff --git a/CI.md b/CI.md index ee911584f7f0..411b3bf2d479 100644 --- a/CI.md +++ b/CI.md @@ -140,7 +140,7 @@ Service Account shall have following permissions ([IAM roles](https://cloud.goog ### PostCommit Workflows | Workflow | Description | Requires GCP Credentials | |------------------------------------------------------------------------------------|-------------------------|--------------------------| -| [job-postcommit-placeholder.yml](.github/workflows/job-postcommit-placeholder.yml) | Description placeholder | Yes/No | +| [job-postcommit-python-io-jdbc.yml](.github/workflows/job-postcommit-python-io-jdbc.yml) | Run Python Postcommit IO JDBC XLang Test | Yes/No | ### GitHub Action Tips From 00eae8d87ee5a3c91d55abec3383c146fb76e39c Mon Sep 17 00:00:00 2001 From: Marco Robles Date: Sat, 1 Oct 2022 10:23:18 -0500 Subject: [PATCH 3/4] update yml job file --- .github/workflows/job-postcommit-python-io-jdbc.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/job-postcommit-python-io-jdbc.yml b/.github/workflows/job-postcommit-python-io-jdbc.yml index 599af00eacb1..4e8d57f08a48 100644 --- a/.github/workflows/job-postcommit-python-io-jdbc.yml +++ b/.github/workflows/job-postcommit-python-io-jdbc.yml @@ -42,7 +42,6 @@ jobs: uses: actions/checkout@v3 with: persist-credentials: false - submodules: recursive - id: test-properties uses: ./.github/actions/setup-default-test-properties @@ -59,7 +58,6 @@ jobs: uses: actions/checkout@v3 with: persist-credentials: false - submodules: recursive - name: Set python version and tox env run: | echo "PYTHON_VERSION=$(echo ${{ matrix.version }} | sed -e 's/\.//g')" >> $GITHUB_ENV From 2e5281d123e8c5d6ee9a130e4f4b70b199cf5785 Mon Sep 17 00:00:00 2001 From: Marco Robles Date: Mon, 17 Oct 2022 15:03:11 -0500 Subject: [PATCH 4/4] trigger path removed --- .github/workflows/job-postcommit-python-io-jdbc.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/job-postcommit-python-io-jdbc.yml b/.github/workflows/job-postcommit-python-io-jdbc.yml index 4e8d57f08a48..17c73ec9dc9f 100644 --- a/.github/workflows/job-postcommit-python-io-jdbc.yml +++ b/.github/workflows/job-postcommit-python-io-jdbc.yml @@ -26,7 +26,6 @@ on: push: branches: ['master', 'release-*'] tags: ['v*'] - paths: [ 'sdks/python/apache_beam/io/external/xlang_jdbcio_it_test.py'] permissions: read-all env: