diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d52390045..638268f38 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -21,6 +21,9 @@ updates: - dependency-name: "github.com/aquasecurity/go-version" - dependency-name: "github.com/knqyf263/go-apk-version" - dependency-name: "github.com/knqyf263/go-deb-version" + # v1 changed SlicesAsSets hashing, which changes every artifact ID syft produces + - dependency-name: "github.com/gohugoio/hashstructure" + update-types: ["version-update:semver-major"] - package-ecosystem: "github-actions" directories: diff --git a/.github/workflows/validations.yaml b/.github/workflows/validations.yaml index 95092a476..0186c5ace 100644 --- a/.github/workflows/validations.yaml +++ b/.github/workflows/validations.yaml @@ -51,8 +51,19 @@ jobs: name: "Unit tests" runs-on: ubuntu-latest needs: [Unit-Test-Linux, Unit-Test-Windows] + # a skipped job satisfies a required check, so this job must always run and fail explicitly + # unless every dependency succeeded (otherwise a failing PR can still be auto-merged) + if: ${{ always() }} steps: - - run: echo All unit tests passed! + - name: Require all unit test jobs to succeed + env: + NEEDS: ${{ toJSON(needs) }} + run: | + echo "$NEEDS" | jq -e 'length > 0 and all(.[]; .result == "success")' > /dev/null || { + echo "$NEEDS" | jq -r 'to_entries[] | "\(.key): \(.value.result)"' + exit 1 + } + echo All unit tests passed! Unit-Test-Linux: name: "Unit tests (Linux)" diff --git a/go.mod b/go.mod index 78194365b..aa6ed1670 100644 --- a/go.mod +++ b/go.mod @@ -46,7 +46,7 @@ require ( github.com/go-test/deep v1.1.1 github.com/go-viper/mapstructure/v2 v2.5.0 github.com/goccy/go-yaml v1.19.2 - github.com/gohugoio/hashstructure v1.1.0 + github.com/gohugoio/hashstructure v0.6.0 github.com/google/go-cmp v0.7.0 github.com/google/go-containerregistry v0.22.1 github.com/google/licensecheck v0.3.1 diff --git a/go.sum b/go.sum index 7b4ec387a..77524bcf6 100644 --- a/go.sum +++ b/go.sum @@ -470,8 +470,8 @@ github.com/goccy/go-yaml v1.19.2/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7Lk github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/gohugoio/hashstructure v1.1.0 h1:38yUfZBca6qXSbUpteLhjDGLNskclHaguFBYpjaRjf4= -github.com/gohugoio/hashstructure v1.1.0/go.mod h1:Pz8dcwjZs6FBKWu9x/ZIChrTHIM175zfUJK0KLvC1z8= +github.com/gohugoio/hashstructure v0.6.0 h1:7wMB/2CfXoThFYhdWRGv3u3rUM761Cq29CxUW+NltUg= +github.com/gohugoio/hashstructure v0.6.0/go.mod h1:lapVLk9XidheHG1IQ4ZSbyYrXcaILU1ZEP/+vno5rBQ= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=