-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #236 from nats-io/deps-update
CI and Dependency Updates
- Loading branch information
Showing
26 changed files
with
417 additions
and
359 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,35 @@ | ||
name: Test Coverage | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- '**.md' | ||
|
||
jobs: | ||
coverage: | ||
name: Test Coverage | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: go.mod | ||
|
||
- name: Setup Goveralls | ||
run: go install github.com/mattn/[email protected] | ||
|
||
- name: Lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
skip-pkg-cache: true | ||
|
||
- name: Run Tests | ||
run: make test-cov | ||
|
||
- name: Run Coveralls | ||
run: goveralls -coverprofile=collector.out,exporter.out -service=github | ||
env: | ||
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 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,26 @@ | ||
name: Test | ||
on: | ||
push: | ||
paths-ignore: | ||
- '**.md' | ||
pull_request: | ||
paths-ignore: | ||
- '**.md' | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macOS-latest, windows-latest] | ||
runs-on: ${{matrix.os}} | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: go.mod | ||
|
||
- name: Run Tests | ||
run: make test |
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,22 @@ | ||
issues: | ||
exclude-use-default: false | ||
max-same-issues: 0 | ||
linters: | ||
enable: | ||
- dupl | ||
- exportloopref | ||
- gochecknoinits | ||
- gocritic | ||
- gocyclo | ||
- gofmt | ||
- goimports | ||
- lll | ||
- misspell | ||
- nakedret | ||
- prealloc | ||
- revive | ||
- stylecheck | ||
- unconvert | ||
- unparam | ||
disable: | ||
- errcheck |
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 |
---|---|---|
|
@@ -2,26 +2,23 @@ | |
project_name: prometheus-nats-exporter | ||
|
||
release: | ||
name_template: 'Release {{.Tag}}' | ||
draft: true | ||
github: | ||
owner: nats-io | ||
name: prometheus-nats-exporter | ||
|
||
name_template: 'Release {{.Tag}}' | ||
|
||
env: | ||
- IMAGE_REPOSITORY={{ if index .Env "IMAGE_REGISTRY" }}{{ .Env.IMAGE_REGISTRY }}/{{ end }}{{ .ProjectName }} | ||
|
||
builds: | ||
- id: prometheus-nats-exporter | ||
main: . | ||
binary: prometheus-nats-exporter | ||
main: . | ||
ldflags: | ||
- -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}} | ||
env: | ||
- GO111MODULE=on | ||
- CGO_ENABLED=0 | ||
goos: | ||
- darwin | ||
- linux | ||
- darwin | ||
- windows | ||
- freebsd | ||
goarch: | ||
|
@@ -30,6 +27,7 @@ builds: | |
- arm64 | ||
- 386 | ||
- mips64le | ||
- s390x | ||
goarm: | ||
- 6 | ||
- 7 | ||
|
@@ -43,33 +41,34 @@ builds: | |
- goos: freebsd | ||
goarch: 386 | ||
|
||
archives: | ||
- name_template: '{{.ProjectName}}-{{.Tag}}-{{.Os}}-{{.Arch}}{{if .Arm}}{{.Arm}}{{end}}' | ||
wrap_in_directory: true | ||
format: zip | ||
files: | ||
- README.md | ||
- LICENSE | ||
- name_template: '{{.ProjectName}}-{{.Tag}}-{{.Os}}-{{.Arch}}{{if .Arm}}{{.Arm}}{{end}}' | ||
id: targz-archives | ||
wrap_in_directory: true | ||
format: tar.gz | ||
files: | ||
- README.md | ||
- LICENSE | ||
|
||
checksum: | ||
name_template: '{{ .ProjectName }}-v{{ .Version }}-checksums.txt' | ||
name_template: 'checksums.txt' | ||
|
||
snapshot: | ||
name_template: SNAPSHOT-{{ .Commit }} | ||
archives: | ||
- format: tar.gz | ||
name_template: >- | ||
{{ .ProjectName }}-v{{ .Version }}- | ||
{{- .Os }}- | ||
{{- if eq .Arch "amd64" }}x86_64 | ||
{{- else if eq .Arch "386" }}i386 | ||
{{- else }}{{ .Arch }}{{ end }} | ||
{{- if .Arm }}v{{ .Arm }}{{ end }} | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
|
||
nfpms: | ||
- file_name_template: '{{.ProjectName}}-{{.Tag}}-{{.Arch}}{{if .Arm}}{{.Arm}}{{end}}' | ||
homepage: https://nats.io | ||
description: A Prometheus exporter for NATS | ||
maintainer: Colin Sullivan <[email protected]> | ||
vendor: nats.io | ||
license: Apache 2.0 | ||
formats: | ||
- formats: | ||
- deb | ||
file_name_template: >- | ||
{{ .ProjectName }}-v{{ .Version }}- | ||
{{- .Os }}- | ||
{{- if eq .Arch "amd64" }}x86_64 | ||
{{- else if eq .Arch "386" }}i386 | ||
{{- else }}{{ .Arch }}{{ end }} | ||
{{- if .Arm }}v{{ .Arm }}{{ end }} | ||
description: A Prometheus exporter for NATS | ||
vendor: nats.io | ||
homepage: https://nats.io | ||
license: Apache 2.0 | ||
maintainer: Synadia <[email protected]> |
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
Oops, something went wrong.