From 7137d0c3b3f9a157e587a359d91d3f9a67b38813 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Jan 2024 19:19:24 +0000 Subject: [PATCH 1/4] Bump the go-dependencies group with 2 updates Bumps the go-dependencies group with 2 updates: [github.com/google/go-containerregistry](https://github.com/google/go-containerregistry) and [golang.org/x/sync](https://github.com/golang/sync). Updates `github.com/google/go-containerregistry` from 0.16.1 to 0.17.0 - [Release notes](https://github.com/google/go-containerregistry/releases) - [Changelog](https://github.com/google/go-containerregistry/blob/main/.goreleaser.yml) - [Commits](https://github.com/google/go-containerregistry/compare/v0.16.1...v0.17.0) Updates `golang.org/x/sync` from 0.4.0 to 0.6.0 - [Commits](https://github.com/golang/sync/compare/v0.4.0...v0.6.0) --- updated-dependencies: - dependency-name: github.com/google/go-containerregistry dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: golang.org/x/sync dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies ... Signed-off-by: dependabot[bot] --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index c9f1d9be..985d8295 100644 --- a/go.mod +++ b/go.mod @@ -3,10 +3,10 @@ module github.com/buildpacks/imgutil require ( github.com/docker/docker v24.0.7+incompatible github.com/google/go-cmp v0.6.0 - github.com/google/go-containerregistry v0.16.1 + github.com/google/go-containerregistry v0.17.0 github.com/pkg/errors v0.9.1 github.com/sclevine/spec v1.4.0 - golang.org/x/sync v0.4.0 + golang.org/x/sync v0.6.0 ) require ( diff --git a/go.sum b/go.sum index bf61d4ae..4e44d673 100644 --- a/go.sum +++ b/go.sum @@ -26,8 +26,8 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-containerregistry v0.16.1 h1:rUEt426sR6nyrL3gt+18ibRcvYpKYdpsa5ZW7MA08dQ= -github.com/google/go-containerregistry v0.16.1/go.mod h1:u0qB2l7mvtWVR5kNcbFIhFY1hLbf8eeGapA+vbFDCtQ= +github.com/google/go-containerregistry v0.17.0 h1:5p+zYs/R4VGHkhyvgWurWrpJ2hW4Vv9fQI+GzdcwXLk= +github.com/google/go-containerregistry v0.17.0/go.mod h1:u0qB2l7mvtWVR5kNcbFIhFY1hLbf8eeGapA+vbFDCtQ= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= @@ -81,8 +81,8 @@ golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= -golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= From 2fa73b736ce45c4cf4b621b513150a7592f8c7d9 Mon Sep 17 00:00:00 2001 From: satyazzz123 Date: Thu, 18 Jan 2024 20:05:51 +0530 Subject: [PATCH 2/4] added codecov to .github workflows Signed-off-by: satyazzz123 --- .github/workflows/test.yaml | 9 +++++++++ Makefile | 5 ++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c509b45d..ac2cee34 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -19,6 +19,10 @@ jobs: go-version: '1.20' - name: Test run: make test + - name: Upload Coverage to Codecov + uses: codecov/codecov-action@v2 + with: + token: ${{ secrets.CODECOV_TOKEN }} test-and-build-windows: runs-on: windows-2019 steps: @@ -29,3 +33,8 @@ jobs: go-version: '1.20' - name: Test run: make test + - name: Upload Coverage to Codecov + uses: codecov/codecov-action@v2 + with: + token: ${{ secrets.CODECOV_TOKEN }} + diff --git a/Makefile b/Makefile index 4406abb4..d9b29c70 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,10 @@ else endif test: layer/bcdhive_generated.go format lint - $(GOCMD) test -parallel=1 -count=1 -v ./... + $(GOCMD) test -parallel=1 -count=1 -coverprofile=coverage.out -v ./... + +codecov: test + $(GOCMD) tool cover -html=coverage.out tidy: $(GOCMD) mod tidy && cd tools && $(GOCMD) mod tidy -compat=1.17 && cd bcdhive_generator && $(GOCMD) mod tidy From 480c197634ccd8e1fbaf40b131e3dfc3d124907f Mon Sep 17 00:00:00 2001 From: Natalie Arellano Date: Mon, 5 Feb 2024 11:57:06 -0500 Subject: [PATCH 3/4] Add Codecov config Signed-off-by: Natalie Arellano --- codecov.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 codecov.yml diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000..d1cc3761 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,18 @@ +codecov: + notify: + after_n_builds: 2 + +coverage: + round: up + status: + project: + default: + threshold: 1% + patch: + default: + threshold: 10% + +comment: + layout: "reach,diff,flags" + require_changes: yes + after_n_builds: 2 From f297c5584ae5088e316bf7bbc3854108980e6b73 Mon Sep 17 00:00:00 2001 From: Natalie Arellano Date: Mon, 5 Feb 2024 11:55:06 -0500 Subject: [PATCH 4/4] Upgrade to go 1.21 Signed-off-by: Natalie Arellano --- .github/workflows/test.yaml | 4 ++-- go.mod | 2 +- go.sum | 3 +++ tools/bcdhive_generator/Dockerfile | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index ac2cee34..35aa37c0 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -16,7 +16,7 @@ jobs: - name: Set up go uses: actions/setup-go@v5 with: - go-version: '1.20' + go-version-file: 'go.mod' - name: Test run: make test - name: Upload Coverage to Codecov @@ -30,7 +30,7 @@ jobs: - name: Set up go uses: actions/setup-go@v5 with: - go-version: '1.20' + go-version-file: 'go.mod' - name: Test run: make test - name: Upload Coverage to Codecov diff --git a/go.mod b/go.mod index c9f1d9be..5209237b 100644 --- a/go.mod +++ b/go.mod @@ -33,4 +33,4 @@ require ( golang.org/x/tools v0.9.1 // indirect ) -go 1.20 +go 1.21 diff --git a/go.sum b/go.sum index bf61d4ae..7a514a58 100644 --- a/go.sum +++ b/go.sum @@ -7,6 +7,7 @@ github.com/containerd/stargz-snapshotter/estargz v0.14.3 h1:OqlDCK3ZVUO6C3B/5FSk github.com/containerd/stargz-snapshotter/estargz v0.14.3/go.mod h1:KY//uOCIkSuNAHhJogcZtrNHdKrA99/FCCRjE3HD36o= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -94,6 +95,7 @@ golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -110,3 +112,4 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= +gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= diff --git a/tools/bcdhive_generator/Dockerfile b/tools/bcdhive_generator/Dockerfile index cb51ca8e..7b21f2cc 100644 --- a/tools/bcdhive_generator/Dockerfile +++ b/tools/bcdhive_generator/Dockerfile @@ -1,5 +1,5 @@ ARG go_version -FROM golang:${go_version}-buster +FROM golang:${go_version}-bullseye RUN apt update \ && apt install -y libhivex-dev libhivex-bin libwin-hivex-perl