-
Notifications
You must be signed in to change notification settings - Fork 156
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
Showing
6 changed files
with
44 additions
and
121 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
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,53 +1,36 @@ | ||
name: Checks | ||
|
||
# Run on push to main and any pull request. | ||
# Allow manual execution of the workflow. | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
checks: write # Allow write access to checks to allow annotation of code in the PR. | ||
contents: read | ||
pull-requests: read | ||
|
||
jobs: | ||
|
||
checks: | ||
name: Check Process | ||
runs-on: ubuntu-latest | ||
env: | ||
GO_VERSION: oldstable | ||
GOLANGCI_LINT_VERSION: v1.56.2 | ||
CGO_ENABLED: 0 | ||
|
||
steps: | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
|
||
- name: Check and get dependencies | ||
go-version: stable | ||
- name: Check if go.mod is tidy | ||
run: | | ||
go mod tidy | ||
git diff --exit-code go.mod | ||
git diff --exit-code go.sum | ||
- name: vendoring | ||
run: go mod vendor | ||
|
||
- name: vendoring diff | ||
run: git diff --exit-code vendor/ | ||
|
||
# https://golangci-lint.run/usage/install#other-ci | ||
- name: Install golangci-lint ${{ env.GOLANGCI_LINT_VERSION }} | ||
git diff --exit-code go.mod go.sum || (echo "::error::go.mod and go.sum need to be tidy" && exit 1) | ||
- name: Check if vendor directory is up to date | ||
run: | | ||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCI_LINT_VERSION} | ||
golangci-lint run | ||
go mod vendor | ||
git diff --exit-code vendor || (echo "::error::vendor directory needs to be updated" && exit 1) | ||
- name: Run GolangCI-Lint | ||
uses: golangci/golangci-lint-action@v4 | ||
with: | ||
version: latest |
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 |
---|---|---|
|
@@ -37,7 +37,3 @@ tags | |
.idea | ||
|
||
.vscode/* | ||
|
||
# Build output | ||
/dist/ | ||
profile.cov |
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