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