-
-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: cleanup CI flows - remove codeql - pin 3rd-party action versions Signed-off-by: Pavel Boldyrev <[email protected]> * run linter only if go files changed Signed-off-by: Pavel Boldyrev <[email protected]> * run build/test only if go files changed Signed-off-by: Pavel Boldyrev <[email protected]> --------- Signed-off-by: Pavel Boldyrev <[email protected]>
- Loading branch information
Showing
5 changed files
with
44 additions
and
90 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,17 +9,30 @@ on: | |
permissions: | ||
contents: read | ||
pull-requests: read | ||
|
||
jobs: | ||
|
||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
fetch-depth: 1 | ||
|
||
- uses: dorny/[email protected] | ||
id: filter | ||
with: | ||
filters: | | ||
go: | ||
- '**/*.go' | ||
- uses: actions/setup-go@v4 | ||
if: steps.filter.outputs.go == 'true' | ||
with: | ||
go-version-file: 'go.mod' | ||
|
||
- name: golangci-lint | ||
if: steps.filter.outputs.go == 'true' | ||
run: | | ||
go run -modfile=tools/go.mod github.com/golangci/golangci-lint/cmd/golangci-lint run -v --timeout 5m |
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 |
---|---|---|
|
@@ -28,14 +28,14 @@ jobs: | |
|
||
- name: Import GPG key | ||
id: import_gpg | ||
uses: crazy-max/ghaction-import-gpg@v6 | ||
uses: crazy-max/ghaction-import-gpg@82a020f1f7f605c65dd2449b392a52c3fcfef7ef #v6.0.0 | ||
with: | ||
git_user_signingkey: true | ||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
passphrase: ${{ secrets.PASSPHRASE }} | ||
|
||
- name: Run GoReleaser | ||
uses: goreleaser/[email protected] | ||
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 #v5.0.0 | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
|
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 |
---|---|---|
@@ -1,16 +1,12 @@ | ||
name: Tests | ||
on: | ||
pull_request: | ||
paths-ignore: | ||
- 'README.md' | ||
pull_request: {} | ||
push: | ||
branches: | ||
- main | ||
- "release/**" | ||
paths-ignore: | ||
- 'README.md' | ||
jobs: | ||
# ensure the code builds... | ||
|
||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
|
@@ -19,16 +15,28 @@ jobs: | |
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- uses: dorny/[email protected] | ||
id: filter | ||
with: | ||
filters: | | ||
go: | ||
- '**/*.go' | ||
- name: Set up Go | ||
if: steps.filter.outputs.go == 'true' | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: 'go.mod' | ||
|
||
- name: Get dependencies | ||
if: steps.filter.outputs.go == 'true' | ||
run: go mod download | ||
|
||
- name: Build | ||
if: steps.filter.outputs.go == 'true' | ||
run: go vet . && go build -v . | ||
|
||
test: | ||
|
@@ -37,18 +45,29 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v4 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- uses: dorny/[email protected] | ||
id: filter | ||
with: | ||
filters: | | ||
go: | ||
- '**/*.go' | ||
- name: Set up Go | ||
if: steps.filter.outputs.go == 'true' | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: 'go.mod' | ||
|
||
- name: Get dependencies | ||
if: steps.filter.outputs.go == 'true' | ||
run: go mod download | ||
|
||
- name: Unit tests | ||
if: steps.filter.outputs.go == 'true' | ||
timeout-minutes: 10 | ||
run: go test -v -cover ./... | ||
|
||
|