Skip to content
This repository was archived by the owner on Jul 12, 2023. It is now read-only.

Upgrade to Go 1.19 #2368

Merged
merged 2 commits into from
Aug 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 6 additions & 18 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,10 @@ jobs:

- uses: actions/setup-go@v3
with:
go-version: '1.18'
go-version: '1.19'

- uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
key: ${{ runner.os }}-go-test-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-test-
${{ runner.os }}-go-
- name: Download modules
run: go mod download

- name: go-test
shell: bash
Expand Down Expand Up @@ -74,16 +68,10 @@ jobs:

- uses: actions/setup-go@v3
with:
go-version: '1.18'
go-version: '1.19'

- uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
key: ${{ runner.os }}-go-lint-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-lint-
${{ runner.os }}-go-
- name: Download modules
run: go mod download

- name: go-lint
shell: bash
Expand Down
16 changes: 14 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,24 @@ GO_FILES = $(shell find . -name \*.go)
MD_FILES = $(shell find . -name \*.md)
PO_FILES = $(shell find . -name \*.po)

# diff-check runs git-diff and fails if there are any changes.
diff-check:
@FINDINGS="$$(git status -s -uall)" ; \
if [ -n "$${FINDINGS}" ]; then \
echo "Changed files:\n\n" ; \
echo "$${FINDINGS}\n\n" ; \
echo "Diffs:\n\n" ; \
git diff ; \
git diff --cached ; \
exit 1 ; \
fi
.PHONY: diff-check

generate:
@go generate ./...
.PHONY: generate

generate-check: generate
@git update-index --refresh && git diff-index --quiet HEAD --
generate-check: generate diff-check
.PHONY: generate-check

# lint uses the same linter as CI and tries to report the same results running
Expand Down
Loading