forked from prometheus/node_exporter
-
Notifications
You must be signed in to change notification settings - Fork 18
66 lines (61 loc) · 1.9 KB
/
main.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
name: Node Exporter CI
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: ${{ github.workspace }}/go.mod
- run: go mod download
- run: make test-e2e
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: node_exporter
path: node_exporter
codespell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: sudo pip install codespell
- run: codespell --skip=".git,ttar,go.mod,go.sum,*pem,./collector/fixtures" -I scripts/codespell_ignore.txt
test_mixins:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: ${{ github.workspace }}/go.mod
- run: go install github.com/google/go-jsonnet/cmd/jsonnet@latest
- run: go install github.com/google/go-jsonnet/cmd/jsonnetfmt@latest
- run: go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest
- run: make promtool
- run: make -C docs/node-mixin clean
- run: make -C docs/node-mixin jb_install
- run: make -C docs/node-mixin
- run: git diff --exit-code
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: ${{ github.workspace }}/go.mod
- run: docker run --privileged linuxkit/binfmt:v0.8
- run: make promtool
- run: make promu
- run: promu crossbuild -v --parallelism 3 --parallelism-thread 3
- run: promu --config .promu-cgo.yml crossbuild -v --parallelism 3 --parallelism-thread 3
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: build
path: .build