Skip to content

Commit

Permalink
Merge pull request #382 from praveenrewar/bump-go
Browse files Browse the repository at this point in the history
Bump go
  • Loading branch information
joaopapereira authored May 17, 2024
2 parents 9e6fdb7 + 183d6f1 commit 537623d
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 22 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.22.2
- uses: actions/checkout@v2
go-version: '1.22'
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6
with:
version: v1.54
version: v1.58
args: -v

6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.22.2
go-version: '1.22'
- name: Set up Cosign
uses: sigstore/cosign-installer@v3
- name: Retrieve version
Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/test-gh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,27 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v1
uses: actions/setup-go@v5
with:
go-version: 1.22.2
go-version: '1.22'
- name: Check out code into the Go module directory
uses: actions/checkout@v1
uses: actions/checkout@v4
with:
path: src/github.com/${{ github.repository }}
fetch-depth: 0
- name: Run Tests
env:
VENDIR_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -e -x
export GOPATH=$(echo `pwd`/../../../../)
export GOPATH=$(pwd)
# Delete default installed helm
sudo rm `which helm`
mkdir -p /tmp/bin
export PATH=/tmp/bin:$PATH
# imgpkg
wget -O- https://github.com/k14s/imgpkg/releases/download/v0.7.0/imgpkg-linux-amd64 > /tmp/bin/imgpkg && \
echo "bb90881c2c03cad4d50b2f0881d1330d341a37bb55bd8fff50bf228f7cfcf3d2 /tmp/bin/imgpkg" | shasum -c - && \
chmod +x /tmp/bin/imgpkg
# helm 2
wget -O- https://get.helm.sh/helm-v2.17.0-linux-amd64.tar.gz > /tmp/helm2.tgz && \
echo "f3bec3c7c55f6a9eb9e6586b8c503f370af92fe987fcbf741f37707606d70296 /tmp/helm2.tgz" | shasum -c - && \
Expand All @@ -48,6 +44,8 @@ jobs:
mkdir /tmp/helm3-unpacked && tar -C /tmp/helm3-unpacked -xzvf /tmp/helm3.tgz && \
mv /tmp/helm3-unpacked/linux-amd64/helm /tmp/bin/helm3
cd "src/github.com/${{ github.repository }}"
export VENDIR_E2E_HELM2_BINARY=helm2
export VENDIR_E2E_HELM3_BINARY=helm3
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/trivy-scan.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Trivy CVE Dependency Scanner

on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'

Expand All @@ -10,7 +11,7 @@ jobs:
with:
repo: carvel-dev/vendir
tool: vendir
goVersion: 1.22.2
goVersion: '1.22'
secrets:
githubToken: ${{ secrets.GITHUB_TOKEN }}
slackWebhookURL: ${{ secrets.SLACK_WEBHOOK_URL }}
5 changes: 5 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ linters-settings:
regexp:
copyright-year: 20[0-9][0-9]
template-path: code-header-template.txt
revive:
enable-all: true
rules:
- name: dot-imports
disabled: true
issues:
max-issues-per-linter: 0
max-same-issues: 0
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module carvel.dev/vendir

go 1.22
go 1.22.3

require (
carvel.dev/imgpkg v0.42.0
Expand Down
2 changes: 1 addition & 1 deletion pkg/vendir/directory/staging_dir.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (d StagingDir) CopyExistingFiles(rootDir string, stagingPath string, ignore

// Consider WalkDir in the future for efficiency (Go 1.16)
// Walk root path above to determine files that can be ignored
err := filepath.Walk(rootPath, func(path string, info os.FileInfo, err error) error {
err := filepath.Walk(rootPath, func(path string, _ os.FileInfo, err error) error {
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/vendir/directory/symlink.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func ValidateSymlinks(path string) error {
return err
}
rootSegments := strings.Split(absRoot, string(os.PathSeparator))
return filepath.WalkDir(path, func(path string, info fs.DirEntry, err error) error {
return filepath.WalkDir(path, func(path string, info fs.DirEntry, _ error) error {
if info.Type()&os.ModeSymlink == os.ModeSymlink {
resolvedPath, err := filepath.EvalSymlinks(path)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/concurrent_processes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ directories:
wg := sync.WaitGroup{}
for i := 0; i < processes; i++ {
wg.Add(1)
go func(n int, t *testing.T, wg *sync.WaitGroup) {
go func(n int, _ *testing.T, wg *sync.WaitGroup) {
defer wg.Done()
// RunWithOpts invokes t.Fatal on error
vendir.RunWithOpts(
Expand Down

0 comments on commit 537623d

Please sign in to comment.