|
| 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: Sedona Pyflink Test |
| 19 | + |
| 20 | +on: |
| 21 | + push: |
| 22 | + branches: |
| 23 | + - master |
| 24 | + paths: |
| 25 | + - 'common/**' |
| 26 | + - 'flink/**' |
| 27 | + - 'flink-shaded/**' |
| 28 | + - 'pom.xml' |
| 29 | + - 'python/**' |
| 30 | + - '.github/workflows/pyflink.yml' |
| 31 | + pull_request: |
| 32 | + branches: |
| 33 | + - '*' |
| 34 | + paths: |
| 35 | + - 'common/**' |
| 36 | + - 'flink/**' |
| 37 | + - 'flink-shaded/**' |
| 38 | + - 'pom.xml' |
| 39 | + - 'python/**' |
| 40 | + - '.github/workflows/pyflink.yml' |
| 41 | + |
| 42 | +concurrency: |
| 43 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 44 | + cancel-in-progress: true |
| 45 | + |
| 46 | +jobs: |
| 47 | + test: |
| 48 | + runs-on: ubuntu-22.04 |
| 49 | + strategy: |
| 50 | + matrix: |
| 51 | + include: |
| 52 | + - python: '3.10' |
| 53 | + steps: |
| 54 | + - uses: actions/checkout@v4 |
| 55 | + - uses: actions/setup-java@v4 |
| 56 | + with: |
| 57 | + distribution: 'zulu' |
| 58 | + java-version: '8' |
| 59 | + - uses: actions/setup-python@v5 |
| 60 | + with: |
| 61 | + python-version: ${{ matrix.python }} |
| 62 | + - run: sudo apt-get -y install python3-pip python-dev-is-python3 |
| 63 | + - run: mvn package -pl "org.apache.sedona:sedona-flink-shaded_2.12" -am -DskipTests |
| 64 | + - run: sudo pip3 install -U setuptools |
| 65 | + - run: sudo pip3 install -U wheel |
| 66 | + - run: sudo pip3 install -U virtualenvwrapper |
| 67 | + - run: python3 -m pip install uv |
| 68 | + - run: cd python |
| 69 | + - run: rm pyproject.toml |
| 70 | + - run: uv init --no-workspace |
| 71 | + - run: uv add apache-flink==1.20.1 shapely attr setuptools |
| 72 | + - run: uv add pytest --dev |
| 73 | + - run: | |
| 74 | + wget https://repo1.maven.org/maven2/org/datasyslab/geotools-wrapper/1.7.1-28.5/geotools-wrapper-1.7.1-28.5.jar |
| 75 | + export SEDONA_PYFLINK_EXTRA_JARS=${PWD}/$(find flink-shaded/target -name sedona-flink*.jar),${PWD}/geotools-wrapper-1.7.1-28.5.jar |
| 76 | + (cd python; PYTHONPATH=$(pwd) uv run pytest -v -s ./tests/flink) |
0 commit comments