forked from signalfx/splunk-otel-collector
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (37 loc) · 1.05 KB
/
lint-examples.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
name: lint-examples
on:
pull_request:
paths:
- '.github/workflows/lint-examples.yml'
- '.golangci.yml'
- 'examples/**/*.go'
- 'examples/**/go.mod'
- 'examples/**/go.sum'
concurrency:
group: lint-examples-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
GO_VERSION: 1.22.7
jobs:
lint:
name: lint
# Use 20.04.5 until https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/16450 is resolved
runs-on: ubuntu-20.04
steps:
- name: Check out the codebase.
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: '**/go.sum'
- name: Lint
run: |
make install-tools
for gomod in $(find examples -name "go.mod"); do
dir=$(dirname $gomod)
pushd $dir >/dev/null
echo "Running 'make lint' in $dir ..."
make lint
popd >/dev/null
done