-
Notifications
You must be signed in to change notification settings - Fork 9
170 lines (160 loc) · 4.93 KB
/
review.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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
name: Review - Full Test Suite (on pull)
on:
pull_request:
workflow_dispatch:
inputs:
node:
required: false
description: 'A node version (e.g 10.16.0)'
default: '16'
jobs:
full-tests:
name: Full Tests
runs-on: ubuntu-latest
# Docker Hub image that `container-job` executes (our runner)
container:
image: ghcr.io/${{ github.repository }}/node-agent-runner:latest
env:
# tests run against a "local" udp "collector"
APPOPTICS_LOG_SETTINGS: error,warn,patching,bind,debug
APPOPTICS_COLLECTOR: localhost:7832
APPOPTICS_REPORTER: udp
APPOPTICS_SERVICE_KEY: ${{ secrets.APPOPTICS_SERVICE_KEY }}
AO_TEST_SERVICE_KEY: ${{ secrets.AO_TEST_SERVICE_KEY }}
AO_TEST_COLLECTOR: ${{ secrets.AO_TEST_COLLECTOR }}
AO_TEST_CASSANDRA_2_2: cassandra:9042
AO_TEST_MEMCACHED_1_4: memcached:11211
AO_TEST_MONGODB_2_4: mongo_2_4:27017
AO_TEST_MONGODB_2_6: mongo_2_6:27017
AO_TEST_MONGODB_3_0: mongo_3_0:27017
AO_TEST_SQLSERVER_EX: mssql:1433
AO_TEST_MYSQL: mysql:3306
AO_TEST_ORACLE: oracle:1521
AO_TEST_POSTGRES: postgres:5432
AO_TEST_RABBITMQ_3_5: rabbitmq:5672
AO_TEST_REDIS_3_0: redis:6379
# Service containers to run with runner-job`
services:
cassandra:
image: cassandra:2
options: >-
--health-cmd "nodetool ring"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- "9042:9042"
memcached:
image: memcached
options: >-
--health-cmd "timeout 5 bash -c 'cat < /dev/null > /dev/udp/127.0.0.1/11211'"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- "11211:11211"
mongo_2_4:
image: mongo:2.4
options: >-
--health-cmd "mongo --quiet --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 2)'"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# host:container
- "27016:27017"
mongo_2_6:
image: mongo:2.6
options: >-
--health-cmd "mongo --quiet --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 2)'"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- "27017:27017"
mongo_3_0:
image: mongo:3
options: >-
--health-cmd "mongo --quiet --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 2)'"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# host:container
- "27018:27017"
mssql:
image: "mcr.microsoft.com/mssql/server:2017-CU8-ubuntu"
options: >-
--health-cmd "/opt/mssql-tools/bin/sqlcmd -U sa -P $SA_PASSWORD -Q 'select 1' -b -o /dev/null"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- "1433:1433"
env:
ACCEPT_EULA: true
SA_PASSWORD: MeetSQL2017requirements!
mysql:
image: "mysql:5.7.13"
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
MYSQL_ROOT_PASSWORD: admin
ports:
- "3306:3306"
oracle:
image: "traceqa/oracle-express" # traceqa is a SolarWinds account
ports:
- "1521:1521"
postgres:
image: "postgres"
options: >-
--health-cmd "pg_isready"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- "5432:5432"
env:
# sets password to this so make pg.test.js agree
POSTGRES_PASSWORD: xyzzy
rabbitmq:
image: rabbitmq:3-management
options: >-
--health-cmd "rabbitmq-diagnostics -q ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- "5672:5672"
- "5671:5671"
redis:
image: redis
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- name: Checkout ${{ github.ref }}
uses: actions/checkout@v2
- name: Setup Node ${{ github.event.inputs.node || '16' }}
uses: actions/setup-node@v2
with:
node-version: ${{ github.event.inputs.node || '16' }}
- name: Show Environment Info
run: |
printenv
node --version
npm --version
cat /etc/os-release
- name: NPM Install
run: npm install --unsafe-perm
- name: Run Full Test Suite
run: npm test