forked from open-telemetry/opentelemetry-collector
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (65 loc) · 1.96 KB
/
contrib-tests.yml
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
62
63
64
65
66
67
68
69
name: contrib-tests
on:
push:
branches: [main]
tags:
- v[0-9]+.[0-9]+.[0-9]+.*
pull_request:
types: [opened, ready_for_review, synchronize, reopened, labeled, unlabeled]
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
contrib-tests-matrix:
runs-on: ubuntu-latest
if: ${{ !contains(github.event.pull_request.labels.*.name, 'Skip Contrib Tests') }}
strategy:
fail-fast: false
matrix:
group:
- receiver-0
- receiver-1
- receiver-2
- receiver-3
- processor
- exporter-0
- exporter-1
- extension
- connector
- internal
- pkg
- cmd-0
- cmd-1
- other
steps:
- name: Checkout Repo
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Setup Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: ~1.22.7
cache: false
- name: Run Contrib Tests
run: |
contrib_path=/tmp/opentelemetry-collector-contrib
git clone --depth=1 https://github.com/open-telemetry/opentelemetry-collector-contrib.git $contrib_path
make CONTRIB_PATH=$contrib_path SKIP_RESTORE_CONTRIB=true GROUP=${{ matrix.group }} check-contrib
contrib_tests:
runs-on: ubuntu-latest
if: ${{ !contains(github.event.pull_request.labels.*.name, 'Skip Contrib Tests') }}
needs: [contrib-tests-matrix]
steps:
- name: Print result
run: echo ${{ needs.contrib-tests-matrix.result }}
- name: Interpret result
run: |
if [[ success == ${{ needs.contrib-tests-matrix.result }} ]]
then
echo "All matrix jobs passed!"
else
echo "One or more matrix jobs failed."
false
fi