diff --git a/.github/pipeline-descriptor.yml b/.github/pipeline-descriptor.yml index 59c3626..ac5e76e 100644 --- a/.github/pipeline-descriptor.yml +++ b/.github/pipeline-descriptor.yml @@ -5,3 +5,22 @@ github: codeowners: - path: "*" owner: "@buildpacks/implementation-maintainers" + +test: + steps: + - name: Install richgo + run: | + #!/usr/bin/env bash + + set -euo pipefail + + GO111MODULE=on go get -u -ldflags="-s -w" github.com/kyoh86/richgo + - name: Run Tests + run: | + #!/usr/bin/env bash + + set -euo pipefail + + GOCMD=richgo make + env: + RICHGO_FORCE_COLOR: "1" diff --git a/.github/pipelines-descriptor.yml b/.github/pipelines-descriptor.yml deleted file mode 100644 index 8979809..0000000 --- a/.github/pipelines-descriptor.yml +++ /dev/null @@ -1,3 +0,0 @@ -codeowners: -- path: "*" - owner: "@buildpacks/implementation-maintainers" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3c9ad9b..0f862dc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,19 +25,7 @@ jobs: set -euo pipefail - echo "Installing richgo ${RICHGO_VERSION}" - - mkdir -p "${HOME}"/bin - echo "${HOME}/bin" >> "${GITHUB_PATH}" - - curl \ - --location \ - --show-error \ - --silent \ - "https://github.com/kyoh86/richgo/releases/download/v${RICHGO_VERSION}/richgo_${RICHGO_VERSION}_linux_amd64.tar.gz" \ - | tar -C "${HOME}"/bin -xz richgo - env: - RICHGO_VERSION: 0.3.6 + GO111MODULE=on go get -u -ldflags="-s -w" github.com/kyoh86/richgo - name: Run Tests run: | #!/usr/bin/env bash diff --git a/Makefile b/Makefile index d4e04f8..cf4d62f 100644 --- a/Makefile +++ b/Makefile @@ -22,4 +22,4 @@ lint: install-golangci-lint @golangci-lint run -c golangci.yaml test: format lint - $(GOCMD) test -parallel=1 -count=1 -v ./... \ No newline at end of file + $(GOCMD) test -parallel=1 -count=1 -v ./... diff --git a/golangci.yaml b/golangci.yaml index 3dfc365..a3692be 100644 --- a/golangci.yaml +++ b/golangci.yaml @@ -7,17 +7,16 @@ linters: - bodyclose - deadcode - dogsled + - exportloopref - gocritic - goimports - - golint - gosec - gosimple - govet - ineffassign - - maligned - misspell - nakedret - - scopelint + - revive - staticcheck - structcheck - stylecheck @@ -29,4 +28,4 @@ linters: linters-settings: goimports: - local-prefixes: github.com/buildpacks/libcnb \ No newline at end of file + local-prefixes: github.com/buildpacks/libcnb diff --git a/layer.go b/layer.go index a4df307..5577bb0 100644 --- a/layer.go +++ b/layer.go @@ -22,6 +22,7 @@ import ( "path/filepath" "github.com/BurntSushi/toml" + "github.com/buildpacks/libcnb/internal" ) diff --git a/mocks/builder.go b/mocks/builder.go index 5ebdc1e..46e67e0 100644 --- a/mocks/builder.go +++ b/mocks/builder.go @@ -3,8 +3,9 @@ package mocks import ( - libcnb "github.com/buildpacks/libcnb" mock "github.com/stretchr/testify/mock" + + libcnb "github.com/buildpacks/libcnb" ) // Builder is an autogenerated mock type for the Builder type diff --git a/mocks/detector.go b/mocks/detector.go index 41ac38f..ee17320 100644 --- a/mocks/detector.go +++ b/mocks/detector.go @@ -3,8 +3,9 @@ package mocks import ( - libcnb "github.com/buildpacks/libcnb" mock "github.com/stretchr/testify/mock" + + libcnb "github.com/buildpacks/libcnb" ) // Detector is an autogenerated mock type for the Detector type diff --git a/mocks/layer_contributor.go b/mocks/layer_contributor.go index 4fc6546..cdac62c 100644 --- a/mocks/layer_contributor.go +++ b/mocks/layer_contributor.go @@ -3,8 +3,9 @@ package mocks import ( - libcnb "github.com/buildpacks/libcnb" mock "github.com/stretchr/testify/mock" + + libcnb "github.com/buildpacks/libcnb" ) // LayerContributor is an autogenerated mock type for the LayerContributor type