solarwinds_apm 5.1.2 → 5.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +15 -0
  3. data/CHANGELOG.md +14 -0
  4. data/README.md +4 -2
  5. data/ext/oboe_metal/extconf.rb +18 -5
  6. data/ext/oboe_metal/lib/liboboe-1.0-aarch64.so.0.0.0.sha256 +1 -0
  7. data/ext/oboe_metal/lib/liboboe-1.0-alpine-aarch64.so.0.0.0.sha256 +1 -0
  8. data/ext/oboe_metal/lib/liboboe-1.0-alpine-x86_64.so.0.0.0.sha256 +1 -1
  9. data/ext/oboe_metal/lib/liboboe-1.0-x86_64.so.0.0.0.sha256 +1 -1
  10. data/ext/oboe_metal/src/VERSION +1 -1
  11. data/ext/oboe_metal/src/oboe.h +2 -4
  12. data/ext/oboe_metal/src/oboe_api.cpp +7 -12
  13. data/ext/oboe_metal/src/oboe_api.h +1 -3
  14. data/ext/oboe_metal/src/oboe_swig_wrap.cc +3 -19
  15. data/lib/oboe_metal.rb +9 -0
  16. data/lib/solarwinds_apm/cert/star.appoptics.com.issuer.crt +24 -0
  17. data/lib/solarwinds_apm/inst/redis.rb +36 -29
  18. data/lib/solarwinds_apm/inst/redis_v4.rb +273 -0
  19. data/lib/solarwinds_apm/oboe_init_options.rb +23 -6
  20. data/lib/solarwinds_apm/util.rb +116 -42
  21. data/lib/solarwinds_apm/version.rb +1 -1
  22. data/solarwinds_apm.gemspec +5 -2
  23. metadata +6 -12
  24. data/.github/CODEOWNERS +0 -1
  25. data/.github/ISSUE_TEMPLATE/bug-or-feature-request.md +0 -16
  26. data/.github/workflows/build_and_release_gem.yml +0 -108
  27. data/.github/workflows/build_for_packagecloud.yml +0 -59
  28. data/.github/workflows/docker-images.yml +0 -53
  29. data/.github/workflows/run_cpluplus_tests.yml +0 -73
  30. data/.github/workflows/run_tests.yml +0 -154
  31. data/.github/workflows/scripts/test_install.rb +0 -28
  32. data/.github/workflows/swig/swig-v4.0.2.tar.gz +0 -0
  33. data/.github/workflows/test_on_4_linux.yml +0 -161
