forked from prometheus/node_exporter
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
76e8fbe
commit e1657b5
Showing
821 changed files
with
1,366 additions
and
286,994 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Go | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- v[0-9]+.[0-9]+.[0-9]+* | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
strategy: | ||
matrix: | ||
go-version: | ||
- 1.15 | ||
- 1.16 | ||
include: | ||
- go-version: tip | ||
os: ubuntu-latest | ||
postgresql-image: postgres:12 | ||
may-fail: true | ||
runs-on: ubuntu-latest | ||
# The environment this job references | ||
environment: | ||
name: CI | ||
steps: | ||
- name: Set up Go release | ||
if: matrix.go-version != 'tip' | ||
uses: percona-platform/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- name: Set up Go tip | ||
if: matrix.go-version == 'tip' | ||
env: | ||
# to avoid error due to `go version` accepting -v flag with an argument since 1.15 | ||
GOFLAGS: "" | ||
run: | | ||
git clone --depth=1 https://go.googlesource.com/go $HOME/gotip | ||
cd $HOME/gotip/src | ||
./make.bash | ||
echo "GOROOT=$HOME/gotip" >> $GITHUB_ENV | ||
echo "$HOME/gotip/bin" >> $GITHUB_PATH | ||
- name: Checkout code | ||
uses: percona-platform/checkout@v2 | ||
- name: Run checks | ||
run: | | ||
go build -modfile=tools/go.mod -o bin/golangci-lint github.com/golangci/golangci-lint/cmd/golangci-lint | ||
go build -modfile=tools/go.mod -o bin/reviewdog github.com/reviewdog/reviewdog/cmd/reviewdog | ||
bin/golangci-lint run -c=.golangci-required.yml --out-format=line-number | env REVIEWDOG_GITHUB_API_TOKEN=${{ secrets.GITHUB_TOKEN }} bin/reviewdog -f=golangci-lint -level=error -reporter=github-pr-check | ||
bin/golangci-lint run -c=.golangci.yml --out-format=line-number | env REVIEWDOG_GITHUB_API_TOKEN=${{ secrets.GITHUB_TOKEN }} bin/reviewdog -f=golangci-lint -level=error -reporter=github-pr-review | ||
- name: Run Install | ||
run: go install -v ./... | ||
- name: Run debug commands on failure | ||
if: ${{ failure() }} | ||
run: | | ||
env | ||
go version | ||
go env | ||
pwd | ||
git status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module github.com/percona/node_exporter/tools | ||
|
||
go 1.16 | ||
|
||
require ( | ||
github.com/golangci/golangci-lint v1.40.1 | ||
github.com/prometheus/promu v0.12.0 | ||
github.com/reviewdog/reviewdog v0.11.0 | ||
) |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// node_exporter | ||
|
||
//go:build tools | ||
// +build tools | ||
|
||
package tools | ||
|
||
import ( | ||
_ "github.com/golangci/golangci-lint/cmd/golangci-lint" | ||
_ "github.com/prometheus/promu" | ||
_ "github.com/reviewdog/reviewdog/cmd/reviewdog" | ||
) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.