Skip to content

Commit

Permalink
run dockerized
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas De Loof <[email protected]>
  • Loading branch information
ndeloof authored and glours committed Feb 25, 2025
1 parent eddcf70 commit 91e9c91
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 37 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
uses: actions/checkout@v4
- name: Check license
run: DOCKER_BUILDKIT=1 make check-license
- uses: actions/setup-go@v5
- name: Check deepcopy
run: |
make deepcopy
Expand Down
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,20 @@ fmt: ## Format go files
go fmt ./...

.PHONY: deepcopy
deepcopy:
goderive -h >/dev/null 2>&1 || go install github.com/awalterschulze/goderive@0a721d5b1d722ae6ba0dddefa1200607ca3ece97
goderive ./types/...
deepcopy: build-validate-image
docker run --rm -v .:/go/src $(IMAGE_PREFIX)validate goderive ./types/...

.PHONY: build-validate-image
build-validate-image:
docker build . -f ci/Dockerfile -t $(IMAGE_PREFIX)validate

.PHONY: lint
lint: build-validate-image
docker run --rm $(IMAGE_PREFIX)validate bash -c "golangci-lint run --config ./.golangci.yml ./..."
docker run --rm -v .:/go/src $(IMAGE_PREFIX)validate golangci-lint run --config ./.golangci.yml ./...

.PHONY: check-license
check-license: build-validate-image
docker run --rm $(IMAGE_PREFIX)validate bash -c "./scripts/validate/fileheader"
docker run --rm -v .:/go/src $(IMAGE_PREFIX)validate ltag -t scripts/validate/template --excludes "validate dotenv" --check -v

.PHONY: setup
setup: ## Setup the precommit hook
Expand Down
6 changes: 3 additions & 3 deletions ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:1.23
FROM golang:1.24

WORKDIR /go/src

ARG GOLANGCILINT_VERSION=v1.64.5
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCILINT_VERSION}
RUN go install github.com/kunalkushwaha/ltag@latest && rm -rf /go/src/github.com/kunalkushwaha

COPY . .
RUN go install github.com/awalterschulze/[email protected]
RUN go install github.com/kunalkushwaha/[email protected]
28 changes: 0 additions & 28 deletions scripts/validate/fileheader

This file was deleted.

0 comments on commit 91e9c91

Please sign in to comment.