Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 0 additions & 69 deletions .circleci/config.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Ruby Test

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

permissions:
contents: read

jobs:
test:
name: Ruby ${{ matrix.ruby }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
ruby: [2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 3.0, 3.1, 3.2, 3.3, 3.4]
exclude:
# CRuby < 2.6 does not support macos-arm64.
- { os: macos-latest, ruby: '2.1' }
- { os: macos-latest, ruby: '2.2' }
- { os: macos-latest, ruby: '2.3' }
- { os: macos-latest, ruby: '2.4' }
- { os: macos-latest, ruby: '2.5' }

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Install dependencies
run: bundle install --with development

- name: Run tests
run: bundle exec rake spec
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A client for DogStatsD, an extension of the StatsD metric server for Datadog. Full API documentation is available in [DogStatsD-ruby rubydoc](https://www.rubydoc.info/github/DataDog/dogstatsd-ruby/master/Datadog/Statsd).

[![Build Status](https://secure.travis-ci.org/DataDog/dogstatsd-ruby.svg)](http://travis-ci.org/DataDog/dogstatsd-ruby)
[![Build Status](https://github.com/DataDog/dogstatsd-ruby/actions/workflows/test.yml/badge.svg)](https://github.com/DataDog/dogstatsd-ruby/actions/workflows/test.yml)

See [CHANGELOG.md](CHANGELOG.md) for changes. To suggest a feature, report a bug, or general discussion, [open an issue](http://github.com/DataDog/dogstatsd-ruby/issues/).

Expand Down
8 changes: 6 additions & 2 deletions spec/integrations/connection_edge_case_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,18 @@

it 'logs the error message' do
subject.write('foobar')
expect(log.string).to match 'Errno::ECONNREFUSED Connection refused - yolo'
expect(log.string).to match(/Errno::ECONNREFUSED .* - yolo/)
end
end
end
end
end

describe 'when having problems with UDS communication' do
before do
skip "UDS not supported on Windows" if Gem.win_platform?
end

subject do
Datadog::Statsd::UDSConnection.new('/tmp/socket', logger: logger)
end
Expand Down Expand Up @@ -481,4 +485,4 @@
end
end
end
end
end
4 changes: 2 additions & 2 deletions spec/statsd/timer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
second_call_time = call_times.pop
# the third call is made immediatelly after the second call
third_call_time = call_times.pop
expect(second_call_time - first_call_time).to be_within(0.01).of(interval * 2)
expect(third_call_time - second_call_time).to be_within(0.01).of(0)
expect(second_call_time - first_call_time).to be_within(0.02).of(interval * 2)
expect(third_call_time - second_call_time).to be_within(0.02).of(0)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/statsd/udp_connection_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@

it 'logs the error message' do
subject.write('foobar')
expect(log.string).to match 'Errno::ECONNREFUSED Connection refused - yolo'
expect(log.string).to match(/Errno::ECONNREFUSED .* - yolo/)
end

it 'tries to send through the initial socket' do
Expand Down
4 changes: 4 additions & 0 deletions spec/statsd/uds_connection_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
require 'spec_helper'

describe Datadog::Statsd::UDSConnection do
before do
skip "UDS not supported on Windows" if Gem.win_platform?
end

subject do
described_class.new(socket_path, logger: logger, telemetry: telemetry)
end
Expand Down
Loading