|
| 1 | +name: pr-chronon-integration-tests |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + types: |
| 6 | + - opened |
| 7 | + - synchronize |
| 8 | + - labeled |
| 9 | + paths: |
| 10 | + - "sdk/python/feast/infra/online_stores/chronon_online_store/**" |
| 11 | + - "sdk/python/feast/infra/offline_stores/contrib/chronon_offline_store/**" |
| 12 | + - "sdk/python/feast/infra/chronon_provider.py" |
| 13 | + - "sdk/python/tests/unit/infra/online_stores/chronon_online_store/**" |
| 14 | + - "sdk/python/tests/unit/infra/offline_stores/contrib/chronon_offline_store/**" |
| 15 | + - "sdk/python/tests/unit/examples/test_chronon_demo.py" |
| 16 | + - "sdk/python/tests/unit/infra/scripts/test_chronon_local_service_script.py" |
| 17 | + - "examples/chronon/**" |
| 18 | + - "sdk/python/tests/integration/online_store/test_chronon_online_store.py" |
| 19 | + - "sdk/python/tests/integration/online_store/test_chronon_online_store_real_service.py" |
| 20 | + - "sdk/python/tests/integration/offline_store/test_chronon_offline_store.py" |
| 21 | + - "infra/scripts/chronon/**" |
| 22 | + - "chronon/**" |
| 23 | + - ".github/workflows/pr_chronon_integration_tests.yml" |
| 24 | + |
| 25 | +concurrency: |
| 26 | + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} |
| 27 | + cancel-in-progress: true |
| 28 | + |
| 29 | +jobs: |
| 30 | + chronon-python-tests: |
| 31 | + if: |
| 32 | + ((github.event.action == 'labeled' && (github.event.label.name == 'approved' || github.event.label.name == 'lgtm' || github.event.label.name == 'ok-to-test')) || |
| 33 | + (github.event.action != 'labeled' && (contains(github.event.pull_request.labels.*.name, 'ok-to-test') || contains(github.event.pull_request.labels.*.name, 'approved') || contains(github.event.pull_request.labels.*.name, 'lgtm')))) && |
| 34 | + github.event.pull_request.base.repo.full_name == 'feast-dev/feast' |
| 35 | + # The Chronon quickstart image is published for ARM64 only. |
| 36 | + runs-on: ubuntu-24.04-arm |
| 37 | + steps: |
| 38 | + - uses: actions/checkout@v4 |
| 39 | + with: |
| 40 | + repository: ${{ github.event.repository.full_name }} |
| 41 | + ref: ${{ github.ref }} |
| 42 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 43 | + - name: Setup Python |
| 44 | + uses: actions/setup-python@v5 |
| 45 | + with: |
| 46 | + python-version: "3.11" |
| 47 | + architecture: arm64 |
| 48 | + - name: Install uv |
| 49 | + uses: astral-sh/setup-uv@v5 |
| 50 | + with: |
| 51 | + enable-cache: true |
| 52 | + - name: Setup Java |
| 53 | + uses: actions/setup-java@v4 |
| 54 | + with: |
| 55 | + distribution: temurin |
| 56 | + java-version: "8" |
| 57 | + - name: Setup sbt |
| 58 | + uses: sbt/setup-sbt@v1 |
| 59 | + - name: Install dependencies |
| 60 | + run: make install-python-dependencies-ci |
| 61 | + - name: Run Chronon unit tests |
| 62 | + run: | |
| 63 | + uv run pytest -c sdk/python/pytest.ini \ |
| 64 | + sdk/python/tests/unit/infra/online_stores/chronon_online_store \ |
| 65 | + sdk/python/tests/unit/infra/offline_stores/contrib/chronon_offline_store \ |
| 66 | + sdk/python/tests/unit/examples/test_chronon_demo.py \ |
| 67 | + sdk/python/tests/unit/infra/scripts/test_chronon_local_service_script.py |
| 68 | + - name: Run Chronon stub integration tests |
| 69 | + run: | |
| 70 | + uv run pytest -c sdk/python/pytest.ini \ |
| 71 | + sdk/python/tests/integration/online_store/test_chronon_online_store.py \ |
| 72 | + sdk/python/tests/integration/offline_store/test_chronon_offline_store.py \ |
| 73 | + --integration |
| 74 | + - name: Checkout Chronon |
| 75 | + env: |
| 76 | + CHRONON_REPO: ${{ github.workspace }}/.chronon |
| 77 | + CHRONON_REPO_URL: https://github.com/airbnb/chronon.git |
| 78 | + CHRONON_REF: 6c0b8de9f0301521baf61a46ff3083c566fb4052 # pragma: allowlist secret |
| 79 | + run: | |
| 80 | + git clone "${CHRONON_REPO_URL}" "${CHRONON_REPO}" |
| 81 | + git -C "${CHRONON_REPO}" checkout "${CHRONON_REF}" |
| 82 | + - name: Install Chronon build dependencies |
| 83 | + run: | |
| 84 | + sudo apt-get update |
| 85 | + sudo apt-get install -y \ |
| 86 | + apt-transport-https \ |
| 87 | + autoconf \ |
| 88 | + automake \ |
| 89 | + bison \ |
| 90 | + build-essential \ |
| 91 | + ca-certificates \ |
| 92 | + curl \ |
| 93 | + flex \ |
| 94 | + g++ \ |
| 95 | + gnupg \ |
| 96 | + libtool \ |
| 97 | + pkg-config \ |
| 98 | + python3-pip \ |
| 99 | + python3-venv |
| 100 | + curl -fsSL --retry 3 --connect-timeout 15 \ |
| 101 | + "https://github.com/apache/thrift/archive/refs/tags/v0.13.0.tar.gz" \ |
| 102 | + -o /tmp/thrift.tar.gz |
| 103 | + sudo rm -rf /usr/src/thrift |
| 104 | + sudo mkdir -p /usr/src/thrift |
| 105 | + sudo tar zxf /tmp/thrift.tar.gz -C /usr/src/thrift --strip-components=1 |
| 106 | + cd /usr/src/thrift |
| 107 | + sudo ./bootstrap.sh |
| 108 | + sudo ./configure --disable-libs --disable-tests --disable-tutorial |
| 109 | + sudo make -j2 |
| 110 | + sudo make install |
| 111 | + python3 -m pip install --break-system-packages build |
| 112 | + thrift -version |
| 113 | + - name: Build Chronon quickstart and service jars |
| 114 | + env: |
| 115 | + CHRONON_REPO: ${{ github.workspace }}/.chronon |
| 116 | + run: | |
| 117 | + cd "${CHRONON_REPO}/quickstart/mongo-online-impl" |
| 118 | + sbt assembly |
| 119 | + cd "${CHRONON_REPO}" |
| 120 | + sbt "project service" assembly |
| 121 | + - name: Start live Chronon service |
| 122 | + env: |
| 123 | + CHRONON_REPO: ${{ github.workspace }}/.chronon |
| 124 | + run: infra/scripts/chronon/start-local-chronon-service.sh |
| 125 | + - name: Run Chronon live-service integration test |
| 126 | + env: |
| 127 | + CHRONON_SERVICE_URL: http://127.0.0.1:9000 |
| 128 | + run: | |
| 129 | + uv run pytest -c sdk/python/pytest.ini \ |
| 130 | + sdk/python/tests/integration/online_store/test_chronon_online_store_real_service.py \ |
| 131 | + --integration |
| 132 | + - name: Stop live Chronon service |
| 133 | + if: always() |
| 134 | + run: infra/scripts/chronon/stop-local-chronon-service.sh |
0 commit comments