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
36 changes: 36 additions & 0 deletions .github/workflows/test-external.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Test External

on: [push, pull_request]

permissions:
contents: read

env:
CONSOLE_OUTPUT: XTerm

jobs:
test:
name: ${{matrix.ruby}} on ${{matrix.os}}
runs-on: ${{matrix.os}}-latest

strategy:
matrix:
os:
- ubuntu
- macos

ruby:
- "2.7"
- "3.0"
- "3.1"

steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{matrix.ruby}}
bundler-cache: true

- name: Run tests
timeout-minutes: 10
run: bundle exec bake test:external
3 changes: 3 additions & 0 deletions config/external.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
metrics-backend-datadog:
url: https://github.com/socketry/metrics-backend-datadog.git
command: bundle exec rspec
2 changes: 1 addition & 1 deletion gems.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2021, by Samuel Williams.
# Copyright, 2021-2022, by Samuel Williams.

source 'https://rubygems.org'

Expand Down
2 changes: 1 addition & 1 deletion lib/metrics.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2021, by Samuel Williams.
# Copyright, 2021-2022, by Samuel Williams.

require_relative 'metrics/version'
require_relative 'metrics/provider'
2 changes: 1 addition & 1 deletion lib/metrics/backend.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2021, by Samuel Williams.
# Copyright, 2021-2022, by Samuel Williams.

module Metrics
# Require a specific trace backend.
Expand Down
2 changes: 1 addition & 1 deletion lib/metrics/backend/console.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2021, by Samuel Williams.
# Copyright, 2021-2022, by Samuel Williams.

require 'console'
require_relative '../metric'
Expand Down
2 changes: 1 addition & 1 deletion lib/metrics/metric.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2021, by Samuel Williams.
# Copyright, 2021-2022, by Samuel Williams.

module Metrics
class Metric
Expand Down
2 changes: 1 addition & 1 deletion lib/metrics/tags.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2021, by Samuel Williams.
# Copyright, 2021-2022, by Samuel Williams.

require_relative 'backend'

Expand Down
3 changes: 3 additions & 0 deletions test/metrics.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2021-2022, by Samuel Williams.

require 'metrics'

class MyClass
Expand Down
2 changes: 1 addition & 1 deletion test/metrics/provider.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2021-2022, by Samuel Williams.
# Copyright, 2022, by Samuel Williams.

unless ENV['METRICS_BACKEND']
abort "No backend specified, tests will fail!"
Expand Down