solarwinds_apm 5.1.3 → 5.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +9 -2
  3. data/CHANGELOG.md +27 -0
  4. data/README.md +5 -3
  5. data/ext/oboe_metal/extconf.rb +18 -6
  6. data/ext/oboe_metal/extconf_local.rb +1 -1
  7. data/ext/oboe_metal/lib/liboboe-1.0-aarch64.so.sha256 +1 -0
  8. data/ext/oboe_metal/lib/liboboe-1.0-alpine-aarch64.so.sha256 +1 -0
  9. data/ext/oboe_metal/lib/liboboe-1.0-alpine-x86_64.so.sha256 +1 -0
  10. data/ext/oboe_metal/lib/liboboe-1.0-x86_64.so.sha256 +1 -0
  11. data/ext/oboe_metal/src/VERSION +1 -1
  12. data/ext/oboe_metal/src/oboe.h +2 -2
  13. data/ext/oboe_metal/src/oboe_api.cpp +4 -0
  14. data/lib/rails/generators/solarwinds_apm/install_generator.rb +2 -2
  15. data/lib/rails/generators/solarwinds_apm/templates/solarwinds_apm_initializer.rb +8 -6
  16. data/lib/solarwinds_apm/inst/curb.rb +1 -0
  17. data/lib/solarwinds_apm/inst/httpclient.rb +1 -0
  18. data/lib/solarwinds_apm/inst/redis.rb +36 -29
  19. data/lib/solarwinds_apm/inst/redis_v4.rb +273 -0
  20. data/lib/solarwinds_apm/inst/typhoeus.rb +1 -1
  21. data/lib/solarwinds_apm/util.rb +134 -42
  22. data/lib/solarwinds_apm/version.rb +1 -1
  23. data/solarwinds_apm.gemspec +5 -3
  24. metadata +7 -15
  25. data/.github/CODEOWNERS +0 -1
  26. data/.github/ISSUE_TEMPLATE/bug-or-feature-request.md +0 -16
  27. data/.github/workflows/build_and_release_gem.yml +0 -108
  28. data/.github/workflows/build_for_packagecloud.yml +0 -59
  29. data/.github/workflows/docker-images.yml +0 -53
  30. data/.github/workflows/run_cpluplus_tests.yml +0 -73
  31. data/.github/workflows/run_tests.yml +0 -154
  32. data/.github/workflows/scripts/test_install.rb +0 -28
  33. data/.github/workflows/swig/swig-v4.0.2.tar.gz +0 -0
  34. data/.github/workflows/test_on_4_linux.yml +0 -109
  35. data/.github/workflows/test_on_ubuntu.yml +0 -107
  36. data/ext/oboe_metal/lib/liboboe-1.0-alpine-x86_64.so.0.0.0.sha256 +0 -1
  37. data/ext/oboe_metal/lib/liboboe-1.0-x86_64.so.0.0.0.sha256 +0 -1
