-
Notifications
You must be signed in to change notification settings - Fork 28
74 lines (67 loc) · 1.92 KB
/
run-e2e-tests.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
name: e2e Tests
on: [pull_request]
jobs:
run-e2e-tests:
name: Run e2e Tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres:13
ports:
- 5432:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: docker
POSTGRES_DB: app
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
zookeeper:
image: bitnami/zookeeper:3
ports:
- 2181:2181
env:
ALLOW_ANONYMOUS_LOGIN: yes
options: >-
--health-cmd "nc -z localhost 2181 || exit -1"
--health-interval 10s
--health-timeout 5s
--health-retries 10
kafka:
image: bitnami/kafka:2
ports:
- 9092:9092
env:
KAFKA_CFG_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_CFG_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
ALLOW_PLAINTEXT_LISTENER: yes
KAFKA_ADVERTISED_HOST_NAME: localhost
options: >-
--health-cmd "kafka-topics.sh --bootstrap-server 127.0.0.1:9092 --list"
--health-interval 10s
--health-timeout 10s
--health-retries 50
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies (with cache)
uses: bahmutov/npm-install@v1
- name: Run Tests
run: yarn test:e2e
env:
DATABASE_HOST: localhost
DATABASE_PORT: 5432
DATABASE_USER: postgres
DATABASE_PASS: docker
DATABASE_NAME: app
JWT_PUBLIC_KEY: ${{secrets.JWT_DUMMY_PUBLIC}}
JWT_SECRET_KEY: ${{secrets.JWT_DUMMY_PRIVATE}}