-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.github/workflows: Refresh and modernize workflows (#265)
Verified locally via `act pull_request`.
- Loading branch information
Showing
4 changed files
with
78 additions
and
87 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 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,47 @@ | ||
name: Test | ||
on: pull_request | ||
|
||
jobs: | ||
go_mod: | ||
name: go mod | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 | ||
with: | ||
go-version-file: 'go.mod' | ||
- name: go mod | ||
run: | | ||
echo "==> Checking source code with go mod vendor..." | ||
go mod tidy | ||
git diff --exit-code -- go.mod go.sum || \ | ||
(echo; echo "Unexpected difference in go.mod/go.sum files. Run 'go mod tidy' command or revert any go.mod/go.sum changes and commit."; exit 1) | ||
echo "==> Checking source code with go mod vendor..." | ||
go mod vendor | ||
git diff --compact-summary --exit-code -- vendor || \ | ||
(echo; echo "Unexpected difference in vendor/ directory. Run 'go mod vendor' command or revert any go.mod/go.sum/vendor changes and commit."; exit 1) | ||
go_test: | ||
name: go test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 | ||
with: | ||
go-version-file: 'go.mod' | ||
- run: go test ./... | ||
goreleaser: | ||
name: goreleaser | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 | ||
with: | ||
go-version-file: 'go.mod' | ||
- name: goreleaser check | ||
uses: goreleaser/goreleaser-action@f82d6c1c344bcacabba2c841718984797f664a6b # v4.2.0 | ||
with: | ||
args: check | ||
- name: goreleaser build | ||
uses: goreleaser/goreleaser-action@f82d6c1c344bcacabba2c841718984797f664a6b # v4.2.0 | ||
with: | ||
args: build --snapshot |
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