-
Notifications
You must be signed in to change notification settings - Fork 101
93 lines (85 loc) · 2.79 KB
/
end-to-end-testing.yml
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
name: End-to-End Tests
on:
push:
branches:
- main
paths:
- "pom.xml"
- "Dockerfile"
- "backend/**"
- "ui/**"
- ".github/workflows/end-to-end-testing.yml"
pull_request:
branches:
- main
paths:
- "pom.xml"
- "Dockerfile"
- "backend/**"
- "ui/**"
- ".github/workflows/end-to-end-testing.yml"
jobs:
e2e-test:
runs-on: ubuntu-latest
services:
dbzui-zookeeper:
image: quay.io/debezium/zookeeper:latest
dbzui-kafka:
image: quay.io/debezium/kafka:latest
ports:
- 9092:9092
env:
ZOOKEEPER_CONNECT: dbzui-zookeeper:2181
dbzui-postgres:
image: quay.io/debezium/example-postgres:latest
ports:
- 65432:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
dbzui-connect:
image: quay.io/debezium/connect:nightly
ports:
- 8083:8083
env:
ENABLE_DEBEZIUM_SCRIPTING: true
CONNECT_REST_EXTENSION_CLASSES: io.debezium.kcrestextension.DebeziumConnectRestExtension
BOOTSTRAP_SERVERS: dbzui-kafka:9092
GROUP_ID: 1
CONFIG_STORAGE_TOPIC: my_connect_configs
OFFSET_STORAGE_TOPIC: my_connect_offsets
STATUS_STORAGE_TOPIC: my_connect_statuses
steps:
- name: Checkout Debezium UI
uses: actions/checkout@v3
- name: Build Debezium UI container
run: DOCKER_BUILDKIT=1 docker build --cache-from debezium/debezium-ui --file ./Dockerfile --tag dbzui-backend:${GITHUB_SHA} .
- name: Run Debezium UI container
run: docker run --rm --name dbzui-container -d -p 8080:8080 --network=$(docker network ls -f name=^github_network_ --format "{{.Name}}") -e KAFKA_CONNECT_URIS=http://dbzui-connect:8083 dbzui-backend:${GITHUB_SHA}
- name: Install deps and build (with cache)
uses: bahmutov/npm-install@v1
with:
useLockFile: false
install-command: npm install
working-directory: ./ui
- name: End-to-End Test Debezium UI
uses: cypress-io/github-action@v5
with:
# we have already installed everything
install: false
working-directory: ./ui
- name: upload Cypress screenshots for failed tests
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: ui/cypress/screenshots
# Test run video was always captured, so this action uses "always()" condition
- name: upload Cypress test run video
uses: actions/upload-artifact@v3
if: always()
with:
name: cypress-videos
path: ui/cypress/videos
- name: Stop Debezium UI container
run: docker rm -f dbzui-container