File tree Expand file tree Collapse file tree 2 files changed +30
-9
lines changed Expand file tree Collapse file tree 2 files changed +30
-9
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,25 @@ concurrency:
17
17
permissions : read-all
18
18
19
19
jobs :
20
+ contrib-tests-prepare :
21
+ runs-on : ubuntu-latest
22
+ if : ${{ !contains(github.event.pull_request.labels.*.name, 'Skip Contrib Tests') }}
23
+ steps :
24
+ - name : Checkout Repo
25
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26
+ - name : Prepare Contrib Tests
27
+ run : |
28
+ contrib_path=/tmp/opentelemetry-collector-contrib
29
+ git clone --depth=1 https://github.com/open-telemetry/opentelemetry-collector-contrib.git $contrib_path
30
+ make CONTRIB_PATH=$contrib_path prepare-contrib
31
+ - uses : actions/upload-artifact@v4
32
+ with :
33
+ name : contrib
34
+ path : /tmp/opentelemetry-collector-contrib/
35
+
20
36
contrib-tests-matrix :
21
37
runs-on : ubuntu-latest
38
+ needs : [contrib-tests-prepare]
22
39
if : ${{ !contains(github.event.pull_request.labels.*.name, 'Skip Contrib Tests') }}
23
40
strategy :
24
41
fail-fast : false
@@ -41,16 +58,18 @@ jobs:
41
58
steps :
42
59
- name : Checkout Repo
43
60
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
61
+ - name : Download contrib
62
+ uses : actions/download-artifact@v4
63
+ with :
64
+ name : contrib
65
+ path : /tmp/contrib
44
66
- name : Setup Go
45
67
uses : actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
46
68
with :
47
69
go-version : ~1.23.6
48
70
cache : false
49
- - name : Run Contrib Tests
50
- run : |
51
- contrib_path=/tmp/opentelemetry-collector-contrib
52
- git clone --depth=1 https://github.com/open-telemetry/opentelemetry-collector-contrib.git $contrib_path
53
- make CONTRIB_PATH=$contrib_path SKIP_RESTORE_CONTRIB=true GROUP=${{ matrix.group }} check-contrib
71
+ - name : Run tests
72
+ run : make CONTRIB_PATH=/tmp/contrib SKIP_RESTORE_CONTRIB=true GROUP=${{ matrix.group }} check-contrib
54
73
55
74
contrib_tests :
56
75
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -261,17 +261,19 @@ gensemconv: $(SEMCONVGEN) $(SEMCONVKIT)
261
261
262
262
ALL_MOD_PATHS := "" $(ALL_MODULES:.%=% )
263
263
264
- # Checks that the HEAD of the contrib repo checked out in CONTRIB_PATH compiles
265
- # against the current version of this repo.
266
- .PHONY : check-contrib
267
- check-contrib :
264
+ .PHONY : prepare-contrib
265
+ prepare-contrib :
268
266
@echo Setting contrib at $(CONTRIB_PATH ) to use this core checkout
269
267
@$(MAKE ) -j2 -C $(CONTRIB_PATH ) for-all CMD=" $( GOCMD) mod edit \
270
268
$(addprefix -replace ,$(join $(ALL_MOD_PATHS:%=go.opentelemetry.io/collector%= ) ,$(ALL_MOD_PATHS:%=$(CURDIR ) % ) ) ) "
271
269
@$(MAKE ) -j2 -C $(CONTRIB_PATH ) gotidy
272
270
273
271
@$(MAKE) generate-contrib
274
272
273
+ # Checks that the HEAD of the contrib repo checked out in CONTRIB_PATH compiles
274
+ # against the current version of this repo.
275
+ .PHONY : check-contrib
276
+ check-contrib :
275
277
@echo -e " \nRunning tests"
276
278
@$(MAKE ) -C $(CONTRIB_PATH ) gotest
277
279
You can’t perform that action at this time.
0 commit comments