Bump github.com/spf13/pflag from 1.0.5 to 1.0.6 #373
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
--- | |
name: Pull request checks | |
on: [pull_request] | |
permissions: | |
contents: read | |
jobs: | |
gomod: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: install Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version-file: .go-version | |
- name: check go.mod | |
# tidy go mod and check for differences | |
run: "go mod tidy && git diff --exit-code" | |
gofmt: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: install Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version-file: .go-version | |
- name: check format | |
# exit with 0 only if gofmt returns 0 lines | |
run: "exit $(gofmt | wc -l)" | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: install Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version-file: .go-version | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v2 | |
with: | |
version: v1.55.2 | |
# Give the job more time to execute. | |
# Regarding `--whole-files`, the linter is supposed to support linting of changed a patch only but, | |
# for some reason, it's very unreliable this way - sometimes it does not report any or some | |
# issues without linting the whole files, so we have to use `--whole-files` | |
# which can lead to some frustration from developers who would like to | |
# fix a single line in an existing codebase and the linter would force them | |
# into fixing all linting issues in the whole file instead. | |
args: --timeout=30m --whole-files | |
# Optional: if set to true then the action will use pre-installed Go. | |
skip-go-installation: true | |
# Optional: show only new issues if it's a pull request. The default value is `false`. | |
only-new-issues: true | |
license: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: install Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version-file: .go-version | |
- name: check license | |
# -d returns files without proper header | |
run: | | |
GOBIN=$PWD/bin go install github.com/elastic/go-licenser@latest | |
./bin/go-licenser -license Elasticv2 -d | |
fragments: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: install Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version-file: .go-version | |
- name: check fragments | |
run: | | |
make build | |
./elastic-agent-changelog-tool pr-has-fragment --repo elastic-agent-changelog-tool ${{github.event.number}} |