You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by da...@apache.org on 2023/04/21 12:52:12 UTC
[beam] branch master updated: Add GHA workflow to test dependency chages (#26170)
This is an automated email from the ASF dual-hosted git repository.
damccorm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new 37efc5ce4e1 Add GHA workflow to test dependency chages (#26170)
37efc5ce4e1 is described below
commit 37efc5ce4e115f032b777aca21761b043178274e
Author: Anand Inguva <34...@users.noreply.github.com>
AuthorDate: Fri Apr 21 08:52:02 2023 -0400
Add GHA workflow to test dependency chages (#26170)
---
.github/workflows/python_dependency_tests.yml | 52 +++++++++++++++++++++++++++
sdks/python/setup.py | 1 +
2 files changed, 53 insertions(+)
diff --git a/.github/workflows/python_dependency_tests.yml b/.github/workflows/python_dependency_tests.yml
new file mode 100644
index 00000000000..daf30b4bae9
--- /dev/null
+++ b/.github/workflows/python_dependency_tests.yml
@@ -0,0 +1,52 @@
+name: Python Dependency Tests
+
+on:
+ schedule:
+ - cron: '10 2 * * *'
+ pull_request:
+ branches: ['master', 'release-*']
+ tags: 'v*'
+ # paths where Beam Python's dependencies are configured.
+ paths: ['sdks/python/setup.py', 'sdks/python/build-requirements.txt', 'sdks/python/container/base_image_requirements_manual.txt']
+
+# This allows a subsequently queued workflow run to interrupt previous runs
+concurrency:
+ group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
+ cancel-in-progress: true
+
+jobs:
+
+ python_dependency_tests:
+ permissions:
+ issues: write
+ name: 'Python Dependency Tests'
+ runs-on: ${{matrix.os}}
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ubuntu-latest]
+ params: [
+ {"py_ver": "3.7", "py_env": "py37"},
+ {"py_ver": "3.8", "py_env": "py38"},
+ {"py_ver": "3.9", "py_env": "py39"},
+ {"py_ver": "3.10", "py_env": "py310" },
+ { "py_ver": "3.11", "py_env": "py311" },
+ ]
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v3
+ - name: Install python
+ uses: actions/setup-python@v4
+ with:
+ python-version: ${{ matrix.params.py_ver }}
+ - name: Install Build dependencies
+ working-directory: ./sdks/python
+ run: pip install -r build-requirements.txt
+ - name: Install base_image_requirements.txt
+ working-directory: ./sdks/python
+ run: pip install --no-deps -r container/${{ matrix.params.py_env }}/base_image_requirements.txt
+ - name: Install Apache Beam
+ working-directory: ./sdks/python
+ run: pip install --no-deps -v -e .[test,gcp,interactive,dataframe,aws,azure]
+ - name: Run pip check
+ run: pip check || (echo "Workflow failed. It can be due to conflicting dependencies or does not include required Beam's dependencies. If Beam dependencies have changed, you need to regenerate base_image_requirements.txt. See https://s.apache.org/beam-python-requirements-generate" && exit 1)
diff --git a/sdks/python/setup.py b/sdks/python/setup.py
index 9969af7e76a..13405c77afe 100644
--- a/sdks/python/setup.py
+++ b/sdks/python/setup.py
@@ -243,6 +243,7 @@ if __name__ == '__main__':
'objsize>=0.6.1,<0.7.0',
'pymongo>=3.8.0,<5.0.0',
'proto-plus>=1.7.1,<2',
+
# use a tighter upper bound in protobuf dependency
# to make sure the minor version at job submission
# does not exceed the minor version at runtime.