-
Notifications
You must be signed in to change notification settings - Fork 1.3k
112 lines (109 loc) · 3.51 KB
/
docker_smoke_tests.yml
File metadata and controls
112 lines (109 loc) · 3.51 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
name: docker-smoke-tests
on:
pull_request:
paths:
- "sdk/python/feast/infra/feature_servers/multicloud/**"
- "sdk/python/feast/feature_server.py"
- "infra/scripts/feature_server_docker_smoke.py"
- "Makefile"
- ".github/workflows/publish_images.yml"
- ".github/workflows/docker_smoke_tests.yml"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
feature-server-docker-smoke:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch: [amd64, arm64]
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
install: true
- name: Build feature-server image
env:
ARCH: ${{ matrix.arch }}
run: |
make build-feature-server-docker REGISTRY=feastdev VERSION=smoke-${ARCH} DOCKER_PLATFORMS=linux/${ARCH}
- name: Run container
env:
ARCH: ${{ matrix.arch }}
run: |
docker run -d --rm \
--name feature-server-smoke-${ARCH} \
--platform linux/${ARCH} \
-p 6566:6566 \
-v "${GITHUB_WORKSPACE}/infra/scripts/feature_server_docker_smoke.py:/smoke.py:ro" \
feastdev/feature-server:smoke-${ARCH} \
python /smoke.py
- name: Wait for /health
run: |
for i in $(seq 1 60); do
if curl -fsS http://localhost:6566/health >/dev/null; then
exit 0
fi
sleep 2
done
echo "feature-server /health did not become ready"
docker logs feature-server-smoke-${{ matrix.arch }} || true
exit 1
- name: Cleanup
if: always()
env:
ARCH: ${{ matrix.arch }}
run: |
docker stop feature-server-smoke-${ARCH} || true
feature-server-dev-docker-smoke:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch: [amd64, arm64]
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
install: true
- name: Build feature-server-dev image
env:
ARCH: ${{ matrix.arch }}
run: |
make build-feature-server-dev-docker REGISTRY=feastdev VERSION=smoke-${ARCH} DOCKER_PLATFORMS=linux/${ARCH}
- name: Run container
env:
ARCH: ${{ matrix.arch }}
run: |
docker run -d --rm \
--name feature-server-dev-smoke-${ARCH} \
--platform linux/${ARCH} \
-p 6566:6566 \
-v "${GITHUB_WORKSPACE}/infra/scripts/feature_server_docker_smoke.py:/smoke.py:ro" \
feastdev/feature-server:smoke-${ARCH} \
python /smoke.py
- name: Wait for /health
run: |
for i in $(seq 1 60); do
if curl -fsS http://localhost:6566/health >/dev/null; then
exit 0
fi
sleep 2
done
echo "feature-server /health did not become ready"
docker logs feature-server-dev-smoke-${{ matrix.arch }} || true
exit 1
- name: Cleanup
if: always()
env:
ARCH: ${{ matrix.arch }}
run: |
docker stop feature-server-dev-smoke-${ARCH} || true