Skip to content

Commit

Permalink
Merge pull request #1 from anmarchenko/anmarchenko/add_datadog_test_v…
Browse files Browse the repository at this point in the history
…isibility

setup test visibility with Datadog
  • Loading branch information
TonyCTHsu authored May 23, 2024
2 parents 6e10da2 + 5339087 commit f0f80a4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
workflow_call:
schedule:
- cron: "0 10 * * *" # every day at 10:00 UTC
- cron: '0 10 * * *' # every day at 10:00 UTC

jobs:
test:
Expand Down Expand Up @@ -34,4 +34,9 @@ jobs:
- name: Install dependencies
run: bundle install
- name: Run tests
env:
DD_CIVISIBILITY_AGENTLESS_ENABLED: true
DD_CIVISIBILITY_ITR_ENABLED: true
DD_API_KEY: ${{ secrets.DD_API_KEY }}
DD_ENV: ci
run: bundle exec rake spec
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@

gemfile = "#{RUBY_ENGINE}-#{RUBY_ENGINE_VERSION.split(".").take(2).join(".")}.gemfile"
eval_gemfile "gemfiles/#{gemfile}"

gem "datadog-ci", "~> 1.0.0.beta5"
9 changes: 9 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,12 @@
c.syntax = :expect
end
end

if ENV["DD_ENV"] == "ci"
Datadog.configure do |c|
c.service = "leash"

c.ci.enabled = true
c.ci.instrument :rspec
end
end

0 comments on commit f0f80a4

Please sign in to comment.