-
Notifications
You must be signed in to change notification settings - Fork 1
109 lines (98 loc) · 3.15 KB
/
test_on_ubuntu.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
# Copyright (c) 2021 SolarWinds, LLC.
# All rights reserved.
name: Run Ruby Tests on Ubuntu (Push Event)
on:
push:
branches-ignore:
- main
paths-ignore:
- 'test/run_tests/Dockerfile_*'
- 'lib/solarwinds_apm/version.rb'
- 'CHANGELOG.md'
workflow_dispatch:
jobs:
ubuntu_test:
name: ubuntu - ruby ${{ matrix.ruby }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: ['3.1', '3.0', '2.7', '2.6']
container:
image: ghcr.io/${{ github.repository }}/apm_ruby_ubuntu
env:
SW_APM_GEM_TEST: true
SW_APM_REPORTER: file
SW_APM_COLLECTOR: /tmp/sw_apm_traces.bson
SW_APM_REPORTER_FILE_SINGLE: false
OBOE_STAGING: true
MONGO_SERVER: "mongo"
RABBITMQ_SERVER: "rabbitmq"
MEMCACHED_SERVER: "memcached"
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_ROOT_PASSWORD: "admin"
MYSQL_HOST: "mysql"
MYSQL_DATABASE: "test_db"
POSTGRES_DB: "test_db"
DOCKER_MYSQL_PASS: "admin"
DOCKER_PSQL_PASS: "postgres"
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
POSTGRES_HOST: "postgres"
QUERY_LOG_FILE: "/tmp/sw_apm_query_logs.txt"
REDIS_PASSWORD: "redis_pass"
TEST_RUNS_TO_FILE: "true"
services:
memcached:
image: memcached:latest
ports:
- 11211:11211
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
rabbitmq:
image: rabbitmq:latest
ports:
- 5672:5672
options: --health-cmd "rabbitmqctl node_health_check" --health-interval 10s --health-timeout 5s --health-retries 5
mongo:
image: mongo:6
ports:
- 27017:27017
options: --health-cmd "mongosh --quiet --eval 'quit(db.runCommand({ping:1}).ok ? 0:2)'" --health-interval 10s --health-timeout 5s --health-retries 5
postgres:
image: postgres:latest
env:
POSTGRES_PASSWORD: "postgres"
POSTGRES_DB: test_db
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
mysql:
image: mariadb:10.9.6
env:
MYSQL_USER: user
MYSQL_PASSWORD: password
MYSQL_DATABASE: test_db
MYSQL_ROOT_PASSWORD: admin
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
steps:
- name: Checkout ${{ github.ref }}
uses: actions/checkout@v4
- name: print some info
run: |
user=`whoami`
pwd=`pwd`
echo "User: $user"
echo "Current dir: $pwd"
echo "Home dir: $HOME"
echo "Branch: ${GITHUB_REF#refs/*/}"
- name: ruby tests
run: |
export HOME=/root
export PUSH_EVENT=REGULAR_PUSH
test/run_tests/ruby_setup.sh
version=`rbenv versions --bare | grep ${{ matrix.ruby }}`
rbenv global $version
echo "testing with ruby version: $version"
test/run_tests/run_tests.sh -r $version