-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into upstream-main
- Loading branch information
Showing
95 changed files
with
9,011 additions
and
946 deletions.
There are no files selected for viewing
This file was deleted.
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
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,30 @@ | ||
name: golangci-lint | ||
on: | ||
push: | ||
paths: | ||
- "go.sum" | ||
- "go.mod" | ||
- "**.go" | ||
- "scripts/errcheck_excludes.txt" | ||
- ".github/workflows/golangci-lint.yml" | ||
- ".golangci.yml" | ||
pull_request: | ||
|
||
jobs: | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '>=1.20 <1.21' | ||
- name: Install snmp_exporter/generator dependencies | ||
run: sudo apt-get update && sudo apt-get -y install libsnmp-dev | ||
if: github.repository == 'prometheus/snmp_exporter' | ||
- name: Lint | ||
uses: golangci/golangci-lint-action@v3.3.1 | ||
with: | ||
version: v1.52.2 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
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,17 @@ | ||
name: sync fork with upstream | ||
|
||
on: | ||
schedule: | ||
- cron: '11 8 * * 1' # 8:11 UTC on Monday | ||
|
||
workflow_dispatch: # for manual testing | ||
|
||
jobs: | ||
sync-fork-pr: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: tgymnich/fork-sync@v1.7 | ||
with: | ||
owner: grafana | ||
base: main | ||
head: main |
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,54 @@ | ||
name: ci | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Upgrade golang | ||
run: | | ||
cd /tmp | ||
wget https://dl.google.com/go/go1.20.3.linux-amd64.tar.gz | ||
tar -zxvf go1.20.3.linux-amd64.tar.gz | ||
sudo rm -fr /usr/local/go | ||
sudo mv /tmp/go /usr/local/go | ||
cd - | ||
ls -l /usr/bin/go | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
|
||
# This file would normally be created by `make assets`, here we just | ||
# mock it because the file is required for the tests to pass. | ||
- name: Mock building of necessary react file | ||
run: mkdir web/ui/static/react && touch web/ui/static/react/index.html | ||
|
||
- name: Run Tests | ||
run: GO=/usr/local/go/bin/go make common-test | ||
|
||
test-stringlabels: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Upgrade golang | ||
run: | | ||
cd /tmp | ||
wget https://dl.google.com/go/go1.20.3.linux-amd64.tar.gz | ||
tar -zxvf go1.20.3.linux-amd64.tar.gz | ||
sudo rm -fr /usr/local/go | ||
sudo mv /tmp/go /usr/local/go | ||
cd - | ||
ls -l /usr/bin/go | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
|
||
# This file would normally be created by `make assets`, here we just | ||
# mock it because the file is required for the tests to pass. | ||
- name: Mock building of necessary react file | ||
run: mkdir web/ui/static/react && touch web/ui/static/react/index.html | ||
|
||
- name: Run Tests -tags=stringlabels | ||
run: GO=/usr/local/go/bin/go GOOPTS=-tags=stringlabels make common-test |
Oops, something went wrong.