Skip to content

Commit

Permalink
Change oldest supported Go version to 1.20
Browse files Browse the repository at this point in the history
  • Loading branch information
Danielius1922 committed Jan 9, 2024
1 parent cdf77a1 commit 6b10959
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 27 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Go 1.18+
- name: Set up Go 1.20+
uses: actions/setup-go@v5
with:
go-version: "^1.18" # The Go version to download (if necessary) and use.
go-version: "^1.20" # The Go version to download (if necessary) and use.
check-latest: true

- run: go version
Expand Down
17 changes: 2 additions & 15 deletions .github/workflows/staticAnalysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Go 1.18+
- name: Set up Go 1.20+
uses: actions/setup-go@v5
with:
go-version: "^1.18" # The Go version to download (if necessary) and use.
go-version: "^1.20" # The Go version to download (if necessary) and use.
check-latest: true

- run: go version
Expand All @@ -29,16 +29,3 @@ jobs:
export PATH=${PATH}:`go env GOPATH`/bin
go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
gocyclo -over 15 -ignore ".pb(.gw)?.go$|_test.go$|wsproxy" . || echo "gocyclo detected too complex functions"
# Disable aligncheck until it is compatible with golang v1.18
# - name: Install and run aligncheck
# run: |
# go get -u gitlab.com/opennota/check/cmd/aligncheck@latest
# aligncheck ./...

# Disable structslop until it is compatible with golang v1.18
# - name: Install and run structslop
# run: |
# export PATH=${PATH}:`go env GOPATH`/bin
# go install github.com/orijtech/structslop/cmd/structslop@latest
# structslop ./...
4 changes: 2 additions & 2 deletions .github/workflows/test-for-fork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
os: [ubuntu-latest, windows-latest, macOS-latest]

steps:
- name: Set up Go 1.18+
- name: Set up Go 1.20+
uses: actions/setup-go@v5
with:
go-version: "^1.18"
go-version: "^1.20"
check-latest: true

- run: go version
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
os: [ubuntu-latest, windows-latest, macOS-latest]

steps:
- name: Set up Go 1.18+
- name: Set up Go 1.20+
uses: actions/setup-go@v5
with:
go-version: "^1.18"
go-version: "^1.20"
check-latest: true

- run: go version
Expand Down Expand Up @@ -100,7 +100,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

test1_18:
# test on oldest supported major Go version
test1_20:
# don't run for forks
if: github.event_name == 'push' ||
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) ||
Expand All @@ -109,11 +110,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Set up Go 1.18
- name: Set up Go 1.20
uses: actions/setup-go@v5
with:
# Go 1.18 is required by coap-gateway-go1-18 in https://github.com/plgd-dev/hub/blob/main/.github/workflows/publishDockerImagesGhcr.yml
go-version: "~1.18"
go-version: "~1.20"

- run: go version

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The go-coap provides servers and clients for DTLS, TCP-TLS, UDP, TCP in golang l

## Requirements

* Go 1.18 or higher
* Go 1.20 or higher

## Samples

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/plgd-dev/go-coap/v3

go 1.18
go 1.20

require (
github.com/dsnet/golib/memfile v1.0.0
Expand Down

0 comments on commit 6b10959

Please sign in to comment.