-
Notifications
You must be signed in to change notification settings - Fork 4
148 lines (131 loc) · 3.91 KB
/
test-edot.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
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
# Test "packages/opentelemetry-node" (a.k.a. EDOT Node.js).
name: test-edot
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'packages/opentelemetry-node/**'
- '.github/workflows/test-edot.yml'
pull_request:
branches:
- main
paths:
- 'packages/opentelemetry-node/**'
- '.github/workflows/test-edot.yml'
# Cancel jobs running for old commits on a PR. Allow concurrent runs on 'main'.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
permissions:
contents: read
jobs:
test-vers:
strategy:
fail-fast: false
matrix:
node:
- '23'
- '22'
- '22.0'
- '20'
- '20.6.0'
- '18'
- '18.19.0'
runs-on: ubuntu-24.04
services:
cassandra:
image: cassandra:3
env:
MAX_HEAP_SIZE: "1G"
HEAP_NEWSIZE: 400m
ports:
- "9042:9042"
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.17.1
env:
ES_JAVA_OPTS: '-Xms512m -Xmx512m'
network.host: '_site_'
transport.host: '127.0.0.1'
http.host: '0.0.0.0'
xpack.security.enabled: 'false'
ports:
- 9200:9200
kafka:
image: bitnami/kafka:3.4
env:
KAFKA_CFG_PROCESS_ROLES: 'broker,controller'
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
KAFKA_CFG_LISTENERS: 'PLAINTEXT://:9092,CONTROLLER://:9093,EXTERNAL://:9094'
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: 'CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,EXTERNAL:PLAINTEXT'
KAFKA_CFG_ADVERTISED_LISTENERS: 'PLAINTEXT://127.0.0.1:9092,EXTERNAL://kafka_b:9094'
KAFKA_BROKER_ID: '1'
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: '[email protected]:9093'
ALLOW_PLAINTEXT_LISTENER: 'yes'
KAFKA_CFG_NODE_ID: '1'
KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
BITNAMI_DEBUG: 'yes'
KAFKA_CFG_NUM_PARTITIONS: '2'
ports:
- "9092:9092"
- "9094:9094"
mongodb:
image: mongo:7
ports:
- 27017:27017
mssql:
image: mcr.microsoft.com/mssql/server:2022-latest
env:
ACCEPT_EULA: 'Y'
MSSQL_SA_PASSWORD: 'Very(!)Secure'
ports:
- "1433:1433"
mysql:
image: mysql:5.7
ports:
- 3306:3306
env:
MYSQL_ALLOW_EMPTY_PASSWORD: 1
# Disabled until https://github.com/ollama/ollama/issues/8400 is resolved.
# ollama:
# # A light fork of Ollama to float some in-progress contributions related
# # to more closely matching OpenAI behavior.
# image: ghcr.io/elastic/ollama/ollama:testing
# # image: ollama/ollama:0.5.7
# ports:
# - 11434:11434
postgres:
image: postgres:16
ports:
- "5432:5432"
env:
POSTGRES_HOST_AUTH_METHOD: 'trust'
POSTGRES_USER: 'postgres'
rabbitmq:
image: rabbitmq:3
env:
RABBITMQ_DEFAULT_USER: "username"
RABBITMQ_DEFAULT_PASS: "password"
ports:
- "22221:5672"
redis:
image: redis:7
ports:
- 6379:6379
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Update npm to a version that supports package-lock lockfileVersion=2.
if: ${{ startsWith(matrix.node, '14') }}
run: npm install -g npm@9 # npm@9 supports node >=14.17.0
- name: npm ci in mockotlpserver package, used in EDOT tests
run: npm ci
working-directory: packages/mockotlpserver
- run: npm ci
working-directory: packages/opentelemetry-node
- run: npm test
working-directory: packages/opentelemetry-node
# TODO: test-windows eventually