Skip to content

Commit d046475

Browse files
authored
Bump go version to 1.25 (#323)
* Bump go version to 1.25 Signed-off-by: Fiachra Corcoran <fiachra.corcoran@est.tech> * Fix failing CI runs Signed-off-by: Fiachra Corcoran <fiachra.corcoran@est.tech> * Fix if-else indentaion Signed-off-by: Fiachra Corcoran <fiachra.corcoran@est.tech> * Fix make test for podman Signed-off-by: Fiachra Corcoran <fiachra.corcoran@est.tech> * Fix missing coverage report Signed-off-by: Fiachra Corcoran <fiachra.corcoran@est.tech> --------- Signed-off-by: Fiachra Corcoran <fiachra.corcoran@est.tech>
1 parent 439f543 commit d046475

62 files changed

Lines changed: 279 additions & 212 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/golangci-lint.yaml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 The Nephio Authors
1+
# Copyright 2024-2025 The Nephio Authors
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -33,9 +33,6 @@ permissions:
3333
# Optional: allow read access to pull request. Use with `only-new-issues` option.
3434
# pull-requests: read
3535

36-
env:
37-
GO_VERSION: 1.23.8
38-
3936
jobs:
4037
golangci:
4138
name: lint
@@ -46,9 +43,6 @@ jobs:
4643
- name: Set up Go
4744
uses: actions/setup-go@v5
4845
with:
49-
go-version: ${{ env.GO_VERSION }}
50-
- name: golangci-lint
51-
uses: golangci/golangci-lint-action@v6
52-
with:
53-
version: v1.62.2
54-
args: --timeout=10m --go=${{ env.GO_VERSION }} --exclude-generated=true
46+
go-version-file: go.mod
47+
- name: Run Linter
48+
run: make lint

.github/workflows/gosec-scan.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,13 @@ jobs:
4343
- name: Set up Go
4444
uses: actions/setup-go@v5
4545
with:
46-
go-version: '>=1.23.8'
46+
go-version-file: go.mod
47+
4748
- name: Run Gosec Security Scanner
48-
uses: securego/gosec@v2.21.4
49-
with:
50-
# we let the report trigger content trigger a failure using the GitHub Security features.
51-
args: '-no-fail -exclude-dir=generated -exclude-dir=test -exclude-generated=true -fmt=sarif -out=results.sarif ./...'
49+
run: make gosec-sarif
50+
5251
- name: Upload SARIF file
5352
uses: github/codeql-action/upload-sarif@v3
5453
with:
55-
# Path to SARIF file relative to the root of the repository
56-
sarif_file: results.sarif
54+
sarif_file: gosec-results.sarif
5755
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/porch-e2e-dbcache.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ jobs:
3737
- name: Set up Go
3838
uses: actions/setup-go@v5
3939
with:
40-
go-version: '>=1.23.8'
40+
go-version-file: go.mod
4141
- name: Setup kubectl
4242
uses: azure/setup-kubectl@v4
4343
- name: Install kpt
4444
uses: jaxxstorm/action-install-gh-release@v2.1.0
4545
with:
4646
repo: kptdev/kpt
47-
tag: v1.0.0-beta.57
47+
tag: v1.0.0-beta.58
4848
chmod: 0755
4949
- name: Install Kind
5050
uses: helm/kind-action@v1

.github/workflows/porch-e2e.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ jobs:
3737
- name: Set up Go
3838
uses: actions/setup-go@v5
3939
with:
40-
go-version: '>=1.23.8'
40+
go-version-file: go.mod
4141
- name: Setup kubectl
4242
uses: azure/setup-kubectl@v4
4343
- name: Install kpt
4444
uses: jaxxstorm/action-install-gh-release@v2.1.0
4545
with:
4646
repo: kptdev/kpt
47-
tag: v1.0.0-beta.57
47+
tag: v1.0.0-beta.58
4848
chmod: 0755
4949
- name: Install Kind
5050
uses: helm/kind-action@v1

.github/workflows/porchctl-cli-e2e-dbcache.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ jobs:
3737
- name: Set up Go
3838
uses: actions/setup-go@v5
3939
with:
40-
go-version: '>=1.23.8'
40+
go-version-file: go.mod
4141
- name: Setup kubectl
4242
uses: azure/setup-kubectl@v4
4343
- name: Install kpt
4444
uses: jaxxstorm/action-install-gh-release@v2.1.0
4545
with:
4646
repo: kptdev/kpt
47-
tag: v1.0.0-beta.57
47+
tag: v1.0.0-beta.58
4848
chmod: 0755
4949
- name: Install Kind
5050
uses: helm/kind-action@v1

.github/workflows/porchctl-cli-e2e.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ jobs:
3737
- name: Set up Go
3838
uses: actions/setup-go@v5
3939
with:
40-
go-version: '>=1.23.8'
40+
go-version-file: go.mod
4141
- name: Setup kubectl
4242
uses: azure/setup-kubectl@v4
4343
- name: Install kpt
4444
uses: jaxxstorm/action-install-gh-release@v2.1.0
4545
with:
4646
repo: kptdev/kpt
47-
tag: v1.0.0-beta.57
47+
tag: v1.0.0-beta.58
4848
chmod: 0755
4949
- name: Install Kind
5050
uses: helm/kind-action@v1

.github/workflows/porchctl-dev-release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Set up Go
3232
uses: actions/setup-go@v5
3333
with:
34-
go-version: ">=1.23.8"
34+
go-version-file: go.mod
3535
- name: Checkout
3636
uses: actions/checkout@v4
3737
with:

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Set up Go
3232
uses: actions/setup-go@v5
3333
with:
34-
go-version: ">=1.23.8"
34+
go-version-file: go.mod
3535

3636
- name: Checkout
3737
uses: actions/checkout@v4

.github/workflows/sonar-ci-artifacts.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Set up Go
2121
uses: actions/setup-go@v5
2222
with:
23-
go-version: ">=1.23.8"
23+
go-version-file: go.mod
2424

2525
- name: Run unit tests to generate coverage report
2626
id: test

.golangci.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"formatters": {
3+
"enable": [
4+
"gofmt"
5+
],
6+
"exclusions": {
7+
"generated": "lax",
8+
"paths": [
9+
".*\\_test.go$",
10+
"test",
11+
"third_party/.*",
12+
"examples/.*"
13+
]
14+
}
15+
},
16+
"linters": {
17+
"default": "none",
18+
"enable": [
19+
"errcheck",
20+
"govet",
21+
"ineffassign",
22+
"nosprintfhostport",
23+
"staticcheck",
24+
"unused"
25+
],
26+
"exclusions": {
27+
"generated": "lax",
28+
"paths": [
29+
".*\\_test.go$",
30+
"test",
31+
"third_party/.*",
32+
"examples/.*"
33+
],
34+
"presets": [
35+
"comments",
36+
"common-false-positives",
37+
"legacy",
38+
"std-error-handling"
39+
]
40+
}
41+
},
42+
"run": {
43+
"build-tags": [
44+
"-buildvcs=false"
45+
]
46+
},
47+
"version": "2"
48+
}

0 commit comments

Comments
 (0)