-
Notifications
You must be signed in to change notification settings - Fork 107
155 lines (142 loc) · 5.19 KB
/
test-adapters.yml
File metadata and controls
155 lines (142 loc) · 5.19 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
name: Adapter Tests
on:
workflow_call:
workflow_dispatch:
inputs:
run_id:
description: "ID of the workflow run that uploaded the artifact"
required: true
jobs:
adapter-tests:
if: ${{ !contains(vars.CI_SKIP_JOBS, 'adapter-tests') }}
name: Test Adapters
strategy:
matrix:
include:
- runner: [k8s-runners-amd64]
arch: x86_64
target: x86_64-unknown-linux-gnu
- runner: [k8s-runners-arm64]
arch: aarch64
target: aarch64-unknown-linux-gnu
runs-on: ${{ matrix.runner }}
container:
image: ghcr.io/feldera/feldera-dev:sha-db53e1302c944e29edd6d2af516fff7032b90e3b
services:
postgres:
image: postgres:15
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: postgres
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 5
redpanda:
image: ghcr.io/feldera/redpanda-ci:v24
options: >-
--health-cmd "rpk cluster health"
--health-interval 10s
--health-timeout 5s
--health-retries 10
--cpuset-cpus 0-1
redis:
image: redis:7-alpine
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download Test Binaries
uses: actions/download-artifact@v4
with:
name: feldera-test-binaries-${{ matrix.target }}
path: build
run-id: ${{ github.event.inputs.run_id || github.run_id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
# Remove if https://github.com/actions/upload-artifact/issues/38 ever gets fixed
- name: Make binaries executable
run: chmod +x ./build/*
- name: Setup uv
uses: astral-sh/setup-uv@v5
with:
version: "0.6.5"
- name: Install python deps
run: |
uv venv
uv pip install -r ../iceberg/src/test/requirements.ci.txt
working-directory: crates/adapters
# Pubsub tests are only supported on x86_64, see below
- name: Run adapters tests
if: ${{ vars.CI_DRY_RUN != 'true' }}
run: |
source .venv/bin/activate
../../build/dbsp_adapters-* --skip pubsub
working-directory: crates/adapters
shell: bash
env:
RUST_BACKTRACE: 1
RUST_TEST_THREADS: 16
REDIS_URL: redis://localhost:6379/0
POSTGRES_URL: postgres://postgres:password@localhost:5432
REDPANDA_BROKERS: 127.0.0.1
# This thing can't resolve `localhost` (?), needs to be an IP address
PUBSUB_EMULATOR_HOST: 127.0.0.1:8681
ICEBERG_TEST_AWS_ACCESS_KEY_ID: ${{ secrets.delta_table_test_aws_access_key_id }}
ICEBERG_TEST_AWS_SECRET_ACCESS_KEY: ${{ secrets.delta_table_test_aws_secret_access_key }}
DELTA_TABLE_TEST_AWS_ACCESS_KEY_ID: ${{ secrets.delta_table_test_aws_access_key_id }}
DELTA_TABLE_TEST_AWS_SECRET_ACCESS_KEY: ${{ secrets.delta_table_test_aws_secret_access_key }}
POSTGRES_SSL_URL: postgres://postgres:${{ secrets.ci_postgres_password }}@ci-postgres-internal.postgres.svc.cluster.local:5432/postgres?sslmode=require
POSTGRES_SSL_CA_PEM: ${{ secrets.ci_postgres_tls_crt }}
POSTGRES_SSL_VERIFY_HOSTNAME: "false"
- name: Show Kubernetes node
if: always()
run: |
echo "K8S node: ${K8S_NODE_NAME}"
# We can't run the pubsub tests on aarch64 because we don't have a
# arm image for the pubsub emulator:
# https://github.com/TheKevJames/tools/issues/453
adapter-tests-pubsub:
if: ${{ !contains(vars.CI_SKIP_JOBS, 'adapter-tests-pubsub') }}
name: Test Adapters (PubSub only)
runs-on: ubuntu-latest-amd64
services:
pubsub:
image: thekevjames/gcloud-pubsub-emulator:e852273e07
ports:
- 8681:8681
options: >-
-e PUBSUB_PROJECT1=feldera-test,test_pubsub_input-0
--health-cmd "nc -z 127.0.0.1 8681"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Show Kubernetes node
if: always()
run: |
echo "K8S node: ${K8S_NODE_NAME}"
- name: Checkout repository
uses: actions/checkout@v4
- name: Download Test Binaries
uses: actions/download-artifact@v4
with:
name: feldera-test-binaries-x86_64-unknown-linux-gnu
path: build
run-id: ${{ github.event.inputs.run_id || github.run_id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
# Remove if https://github.com/actions/upload-artifact/issues/38 ever gets fixed
- name: Make binaries executable
run: chmod +x ./build/*
- name: Run adapters pubsub tests
if: ${{ vars.CI_DRY_RUN != 'true' }}
run: ../../build/dbsp_adapters-* pubsub
working-directory: crates/adapters
env:
RUST_BACKTRACE: 1
PUBSUB_EMULATOR_HOST: 127.0.0.1:8681