@@ -1,108 +0,0 @@
1
- # Copyright (c) 2021 SolarWinds, LLC.
2
- # All rights reserved.
3
-
4
- name: BUILD, VERIFY, and RELEASE Ruby Gem to RubyGems
5
-
6
- # This workflow relies on the following secrets
7
- # - TRACE_BUILD_RUBY_ACTIONS_API_TOKEN (from the trace-build user in github)
8
- # - RUBYGEMS_TOKEN (from the solarwinds-apm user on rubygems.org)
9
- # - SW_APM_SERVICE_KEY
10
- # - SW_APM_COLLECTOR
11
- #
12
- # The correct oboe version has to be in the file ext/oboe_metal/src/VERSION
13
-
14
- on:
15
- workflow_dispatch:
16
-
17
- jobs:
18
- build:
19
- name: Build + Release Gem to RubyGems
20
- runs-on: ubuntu-latest
21
-
22
- steps:
23
- - uses: actions/checkout@v2
24
-
25
- - name: Set up Ruby 2.7 and bundle
26
- uses: ruby/setup-ruby@v1
27
- with:
28
- ruby-version: 2.7
29
-
30
- - name: Install gems
31
- run: |
32
- echo 'gem: --no-document' >> ~/.gemrc
33
- bundle install --without development --without test
34
-
35
- - name: Install swig 4.0.2
36
- run: |
37
- apt udate && apt install -y --no-install-recommends bison
38
- curl -SL https://github.com/swig/swig/archive/refs/tags/v4.0.2.tar.gz | tar xzC /tmp
39
- cd /tmp/swig-4.0.2
40
- ./autogen.sh && ./configure && make && sudo make install
41
- cd -
42
-
43
- - name: Download files from cloud.solarwinds.com and create swig wrapper
44
- env:
45
- TRACE_BUILD_TOKEN: ${{ secrets.TRACE_BUILD_RUBY_ACTIONS_API_TOKEN }}
46
- run: |
47
- bundle exec rake fetch_oboe_file_from_prod
48
- bundle exec rake oboe_verify
49
-
50
- - name: Build Gem and upload to Rubygems
51
- id: build
52
- env:
53
- GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_TOKEN }}
54
- run: |
55
- bundle exec rake build_and_publish_gem
56
- checksum=`shasum -a256 *.gem | awk '{print $1;}'`
57
- echo "checksum: $checksum"
58
- echo ::set-output name=checksum::$checksum
59
- echo ::set-output name=gem_version::`ruby -e 'require "./lib/solarwinds_apm/version"; puts SolarWindsAPM::Version::STRING'`
60
-
61
- - name: Get checksum from Rubygems
62
- id: checksum
63
- run: |
64
- gem_version=${{ steps.build.outputs.gem_version }}
65
- echo ::set-output name=geminfo::`curl https://rubygems.org/api/v2/rubygems/solarwinds_apm/versions/$gem_version.json`
66
-
67
- - name: Print checksums (in case some debugging is needed)
68
- run: |
69
- echo "local checksum: ${{ steps.build.outputs.checksum }}"
70
- echo "Rubygems checksum: ${{ fromJson(steps.checksum.outputs.geminfo).sha }}"
71
-
72
- - name: Fail if local and rubygems checksums don't match
73
- if: fromJson(steps.checksum.outputs.geminfo).sha != steps.build.outputs.checksum
74
- run: |
75
- echo "local and rubygems checksum not matching, gem needs to be yanked from rubygems.org"
76
- exit 1
77
-
78
- - name: Create release draft that includes the checksum
79
- uses: actions/github-script@v3
80
- with:
81
- github-token: ${{secrets.GITHUB_TOKEN}}
82
- script: |
83
- github.repos.createRelease({
84
- owner: "solarwindscloud",
85
- repo: "solarwinds-apm-ruby",
86
- body: "SHA256 checksum: ${{ steps.build.outputs.checksum }}",
87
- tag_name: "${{ steps.build.outputs.gem_version }}",
88
- name: "${{ steps.build.outputs.gem_version }}",
89
- draft: true
90
- })
91
-
92
- # may need a bit of time for the gem to become available (-> sleep 1)
93
- - name: Download new Rubygem from rubygems.org and test
94
- working-directory: .github/workflows/
95
- env:
96
- SW_APM_SERVICE_KEY: ${{ secrets.SW_APM_SERVICE_KEY_PROD }}
97
- SW_APM_COLLECTOR: ${{ secrets.SW_APM_COLLECTOR_PROD}}
98
- run: |
99
- sleep 1
100
- gem install solarwinds_apm --version ${{ steps.build.outputs.gem_version }}
101
- ruby ./scripts/test_install.rb
102
-
103
- - name: Now also check manually if there is a trace for service 'ruby-post-release-test' in SW production
104
- run: echo "TODO"
105
-
106
- - name: And now the release notes need to be completed for the new release
107
- run: echo "TODO"
108
-
@@ -1,59 +0,0 @@
1
- # Copyright (c) 2021 SolarWinds, LLC.
2
- # All rights reserved.
3
-
4
- name: Ruby Gem to PackageCloud
5
-
6
- on:
7
- workflow_dispatch:
8
-
9
- jobs:
10
- build:
11
- name: Build + Publish to PackageCloud
12
- runs-on: ubuntu-latest
13
-
14
- steps:
15
- - uses: actions/checkout@v2
16
-
17
- - name: Set up Ruby 2.7 and bundle
18
- uses: ruby/setup-ruby@v1
19
- with:
20
- ruby-version: 2.7
21
-
22
- - name: Install gems
23
- run: |
24
- echo 'gem: --no-document' >> ~/.gemrc
25
- bundle install
26
-
27
- - name: Install swig 4.0.2
28
- run: |
29
- apt udate && apt install -y --no-install-recommends bison
30
- curl -SL https://github.com/swig/swig/archive/refs/tags/v4.0.2.tar.gz | tar xzC /tmp
31
- cd /tmp/swig-4.0.2
32
- ./autogen.sh && ./configure && make && sudo make install
33
- cd -
34
-
35
- - name: Grab current version
36
- id: version
37
- run: |
38
- echo ::set-output name=gem_version::`ruby -e 'require "./lib/solarwinds_apm/version"; puts SolarWindsAPM::Version::STRING'`
39
-
40
- - name: Build gem and publish to packagecloud
41
- id: gemstep
42
- run: |
43
- bundle exec rake build_gem_push_to_packagecloud[${{ steps.version.outputs.gem_version }}]
44
- env:
45
- PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}
46
-
47
- # Run this test manually, github is having problems reading the index at packagecloud
48
- # TODO: AO-20355
49
- # - name: Test install (give packagecloud 60 seconds to index)
50
- # working-directory: .github/workflows/
51
- # env:
52
- # SW_APM_SERVICE_KEY: ${{ secrets.SW_APM_SERVICE_KEY }}
53
- # SW_APM_COLLECTOR: ${{ secrets.SW_APM_COLLECTOR}}
54
- # OBOE_STAGING: true
55
- # run: |
56
- # sleep 60
57
- # gem sources --add https://packagecloud.io/solarwinds/solarwinds-apm-ruby
58
- # gem install solarwinds_apm --version ${{ steps.gemstep.outputs.GEM_VERSION }} --verbose
59
- # ruby ./scripts/test_install.rb
@@ -1,53 +0,0 @@
1
- name: Build docker images
2
-
3
- on:
4
- push:
5
- paths:
6
- - 'test/run_tests/Dockerfile_*'
7
- # Allows running this workflow manually from the Actions tab
8
- workflow_dispatch:
9
-
10
- env:
11
- REGISTRY: ghcr.io
12
- IMAGE_NAME: ${{ github.repository }}/apm_ruby
13
- DOCKERFILE: test/run_tests/Dockerfile
14
-
15
- jobs:
16
-
17
- build_push:
18
- name: Build docker images
19
- runs-on: ubuntu-latest
20
-
21
- strategy:
22
- fail-fast: false
23
- matrix:
24
- os: [ubuntu, debian, centos, alpine]
25
-
26
- steps:
27
- - name: Checkout ${{ github.ref }}
28
- uses: actions/checkout@v1
29
-
30
- - name: Log in to the Container Registry
31
- uses: docker/login-action@v2
32
- with:
33
- registry: ${{ env.REGISTRY }}
34
- username: ${{ github.actor }}
35
- password: ${{ secrets.GITHUB_TOKEN }}
36
-
37
- - name: Extract metadata (tags, labels) for Docker
38
- id: meta
39
- uses: docker/metadata-action@v4
40
- with:
41
- images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}_${{ matrix.os }}
42
- flavor: |
43
- latest=true
44
-
45
- - name: Build and push Docker image
46
- uses: docker/build-push-action@v3
47
- with:
48
- context: .
49
- push: true
50
- file: test/run_tests/Dockerfile_${{ matrix.os }}
51
- tags: ${{ steps.meta.outputs.tags }}
52
- labels: ${{ steps.meta.outputs.labels }}
53
-
@@ -1,73 +0,0 @@
1
- # Copyright (c) 2021 SolarWinds, LLC.
2
- # All rights reserved.
3
-
4
- name: C++ Tests
5
-
6
- on:
7
- push:
8
- paths:
9
- - ext/oboe_metal/src/*.h
10
- - ext/oboe_metal/src/*.cc
11
- - ext/oboe_metal/test/*
12
- # Allows you to run this workflow manually from the Actions tab
13
- workflow_dispatch:
14
-
15
- jobs:
16
- tests:
17
- runs-on: ubuntu-latest
18
- strategy:
19
- fail-fast: false
20
- matrix:
21
- ruby: [3.1, 3.0, 2.7, 2.6, 2.5]
22
-
23
- container:
24
- image: ruby:${{ matrix.ruby }}
25
-
26
- name: ${{ matrix.ruby }} - c++
27
-
28
- env:
29
- SW_APM_REPORTER: file
30
- SW_APM_COLLECTOR: /tmp/sw_apm_traces.bson
31
- SW_APM_REPORTER_FILE_SINGLE: false
32
- OBOE_STAGING: true
33
-
34
- steps:
35
- - uses: actions/checkout@v2
36
-
37
- - name: Install cmake
38
- run: |
39
- ls -lrt /usr/src
40
- apt update && apt install -y --no-install-recommends build-essential libgtest-dev ruby
41
- curl -OL https://github.com/Kitware/CMake/releases/download/v3.20.5/cmake-3.20.5-SHA-256.txt
42
- curl -OL https://github.com/Kitware/CMake/releases/download/v3.20.5/cmake-3.20.5.tar.gz
43
- sha256sum -c --ignore-missing cmake-3.20.5-SHA-256.txt
44
- tar -zxvf cmake-3.20.5.tar.gz
45
- cd cmake-3.20.5
46
- ./bootstrap
47
- make
48
- make install
49
-
50
- - name: Install swig 4.0.2
51
- working-directory: .github/workflows/swig
52
- run: |
53
- apt update && apt install -y --no-install-recommends bison
54
- tar -xf swig-v4.0.2.tar.gz -C /tmp
55
- cd /tmp/swig-4.0.2
56
- ./autogen.sh && ./configure && make && make install
57
- cd -
58
-
59
- - name: Bundle & download c-files
60
- run: |
61
- gem install bundler
62
- bundle install
63
- bundle exec rake clean fetch compile
64
-
65
- - name: Compile and run tests
66
- working-directory: ext/oboe_metal/test
67
- run: |
68
- export TEST_DIR=`pwd`
69
- export RUBY_INC_DIR=$(ruby ruby_inc_dir.rb)
70
- export RUBY_PREFIX=$(ruby ruby_prefix.rb)
71
- cmake -S . -B build
72
- cmake --build build
73
- cd build && ctest
@@ -1,154 +0,0 @@
1
- # Copyright (c) 2021 SolarWinds, LLC.
2
- # All rights reserved.
3
-
4
- name: Run Ruby Tests on Ubuntu
5
-
6
- on:
7
- # push:
8
- # Allows you to run this workflow manually from the Actions tab
9
- workflow_dispatch:
10
-
11
- jobs:
12
- tests:
13
- runs-on: ubuntu-latest
14
- strategy:
15
- fail-fast: false
16
- matrix:
17
- ruby: [3.1, 3.0, 2.7, 2.6, 2.5]
18
- gemfile:
19
- - libraries
20
- - unit
21
- - instrumentation_mocked
22
- - instrumentation_mocked_oldgems
23
- - frameworks
24
- - rails70
25
- - rails61
26
- - rails52
27
- - delayed_job
28
- - noop
29
- dbtype: [postgresql, mysql]
30
- exclude:
31
- - ruby: 3.1
32
- gemfile: rails52
33
- - ruby: 3.0
34
- gemfile: rails52
35
- - ruby: 2.6
36
- gemfile: rails70
37
- - ruby: 2.5
38
- gemfile: rails70
39
-
40
- - gemfile: unit
41
- dbtype: mysql
42
- - gemfile: noop
43
- dbtype: mysql
44
- - gemfile: libraries
45
- dbtype: mysql
46
- - gemfile: instrumentation_mocked
47
- dbtype: mysql
48
- - gemfile: instrumentation_mocked_oldgems
49
- dbtype: mysql
50
- - gemfile: frameworks
51
- dbtype: mysql
52
- - gemfile: delayed_job
53
- dbtype: mysql
54
-
55
- container:
56
- image: ruby:${{ matrix.ruby }}
57
-
58
- name: ${{ matrix.ruby }} - ${{ matrix.gemfile }}
59
-
60
- env:
61
- BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
62
- SW_APM_GEM_TEST: true
63
- SW_APM_REPORTER: file
64
- SW_APM_COLLECTOR: /tmp/sw_apm_traces.bson
65
- SW_APM_REPORTER_FILE_SINGLE: false
66
- OBOE_STAGING: true
67
- MONGO_SERVER: "mongo"
68
- RABBITMQ_SERVER: "rabbitmq"
69
- MEMCACHED_SERVER: "memcached"
70
- MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
71
- MYSQL_ROOT_PASSWORD: "admin"
72
- MYSQL_HOST: "mysql"
73
- MYSQL_DATABASE: "test_db"
74
- POSTGRES_DB: "test_db"
75
- DOCKER_MYSQL_PASS: "admin"
76
- DOCKER_PSQL_PASS: "postgres"
77
- POSTGRES_USER: "postgres"
78
- POSTGRES_PASSWORD: "postgres"
79
- POSTGRES_HOST: "postgres"
80
- REDIS_PASSWORD: "redis_pass"
81
- services:
82
- memcached:
83
- image: memcached:latest
84
- ports:
85
- - 11211:11211
86
- 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
87
- rabbitmq:
88
- image: rabbitmq:latest
89
- ports:
90
- - 5672:5672
91
- options: --health-cmd "rabbitmqctl node_health_check" --health-interval 10s --health-timeout 5s --health-retries 5
92
- mongo:
93
- image: mongo:latest
94
- ports:
95
- - 27017:27017
96
- options: --health-cmd "mongosh --quiet --eval 'quit(db.runCommand({ping:1}).ok ? 0:2)'" --health-interval 10s --health-timeout 5s --health-retries 5
97
- postgres:
98
- image: postgres:latest
99
- env:
100
- POSTGRES_PASSWORD: "postgres"
101
- POSTGRES_DB: test_db
102
- ports:
103
- - 5432:5432
104
- options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
105
- mysql:
106
- image: mariadb:latest
107
- env:
108
- MYSQL_USER: user
109
- MYSQL_PASSWORD: password
110
- MYSQL_DATABASE: test_db
111
- MYSQL_ROOT_PASSWORD: admin
112
- ports:
113
- - 3306:3306
114
- options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
115
-
116
- steps:
117
- - uses: actions/checkout@v2
118
-
119
- - name: Install dependencies
120
- run: apt update && apt install -y --no-install-recommends bison libcurl4-gnutls-dev libsasl2-dev postgresql-client
121
-
122
- - name: Set database type env var
123
- run: export DBTYPE=${{ matrix.dbtype }}
124
-
125
- - name: Add javascript runtime
126
- uses: actions/setup-node@v2
127
- with:
128
- node-version: '14'
129
-
130
- - name: Initialize services
131
- run: |
132
- curl -SL http://download.redis.io/releases/redis-4.0.0.tar.gz | tar xzC /tmp && cd /tmp/redis-4.0.0/ && make && make install && cd -
133
- redis-server --requirepass redis_pass --loglevel "warning" &
134
-
135
- - name: Bundle
136
- run: |
137
- gem install bundler
138
- export BUNDLE_GEMFILE=gemfiles/${{ matrix.gemfile }}.gemfile
139
- bundle install --jobs 4 --retry 3
140
-
141
- - name: Install swig 4.0.2
142
- working-directory: .github/workflows/swig
143
- run: |
144
- tar -xf swig-v4.0.2.tar.gz -C /tmp
145
- cd /tmp/swig-4.0.2
146
- ./autogen.sh && ./configure && make && make install
147
- cd -
148
-
149
- - name: Compile c-extension
150
- run: |
151
- bundle exec rake fetch compile
152
-
153
- - name: Run tests
154
- run: bundle exec rake test
@@ -1,28 +0,0 @@
1
- # Copyright (c) 2021 SolarWinds, LLC.
2
- # All rights reserved.
3
-
4
- # Test script used to check if a newly created gem installs and connects to
5
- # the collector
6
- # requires env vars:
7
- # - SW_APM_SERVICE_KEY
8
- # - SW_APM_COLLECTOR (optional if the key is for production)
9
-
10
- require 'solarwinds_apm'
11
-
12
- unless SolarWindsAPM::SDK.solarwinds_ready?(10_000)
13
- puts "aborting!!! Agent not ready after 10 seconds"
14
- exit false
15
- end
16
-
17
- op = lambda { 10.times {[9, 6, 12, 2, 7, 1, 9, 3, 4, 14, 5, 8].sort} }
18
-
19
- SolarWindsAPM.support_report
20
-
21
- # no profiling yet for NH, but it shouldn't choke on Profiling.run
22
- SolarWindsAPM::Config[:profiling] = :disabled
23
-
24
- SolarWindsAPM::SDK.start_trace("ruby_post_release_test") do
25
- SolarWindsAPM::Profiling.run { op.call } if defined?(SolarWindsAPM::Profiling)
26
- op.call unless defined?(SolarWindsAPM::Profiling)
27
- puts "Looks good!"
28
- end
@@ -1,109 +0,0 @@
1
- # Copyright (c) 2021 SolarWinds, LLC.
2
- # All rights reserved.
3
-
4
- name: Run Ruby Tests on 4 Linux
5
-
6
- on:
7
- pull_request:
8
- types:
9
- - closed
10
- paths-ignore:
11
- - 'test/run_tests/Dockerfile_*'
12
- # Allows you to run this workflow manually from the Actions tab
13
- workflow_dispatch:
14
-
15
- jobs:
16
- all_linux_test:
17
- if: github.event.pull_request.merged == true
18
- name: ${{ matrix.os }} - ruby ${{ matrix.ruby }}
19
- runs-on: ubuntu-latest
20
- # needs: build_images
21
-
22
- strategy:
23
- fail-fast: false
24
- matrix:
25
- os: [ubuntu, debian, centos, alpine]
26
- ruby: ['3.1', '3.0', '2.7', '2.6', '2.5']
27
-
28
- container:
29
- image: ghcr.io/${{ github.repository }}/apm_ruby_${{ matrix.os }}
30
-
31
- env:
32
- SW_APM_GEM_TEST: true
33
- SW_APM_REPORTER: file
34
- SW_APM_COLLECTOR: /tmp/sw_apm_traces.bson
35
- SW_APM_REPORTER_FILE_SINGLE: false
36
- OBOE_STAGING: true
37
- MONGO_SERVER: "mongo"
38
- RABBITMQ_SERVER: "rabbitmq"
39
- MEMCACHED_SERVER: "memcached"
40
- MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
41
- MYSQL_ROOT_PASSWORD: "admin"
42
- MYSQL_HOST: "mysql"
43
- MYSQL_DATABASE: "test_db"
44
- POSTGRES_DB: "test_db"
45
- DOCKER_MYSQL_PASS: "admin"
46
- DOCKER_PSQL_PASS: "postgres"
47
- POSTGRES_USER: "postgres"
48
- POSTGRES_PASSWORD: "postgres"
49
- POSTGRES_HOST: "postgres"
50
- QUERY_LOG_FILE: "/tmp/sw_apm_query_logs.txt"
51
- REDIS_PASSWORD: "redis_pass"
52
- TEST_RUNS_TO_FILE: "true"
53
-
54
- services:
55
- memcached:
56
- image: memcached:latest
57
- ports:
58
- - 11211:11211
59
- 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
60
- rabbitmq:
61
- image: rabbitmq:latest
62
- ports:
63
- - 5672:5672
64
- options: --health-cmd "rabbitmqctl node_health_check" --health-interval 10s --health-timeout 5s --health-retries 5
65
- mongo:
66
- image: mongo:6
67
- ports:
68
- - 27017:27017
69
- options: --health-cmd "mongosh --quiet --eval 'quit(db.runCommand({ping:1}).ok ? 0:2)'" --health-interval 10s --health-timeout 5s --health-retries 5
70
- postgres:
71
- image: postgres:latest
72
- env:
73
- POSTGRES_PASSWORD: "postgres"
74
- POSTGRES_DB: test_db
75
- ports:
76
- - 5432:5432
77
- options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
78
- mysql:
79
- image: mariadb:latest
80
- env:
81
- MYSQL_USER: user
82
- MYSQL_PASSWORD: password
83
- MYSQL_DATABASE: test_db
84
- MYSQL_ROOT_PASSWORD: admin
85
- ports:
86
- - 3306:3306
87
- options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
88
-
89
- steps:
90
- - name: Checkout ${{ github.ref }}
91
- uses: actions/checkout@v3
92
-
93
- - name: print some info
94
- run: |
95
- user=`whoami`
96
- pwd=`pwd`
97
- echo "User: $user"
98
- echo "Current dir: $pwd"
99
- echo "Home dir: $HOME"
100
- echo "Branch: ${GITHUB_REF#refs/*/}"
101
-
102
- - name: ruby tests
103
- run: |
104
- export HOME=/root
105
- test/run_tests/ruby_setup.sh
106
- version=`rbenv versions --bare | grep ${{ matrix.ruby }}`
107
- rbenv global $version
108
- echo "testing with ruby version: $version"
109
- test/run_tests/run_tests.sh -r $version
@@ -1,107 +0,0 @@
1
- # Copyright (c) 2021 SolarWinds, LLC.
2
- # All rights reserved.
3
-
4
- name: Run Ruby Tests on Ubuntu (Push Event)
5
-
6
- on:
7
- push:
8
- branches-ignore:
9
- - main
10
- paths-ignore:
11
- - 'test/run_tests/Dockerfile_*'
12
- workflow_dispatch:
13
-
14
- jobs:
15
-
16
- ubuntu_test:
17
- name: ubuntu - ruby ${{ matrix.ruby }}
18
- runs-on: ubuntu-latest
19
-
20
- strategy:
21
- fail-fast: false
22
- matrix:
23
- ruby: ['3.1', '3.0', '2.7', '2.6']
24
-
25
- container:
26
- image: ghcr.io/${{ github.repository }}/apm_ruby_ubuntu
27
-
28
- env:
29
- SW_APM_GEM_TEST: true
30
- SW_APM_REPORTER: file
31
- SW_APM_COLLECTOR: /tmp/sw_apm_traces.bson
32
- SW_APM_REPORTER_FILE_SINGLE: false
33
- OBOE_STAGING: true
34
- MONGO_SERVER: "mongo"
35
- RABBITMQ_SERVER: "rabbitmq"
36
- MEMCACHED_SERVER: "memcached"
37
- MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
38
- MYSQL_ROOT_PASSWORD: "admin"
39
- MYSQL_HOST: "mysql"
40
- MYSQL_DATABASE: "test_db"
41
- POSTGRES_DB: "test_db"
42
- DOCKER_MYSQL_PASS: "admin"
43
- DOCKER_PSQL_PASS: "postgres"
44
- POSTGRES_USER: "postgres"
45
- POSTGRES_PASSWORD: "postgres"
46
- POSTGRES_HOST: "postgres"
47
- QUERY_LOG_FILE: "/tmp/sw_apm_query_logs.txt"
48
- REDIS_PASSWORD: "redis_pass"
49
- TEST_RUNS_TO_FILE: "true"
50
-
51
- services:
52
- memcached:
53
- image: memcached:latest
54
- ports:
55
- - 11211:11211
56
- 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
57
- rabbitmq:
58
- image: rabbitmq:latest
59
- ports:
60
- - 5672:5672
61
- options: --health-cmd "rabbitmqctl node_health_check" --health-interval 10s --health-timeout 5s --health-retries 5
62
- mongo:
63
- image: mongo:6
64
- ports:
65
- - 27017:27017
66
- options: --health-cmd "mongosh --quiet --eval 'quit(db.runCommand({ping:1}).ok ? 0:2)'" --health-interval 10s --health-timeout 5s --health-retries 5
67
- postgres:
68
- image: postgres:latest
69
- env:
70
- POSTGRES_PASSWORD: "postgres"
71
- POSTGRES_DB: test_db
72
- ports:
73
- - 5432:5432
74
- options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
75
- mysql:
76
- image: mariadb:latest
77
- env:
78
- MYSQL_USER: user
79
- MYSQL_PASSWORD: password
80
- MYSQL_DATABASE: test_db
81
- MYSQL_ROOT_PASSWORD: admin
82
- ports:
83
- - 3306:3306
84
- options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
85
-
86
- steps:
87
- - name: Checkout ${{ github.ref }}
88
- uses: actions/checkout@v3
89
-
90
- - name: print some info
91
- run: |
92
- user=`whoami`
93
- pwd=`pwd`
94
- echo "User: $user"
95
- echo "Current dir: $pwd"
96
- echo "Home dir: $HOME"
97
- echo "Branch: ${GITHUB_REF#refs/*/}"
98
-
99
- - name: ruby tests
100
- run: |
101
- export HOME=/root
102
- export PUSH_EVENT=REGULAR_PUSH
103
- test/run_tests/ruby_setup.sh
104
- version=`rbenv versions --bare | grep ${{ matrix.ruby }}`
105
- rbenv global $version
106
- echo "testing with ruby version: $version"
107
- test/run_tests/run_tests.sh -r $version
@@ -1 +0,0 @@
1
- 08e53f05aebb831b3bb27410ad3163e193b4e3d7dbef3ac280e799f024623d95