@@ -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,161 +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
- push:
8
- paths-ignore:
9
- - 'test/run_tests/Dockerfile_*'
10
- # Allows you to run this workflow manually from the Actions tab
11
- workflow_dispatch:
12
-
13
- env:
14
- GHRC: ghcr.io/appoptics/appoptics-apm-ruby/apm_ruby
15
- DOCKERFILE: test/run_tests/Dockerfile
16
-
17
- jobs:
18
-
19
- #-------------------------------------------------------------------------------
20
- # TODO: figure out how to build images first if necessary
21
- #
22
- # ********* this is not working because we don't have a *************
23
- # ********* reference to the commit of the previous GH run *************
24
- #
25
- # build_images:
26
- # name: Build docker images if necessary
27
- # runs-on: ubuntu-latest
28
- #
29
- # strategy:
30
- # fail-fast: true
31
- # matrix:
32
- # os: [ ubuntu, debian, centos, alpine ]
33
- #
34
- # steps:
35
- # - name: Checkout
36
- # uses: actions/checkout@v2
37
- #
38
- #
39
- # ## comment out to get a debug session
40
- # ## only works with ubuntu and debian, because it uses apt:
41
- ## - name: tmate debugging session
42
- ## uses: mxschmitt/action-tmate@v3
43
- ## with:
44
- ## sudo: false
45
- #
46
- # - name: check modified files
47
- # id: check_files
48
- # run: |
49
- # git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep Dockerfile_
50
- # echo ::set-output name=check_dockerfiles::$?
51
- ## git diff --name-only HEAD^ HEAD | grep [D]ockerfile_
52
- ## echo ::set-output name=check_dockerfiles::$?
53
- #
54
- # - name: ghcr.io login ... build and publish images if needed
55
- # uses: docker/login-action@v1
56
- # if: ${{ steps.check_files.outputs.check_dockerfiles == 0}}
57
- # with:
58
- # registry: ghcr.io
59
- # username: ${{ github.actor }}
60
- # password: ${{ secrets.GITHUB_TOKEN }}
61
- #
62
- # - name: Build and publish new Docker image
63
- # if: ${{ steps.check_files.outputs.check_dockerfiles == 0 }}
64
- # run: |
65
- # docker build -f ${{ env.DOCKERFILE }}_${{ matrix.os }} -t ${{ env.GHRC }}_${{ matrix.os }} .
66
- # docker push ${{ env.GHRC }}_${{ matrix.os }}
67
-
68
- #-------------------------------------------------------------------------------
69
- all_linux_test:
70
- name: ${{ matrix.os }} - ruby ${{ matrix.ruby }}
71
- runs-on: ubuntu-latest
72
- # needs: build_images
73
-
74
- strategy:
75
- fail-fast: false
76
- matrix:
77
- os: [ubuntu, debian, centos, alpine]
78
- ruby: ['3.1', '3.0', '2.7', '2.6', '2.5']
79
-
80
- container:
81
- image: ghcr.io/${{ github.repository }}/apm_ruby_${{ matrix.os }}
82
-
83
- env:
84
- SW_APM_GEM_TEST: true
85
- SW_APM_REPORTER: file
86
- SW_APM_COLLECTOR: /tmp/sw_apm_traces.bson
87
- SW_APM_REPORTER_FILE_SINGLE: false
88
- OBOE_STAGING: true
89
- MONGO_SERVER: "mongo"
90
- RABBITMQ_SERVER: "rabbitmq"
91
- MEMCACHED_SERVER: "memcached"
92
- MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
93
- MYSQL_ROOT_PASSWORD: "admin"
94
- MYSQL_HOST: "mysql"
95
- MYSQL_DATABASE: "test_db"
96
- POSTGRES_DB: "test_db"
97
- DOCKER_MYSQL_PASS: "admin"
98
- DOCKER_PSQL_PASS: "postgres"
99
- POSTGRES_USER: "postgres"
100
- POSTGRES_PASSWORD: "postgres"
101
- POSTGRES_HOST: "postgres"
102
- QUERY_LOG_FILE: "/tmp/sw_apm_query_logs.txt"
103
- REDIS_PASSWORD: "redis_pass"
104
- TEST_RUNS_TO_FILE: "true"
105
-
106
- services:
107
- memcached:
108
- image: memcached:latest
109
- ports:
110
- - 11211:11211
111
- 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
112
- rabbitmq:
113
- image: rabbitmq:latest
114
- ports:
115
- - 5672:5672
116
- options: --health-cmd "rabbitmqctl node_health_check" --health-interval 10s --health-timeout 5s --health-retries 5
117
- mongo:
118
- image: mongo:5
119
- ports:
120
- - 27017:27017
121
- options: "--health-cmd \"mongo --quiet --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 2)'\" --health-interval 10s --health-timeout 5s --health-retries 5"
122
- postgres:
123
- image: postgres:latest
124
- env:
125
- POSTGRES_PASSWORD: "postgres"
126
- POSTGRES_DB: test_db
127
- ports:
128
- - 5432:5432
129
- options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
130
- mysql:
131
- image: mariadb:latest
132
- env:
133
- MYSQL_USER: user
134
- MYSQL_PASSWORD: password
135
- MYSQL_DATABASE: test_db
136
- MYSQL_ROOT_PASSWORD: admin
137
- ports:
138
- - 3306:3306
139
- options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
140
-
141
- steps:
142
- - name: Checkout ${{ github.ref }}
143
- uses: actions/checkout@v2
144
-
145
- - name: print some info
146
- run: |
147
- user=`whoami`
148
- pwd=`pwd`
149
- echo "User: $user"
150
- echo "Current dir: $pwd"
151
- echo "Home dir: $HOME"
152
- echo "Branch: ${GITHUB_REF#refs/*/}"
153
-
154
- - name: ruby tests
155
- run: |
156
- export HOME=/root
157
- test/run_tests/ruby_setup.sh
158
- version=`rbenv versions --bare | grep ${{ matrix.ruby }}`
159
- rbenv global $version
160
- echo "testing with ruby version: $version"
161
- test/run_tests/run_tests.sh -r $version