-
Notifications
You must be signed in to change notification settings - Fork 20
61 lines (59 loc) · 1.84 KB
/
Copy pathreusable-ruby-test.yml
File metadata and controls
61 lines (59 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Reusable Ruby Testing Workflow
on:
workflow_call:
inputs:
target-branch:
description: 'Branch to checkout and test (defaults to the calling branch)'
required: false
type: string
default: ''
ruby-versions:
description: 'JSON array of Ruby versions to test against'
required: false
type: string
default: '["2.7", "3.2", "jruby-9.4.12.0"]'
platforms:
description: 'JSON array of platforms to run tests on'
required: false
type: string
default: '["ubuntu-latest"]'
test-script:
description: 'Test script to execute'
required: false
type: string
default: './run-tests.sh'
cache-version:
description: 'Cache version for gem dependencies'
required: false
type: string
default: ''
secrets:
DD_API_KEY:
required: false
jobs:
test:
strategy:
matrix:
ruby-version: ${{ fromJSON(inputs.ruby-versions) }}
platform: ${{ fromJSON(inputs.platforms) }}
runs-on: ${{ matrix.platform }}
env:
BUNDLE_WITHOUT: docs
DD_PROFILING_NO_EXTENSION: true
DD_CIVISIBILITY_AGENTLESS_ENABLED: true
DD_ENV: prod
DD_API_KEY: ${{ secrets.DD_API_KEY }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: DataDog/datadog-api-client-ruby
ref: ${{ inputs.target-branch || github.ref }}
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@afeafc3d1ab54a631816aba4c914a0081c12ff2f # v1.310.0
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
cache-version: ${{ inputs.cache-version }}
- name: Test
run: ${{ inputs.test-script }}
shell: bash