-
Notifications
You must be signed in to change notification settings - Fork 66
46 lines (43 loc) · 1.23 KB
/
reusable-examples.yml
File metadata and controls
46 lines (43 loc) · 1.23 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
name: Reusable Examples Workflow
on:
workflow_call:
inputs:
target-branch:
description: 'Branch to checkout and test (defaults to the calling branch)'
required: false
type: string
default: ''
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.split.outputs.matrix }}
steps:
- uses: actions/checkout@v3
with:
repository: DataDog/datadog-api-client-go
ref: ${{ inputs.target-branch || github.ref }}
- name: Compute example groups
id: split
run: ./scripts/prepare-examples.sh
shell: bash
build:
needs: prepare
runs-on: ubuntu-latest
strategy:
matrix:
group: ${{ fromJson(needs.prepare.outputs.matrix) }}
steps:
- uses: actions/checkout@v3
with:
repository: DataDog/datadog-api-client-go
ref: ${{ inputs.target-branch || github.ref }}
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.22.x
cache: true
cache-dependency-path: tests/go.sum
- name: Build examples (group ${{ matrix.group }})
run: ./scripts/build-examples-group.sh ${{ matrix.group }}
shell: bash