From e624cf1405084767230d7bd902143ae5770cac3b Mon Sep 17 00:00:00 2001 From: Kemal Akkoyun Date: Tue, 4 Nov 2025 16:00:27 +0100 Subject: [PATCH 01/14] chore(build): enhance Makefile with orchestrion-style tooling and automation Add comprehensive build tooling and automation following DataDog orchestrion best practices to improve developer experience and code quality workflows. Key additions: - Auto-generated help system (make help) with self-documenting targets - Code quality automation: format (Go/YAML) and lint (Go/YAML/Actions) - Enhanced test targets: test-unit and test-integration with gotestfmt - GitHub Actions security tools: ratchet for pinning actions - Auto-installing development tools on first use - Documentation generation support with embedmd - Organized target structure with clear categories New tools integrated (auto-install on first use): - golangci-lint: Go linter aggregator - gotestfmt: Pretty test output formatting - yamlfmt: YAML formatter and linter - actionlint: GitHub Actions workflow linter - ratchet: GitHub Actions security pinning - embedmd: Documentation embedding tool Configuration: - Added .yamlfmt for consistent YAML formatting - Updated CONTRIBUTING.md with comprehensive development guide - Renamed test-e2e to test-integration for accuracy All existing targets remain backward compatible. Signed-off-by: Kemal Akkoyun --- Makefile | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/Makefile b/Makefile index 36e0e77..8271d25 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ help: ## Show this help message @echo 'Usage: make [target]' @echo '' @echo 'Targets:' - @awk 'BEGIN {FS = ":.*?## "} /^[A-Za-z0-9_.\/-]+:.*?## / {printf " %-20s %s\n", $$1, $$2}' $(MAKEFILE_LIST) + @awk 'BEGIN {FS = ":.*?## "} /^[A-Za-z0-9_./-]+:.*?## / {printf " %-20s %s\n", $$1, $$2}' $(MAKEFILE_LIST) all: build format lint test @@ -50,29 +50,24 @@ install: ## Install otel to $$GOPATH/bin @go mod tidy go install -ldflags "-X main.Version=$(VERSION) -X main.CommitHash=$(COMMIT_HASH) -X main.BuildTime=$(BUILD_TIME)" ./$(TOOL_DIR) -.ONESHELL: -SHELL := /bin/bash package: ## Package the instrumentation code into binary @echo "Packaging instrumentation code into binary..." - set -euo pipefail - rm -rf $(INST_PKG_TMP) - cp -a pkg $(INST_PKG_TMP) - (cd $(INST_PKG_TMP) && go mod tidy) - tar -czf $(INST_PKG_GZIP) --exclude='*.log' $(INST_PKG_TMP) - mkdir -p tool/data/ - mv $(INST_PKG_GZIP) tool/data/ - rm -rf $(INST_PKG_TMP) + @rm -rf $(INST_PKG_TMP) + @cp -a pkg $(INST_PKG_TMP) + @cd $(INST_PKG_TMP) && go mod tidy + @tar -czf $(INST_PKG_GZIP) --exclude='*.log' $(INST_PKG_TMP) + @mv $(INST_PKG_GZIP) tool/data/ + @rm -rf $(INST_PKG_TMP) build-demo-grpc: ## Build gRPC demo server and client @echo "Building gRPC demo..." - @cd demo/grpc/server && go generate && go build -o server . - @cd demo/grpc/client && go build -o client . + @(cd demo/grpc/server && go generate && go build -o server .) + @(cd demo/grpc/client && go build -o client .) -.PHONY: build-demo-http -build-demo-http: +build-demo-http: ## Build HTTP demo server and client @echo "Building HTTP demo..." - @cd demo/http/server && go build -o server . - @cd demo/http/client && go build -o client . + @(cd demo/http/server && go build -o server .) + @(cd demo/http/client && go build -o client .) # Format targets @@ -114,17 +109,17 @@ lint/yaml: yamlfmt ratchet/pin: ## Pin GitHub Actions to commit SHAs ratchet/pin: ratchet @echo "Pinning GitHub Actions to commit SHAs..." - ratchet pin .github/workflows/*.yml .github/workflows/*.yaml + ratchet pin .github/workflows/*.yml .github/actions/**/action.yml ratchet/update: ## Update pinned GitHub Actions to latest versions ratchet/update: ratchet @echo "Updating pinned GitHub Actions to latest versions..." - ratchet update .github/workflows/*.yml .github/workflows/*.yaml + ratchet update .github/workflows/*.yml .github/actions/**/action.yml ratchet/check: ## Verify all GitHub Actions are pinned ratchet/check: ratchet @echo "Checking GitHub Actions are pinned..." - ratchet lint .github/workflows/*.yml .github/workflows/*.yaml + ratchet lint .github/workflows/*.yml .github/actions/**/action.yml # Documentation targets @@ -144,7 +139,6 @@ test: ## Run all tests (unit + integration) test: test-unit test-integration .ONESHELL: -SHELL := /bin/bash test-unit: ## Run unit tests test-unit: gotestfmt @echo "Running unit tests..." @@ -152,7 +146,6 @@ test-unit: gotestfmt go test -json -v -timeout=5m -count=1 ./tool/... 2>&1 | tee ./gotest-unit.log | gotestfmt .ONESHELL: -SHELL := /bin/bash test-integration: ## Run integration tests test-integration: build gotestfmt @echo "Running integration tests..." From 871a1f3a2347a593ba7485001d088428acd53e33 Mon Sep 17 00:00:00 2001 From: Kemal Akkoyun Date: Tue, 4 Nov 2025 17:49:04 +0100 Subject: [PATCH 02/14] fix(build): fix package target with proper shell handling Use .ONESHELL and subshell for cd command to ensure the tar command runs in the correct directory. This fixes the 'Cannot stat' error when running make package. Signed-off-by: Kemal Akkoyun --- Makefile | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 8271d25..82bcc9f 100644 --- a/Makefile +++ b/Makefile @@ -50,14 +50,17 @@ install: ## Install otel to $$GOPATH/bin @go mod tidy go install -ldflags "-X main.Version=$(VERSION) -X main.CommitHash=$(COMMIT_HASH) -X main.BuildTime=$(BUILD_TIME)" ./$(TOOL_DIR) +.ONESHELL: package: ## Package the instrumentation code into binary @echo "Packaging instrumentation code into binary..." - @rm -rf $(INST_PKG_TMP) - @cp -a pkg $(INST_PKG_TMP) - @cd $(INST_PKG_TMP) && go mod tidy - @tar -czf $(INST_PKG_GZIP) --exclude='*.log' $(INST_PKG_TMP) - @mv $(INST_PKG_GZIP) tool/data/ - @rm -rf $(INST_PKG_TMP) + set -euo pipefail + rm -rf $(INST_PKG_TMP) + cp -a pkg $(INST_PKG_TMP) + (cd $(INST_PKG_TMP) && go mod tidy) + tar -czf $(INST_PKG_GZIP) --exclude='*.log' $(INST_PKG_TMP) + mkdir -p tool/data/ + mv $(INST_PKG_GZIP) tool/data/ + rm -rf $(INST_PKG_TMP) build-demo-grpc: ## Build gRPC demo server and client @echo "Building gRPC demo..." From c5792788ba11e3a399af3a1197999ad02723283e Mon Sep 17 00:00:00 2001 From: Kemal Akkoyun Date: Tue, 4 Nov 2025 17:54:49 +0100 Subject: [PATCH 03/14] fix(build): use bash explicitly for targets with pipefail Set SHELL to /bin/bash for targets using .ONESHELL and pipefail option. This fixes CI failures on Ubuntu where /bin/sh is dash, which doesn't support the pipefail option. Fixes: /bin/sh: 2: set: Illegal option -o pipefail Signed-off-by: Kemal Akkoyun --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 82bcc9f..0be0ca4 100644 --- a/Makefile +++ b/Makefile @@ -51,6 +51,7 @@ install: ## Install otel to $$GOPATH/bin go install -ldflags "-X main.Version=$(VERSION) -X main.CommitHash=$(COMMIT_HASH) -X main.BuildTime=$(BUILD_TIME)" ./$(TOOL_DIR) .ONESHELL: +SHELL := /bin/bash package: ## Package the instrumentation code into binary @echo "Packaging instrumentation code into binary..." set -euo pipefail @@ -142,6 +143,7 @@ test: ## Run all tests (unit + integration) test: test-unit test-integration .ONESHELL: +SHELL := /bin/bash test-unit: ## Run unit tests test-unit: gotestfmt @echo "Running unit tests..." @@ -149,6 +151,7 @@ test-unit: gotestfmt go test -json -v -timeout=5m -count=1 ./tool/... 2>&1 | tee ./gotest-unit.log | gotestfmt .ONESHELL: +SHELL := /bin/bash test-integration: ## Run integration tests test-integration: build gotestfmt @echo "Running integration tests..." From 1d466d09a506c2812b8ee4f9ce0c2b6c93f1ecf2 Mon Sep 17 00:00:00 2001 From: Kemal Akkoyun Date: Wed, 5 Nov 2025 20:09:49 +0100 Subject: [PATCH 04/14] fix(Makefile): Fix raised issues Signed-off-by: Kemal Akkoyun --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 0be0ca4..5fe0c84 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ help: ## Show this help message @echo 'Usage: make [target]' @echo '' @echo 'Targets:' - @awk 'BEGIN {FS = ":.*?## "} /^[A-Za-z0-9_./-]+:.*?## / {printf " %-20s %s\n", $$1, $$2}' $(MAKEFILE_LIST) + @awk 'BEGIN {FS = ":.*?## "} /^[A-Za-z0-9_.\/-]+:.*?## / {printf " %-20s %s\n", $$1, $$2}' $(MAKEFILE_LIST) all: build format lint test @@ -113,17 +113,17 @@ lint/yaml: yamlfmt ratchet/pin: ## Pin GitHub Actions to commit SHAs ratchet/pin: ratchet @echo "Pinning GitHub Actions to commit SHAs..." - ratchet pin .github/workflows/*.yml .github/actions/**/action.yml + ratchet pin .github/workflows/*.yml .github/workflows/*.yaml ratchet/update: ## Update pinned GitHub Actions to latest versions ratchet/update: ratchet @echo "Updating pinned GitHub Actions to latest versions..." - ratchet update .github/workflows/*.yml .github/actions/**/action.yml + ratchet update .github/workflows/*.yml .github/workflows/*.yaml ratchet/check: ## Verify all GitHub Actions are pinned ratchet/check: ratchet @echo "Checking GitHub Actions are pinned..." - ratchet lint .github/workflows/*.yml .github/actions/**/action.yml + ratchet lint .github/workflows/*.yml .github/workflows/*.yaml # Documentation targets From 7012a038028eae17aca3c9730a8d4206823d3ae4 Mon Sep 17 00:00:00 2001 From: Kemal Akkoyun Date: Tue, 4 Nov 2025 16:00:27 +0100 Subject: [PATCH 05/14] chore(build): enhance Makefile with orchestrion-style tooling and automation Add comprehensive build tooling and automation following DataDog orchestrion best practices to improve developer experience and code quality workflows. Key additions: - Auto-generated help system (make help) with self-documenting targets - Code quality automation: format (Go/YAML) and lint (Go/YAML/Actions) - Enhanced test targets: test-unit and test-integration with gotestfmt - GitHub Actions security tools: ratchet for pinning actions - Auto-installing development tools on first use - Documentation generation support with embedmd - Organized target structure with clear categories New tools integrated (auto-install on first use): - golangci-lint: Go linter aggregator - gotestfmt: Pretty test output formatting - yamlfmt: YAML formatter and linter - actionlint: GitHub Actions workflow linter - ratchet: GitHub Actions security pinning - embedmd: Documentation embedding tool Configuration: - Added .yamlfmt for consistent YAML formatting - Updated CONTRIBUTING.md with comprehensive development guide - Renamed test-e2e to test-integration for accuracy All existing targets remain backward compatible. Signed-off-by: Kemal Akkoyun --- CONTRIBUTING.md | 20 ++++++++++---------- Makefile | 26 ++++++++++---------------- 2 files changed, 20 insertions(+), 26 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a8a218a..df7feb9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,22 +24,22 @@ This project uses several tools for development. Most tools will be automaticall 1. Clone the repository: - ```sh - git clone https://github.com/open-telemetry/opentelemetry-go-compile-instrumentation - cd opentelemetry-go-compile-instrumentation - ``` + ```sh + git clone https://github.com/open-telemetry/opentelemetry-go-compile-instrumentation + cd opentelemetry-go-compile-instrumentation + ``` 2. Build the project: - ```sh - make build - ``` + ```sh + make build + ``` 3. Run tests: - ```sh - make test - ``` + ```sh + make test + ``` ### Available Make Targets diff --git a/Makefile b/Makefile index 5fe0c84..8271d25 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ help: ## Show this help message @echo 'Usage: make [target]' @echo '' @echo 'Targets:' - @awk 'BEGIN {FS = ":.*?## "} /^[A-Za-z0-9_.\/-]+:.*?## / {printf " %-20s %s\n", $$1, $$2}' $(MAKEFILE_LIST) + @awk 'BEGIN {FS = ":.*?## "} /^[A-Za-z0-9_./-]+:.*?## / {printf " %-20s %s\n", $$1, $$2}' $(MAKEFILE_LIST) all: build format lint test @@ -50,18 +50,14 @@ install: ## Install otel to $$GOPATH/bin @go mod tidy go install -ldflags "-X main.Version=$(VERSION) -X main.CommitHash=$(COMMIT_HASH) -X main.BuildTime=$(BUILD_TIME)" ./$(TOOL_DIR) -.ONESHELL: -SHELL := /bin/bash package: ## Package the instrumentation code into binary @echo "Packaging instrumentation code into binary..." - set -euo pipefail - rm -rf $(INST_PKG_TMP) - cp -a pkg $(INST_PKG_TMP) - (cd $(INST_PKG_TMP) && go mod tidy) - tar -czf $(INST_PKG_GZIP) --exclude='*.log' $(INST_PKG_TMP) - mkdir -p tool/data/ - mv $(INST_PKG_GZIP) tool/data/ - rm -rf $(INST_PKG_TMP) + @rm -rf $(INST_PKG_TMP) + @cp -a pkg $(INST_PKG_TMP) + @cd $(INST_PKG_TMP) && go mod tidy + @tar -czf $(INST_PKG_GZIP) --exclude='*.log' $(INST_PKG_TMP) + @mv $(INST_PKG_GZIP) tool/data/ + @rm -rf $(INST_PKG_TMP) build-demo-grpc: ## Build gRPC demo server and client @echo "Building gRPC demo..." @@ -113,17 +109,17 @@ lint/yaml: yamlfmt ratchet/pin: ## Pin GitHub Actions to commit SHAs ratchet/pin: ratchet @echo "Pinning GitHub Actions to commit SHAs..." - ratchet pin .github/workflows/*.yml .github/workflows/*.yaml + ratchet pin .github/workflows/*.yml .github/actions/**/action.yml ratchet/update: ## Update pinned GitHub Actions to latest versions ratchet/update: ratchet @echo "Updating pinned GitHub Actions to latest versions..." - ratchet update .github/workflows/*.yml .github/workflows/*.yaml + ratchet update .github/workflows/*.yml .github/actions/**/action.yml ratchet/check: ## Verify all GitHub Actions are pinned ratchet/check: ratchet @echo "Checking GitHub Actions are pinned..." - ratchet lint .github/workflows/*.yml .github/workflows/*.yaml + ratchet lint .github/workflows/*.yml .github/actions/**/action.yml # Documentation targets @@ -143,7 +139,6 @@ test: ## Run all tests (unit + integration) test: test-unit test-integration .ONESHELL: -SHELL := /bin/bash test-unit: ## Run unit tests test-unit: gotestfmt @echo "Running unit tests..." @@ -151,7 +146,6 @@ test-unit: gotestfmt go test -json -v -timeout=5m -count=1 ./tool/... 2>&1 | tee ./gotest-unit.log | gotestfmt .ONESHELL: -SHELL := /bin/bash test-integration: ## Run integration tests test-integration: build gotestfmt @echo "Running integration tests..." From c3230172305e91303d9171a753ce655fc9085288 Mon Sep 17 00:00:00 2001 From: Kemal Akkoyun Date: Tue, 4 Nov 2025 16:40:44 +0100 Subject: [PATCH 06/14] chore(ci): format YAML files with yamlfmt Apply consistent YAML formatting across all workflow and configuration files using yamlfmt. This standardizes spacing, indentation, and comment formatting for better readability and maintainability. Signed-off-by: Kemal Akkoyun --- .github/codeconv.yaml | 8 +- .github/workflows/conventional-commit.yml | 8 +- .github/workflows/golangci-lint.yaml | 2 +- .github/workflows/ossf-scorecard.yml | 2 +- .golangci.yml | 180 +++++++++++----------- 5 files changed, 100 insertions(+), 100 deletions(-) diff --git a/.github/codeconv.yaml b/.github/codeconv.yaml index 9828d4c..45cbdfd 100644 --- a/.github/codeconv.yaml +++ b/.github/codeconv.yaml @@ -5,13 +5,13 @@ coverage: status: project: default: - target: auto # compare to base - threshold: 1% # allow small drops - informational: true # don't fail PRs on project drop + target: auto # compare to base + threshold: 1% # allow small drops + informational: true # don't fail PRs on project drop patch: default: target: auto - threshold: 0.1% # require the change itself to be covered + threshold: 0.1% # require the change itself to be covered comment: layout: "reach,diff,flags,tree" diff --git a/.github/workflows/conventional-commit.yml b/.github/workflows/conventional-commit.yml index 9bb8428..cb0a1f0 100644 --- a/.github/workflows/conventional-commit.yml +++ b/.github/workflows/conventional-commit.yml @@ -30,13 +30,13 @@ jobs: id: check-permissions run: | if [[ "${{ github.event_name }}" == "pull_request_target" ]]; then - echo "has_permissions=true" >> $GITHUB_OUTPUT + echo "has_permissions=true" >> "$GITHUB_OUTPUT" echo "✅ Running with pull_request_target - has write permissions" elif [[ "${{ github.event.pull_request.head.repo.full_name }}" == "${{ github.repository }}" ]]; then - echo "has_permissions=true" >> $GITHUB_OUTPUT + echo "has_permissions=true" >> "$GITHUB_OUTPUT" echo "✅ Running with pull_request from same repository - has write permissions" else - echo "has_permissions=false" >> $GITHUB_OUTPUT + echo "has_permissions=false" >> "$GITHUB_OUTPUT" echo "❌ Running with pull_request from fork - no write permissions" echo "⚠️ Labels cannot be updated on this run. They will be updated when:" echo " - The PR is opened, edited, or reopened (uses pull_request_target)" @@ -61,7 +61,7 @@ jobs: - name: Setup go uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 with: - cache-dependency-path: '**/go.mod' + cache-dependency-path: "**/go.mod" go-version-file: go.mod # Run the conventionalcommit tool to validate PR title and assign labels # This step is skipped if we don't have write permissions (e.g., pull_request from fork on synchronize) diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/golangci-lint.yaml index 9faae39..86e6709 100644 --- a/.github/workflows/golangci-lint.yaml +++ b/.github/workflows/golangci-lint.yaml @@ -22,7 +22,7 @@ jobs: go-version-file: go.mod - name: Install golangci-lint run: | - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${{ env.GOLANGCI_LINT_VERSION }} + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "$(go env GOPATH)/bin" ${{ env.GOLANGCI_LINT_VERSION }} - name: Check Format run: | golangci-lint fmt --diff diff --git a/.github/workflows/ossf-scorecard.yml b/.github/workflows/ossf-scorecard.yml index 7a3698b..da804c6 100644 --- a/.github/workflows/ossf-scorecard.yml +++ b/.github/workflows/ossf-scorecard.yml @@ -44,4 +44,4 @@ jobs: - name: "Upload to code-scanning" uses: github/codeql-action/upload-sarif@16140ae1a102900babc80a33c44059580f687047 # v4.30.9 with: - sarif_file: results.sarif \ No newline at end of file + sarif_file: results.sarif diff --git a/.golangci.yml b/.golangci.yml index 495240a..fa71b7b 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -29,82 +29,82 @@ run: linters: enable: - - asasalint # checks for pass []any as any in variadic func(...any) - - asciicheck # checks that your code does not contain non-ASCII identifiers - - bidichk # checks for dangerous unicode character sequences - - bodyclose # checks whether HTTP response body is closed successfully - - canonicalheader # checks whether net/http.Header uses canonical header - - contextcheck # checks the function whether use a non-inherited context - - copyloopvar # detects places where loop variables are copied (Go 1.22+) - - cyclop # checks function and package cyclomatic complexity - - depguard # checks if package imports are in a list of acceptable packages - - dupl # tool for code clone detection - - durationcheck # checks for two durations multiplied together - - errcheck # checking for unchecked errors, these unchecked errors can be critical bugs in some cases - - errname # checks that sentinel errors are prefixed with the Err and error types are suffixed with the Error - - errorlint # finds code that will cause problems with the error wrapping scheme introduced in Go 1.13 - - exhaustive # checks exhaustiveness of enum switch statements - - exptostd # detects functions from golang.org/x/exp/ that can be replaced by std functions - - fatcontext # detects nested contexts in loops - - forbidigo # forbids identifiers - - funcorder # checks the order of functions, methods, and constructors - - funlen # tool for detection of long functions - - gocheckcompilerdirectives # validates go compiler directive comments (//go:) - - gochecknoglobals # checks that no global variables exist - - gochecksumtype # checks exhaustiveness on Go "sum types" - - gocognit # computes and checks the cognitive complexity of functions - - goconst # finds repeated strings that could be replaced by a constant - - gocritic # provides diagnostics that check for bugs, performance and style issues - - gocyclo # computes and checks the cyclomatic complexity of functions - - gomoddirectives # manages the use of 'replace', 'retract', and 'excludes' directives in go.mod - - goprintffuncname # checks that printf-like functions are named with f at the end - - gosec # inspects source code for security problems - - govet # reports suspicious constructs, such as Printf calls whose arguments do not align with the format string - - iface # checks the incorrect use of interfaces, helping developers avoid interface pollution - - inamedparam # reports interfaces with unnamed method parameters - - ineffassign # detects when assignments to existing variables are not used - - interfacebloat # checks the number of methods inside an interface - - intrange # finds places where for loops could make use of an integer range - - loggercheck # checks key value pairs for common logger libraries (kitlog,klog,logr,zap) - - makezero # finds slice declarations with non-zero initial length - - mirror # reports wrong mirror patterns of bytes/strings usage - - misspell # finds commonly misspelled English words in comments - - mnd # detects magic numbers - - musttag # enforces field tags in (un)marshaled structs - - nakedret # finds naked returns in functions greater than a specified function length - - nestif # reports deeply nested if statements - - nilerr # finds the code that returns nil even if it checks that the error is not nil - - nilnesserr # reports that it checks for err != nil, but it returns a different nil value error (powered by nilness and nilerr) - - nilnil # checks that there is no simultaneous return of nil error and an invalid value - - noctx # finds sending http request without context.Context - - nolintlint # reports ill-formed or insufficient nolint directives - - nonamedreturns # reports all named returns - - nosprintfhostport # checks for misuse of Sprintf to construct a host with port in a URL - - perfsprint # checks that fmt.Sprintf can be replaced with a faster alternative - - prealloc # finds slice declarations that could potentially be preallocated - - predeclared # finds code that shadows one of Go's predeclared identifiers - - promlinter # checks Prometheus metrics naming via promlint - - protogetter # reports direct reads from proto message fields when getters should be used - - reassign # checks that package variables are not reassigned - - recvcheck # checks for receiver type consistency - - revive # fast, configurable, extensible, flexible, and beautiful linter for Go, drop-in replacement of golint - - rowserrcheck # checks whether Err of rows is checked successfully - - sloglint # ensure consistent code style when using log/slog - - spancheck # checks for mistakes with OpenTelemetry/Census spans - - sqlclosecheck # checks that sql.Rows and sql.Stmt are closed - - staticcheck # is a go vet on steroids, applying a ton of static analysis checks - - tagalign # checks that struct tags are well aligned - - testableexamples # checks if examples are testable (have an expected output) - - testifylint # checks usage of github.com/stretchr/testify - - testpackage # makes you use a separate _test package - - tparallel # detects inappropriate usage of t.Parallel() method in your Go test codes - - unconvert # removes unnecessary type conversions - - unparam # reports unused function parameters - - unused # checks for unused constants, variables, functions and types - - usestdlibvars # detects the possibility to use variables/constants from the Go standard library - - usetesting # reports uses of functions with replacement inside the testing package - - wastedassign # finds wasted assignment statements - - whitespace # detects leading and trailing whitespace + - asasalint # checks for pass []any as any in variadic func(...any) + - asciicheck # checks that your code does not contain non-ASCII identifiers + - bidichk # checks for dangerous unicode character sequences + - bodyclose # checks whether HTTP response body is closed successfully + - canonicalheader # checks whether net/http.Header uses canonical header + - contextcheck # checks the function whether use a non-inherited context + - copyloopvar # detects places where loop variables are copied (Go 1.22+) + - cyclop # checks function and package cyclomatic complexity + - depguard # checks if package imports are in a list of acceptable packages + - dupl # tool for code clone detection + - durationcheck # checks for two durations multiplied together + - errcheck # checking for unchecked errors, these unchecked errors can be critical bugs in some cases + - errname # checks that sentinel errors are prefixed with the Err and error types are suffixed with the Error + - errorlint # finds code that will cause problems with the error wrapping scheme introduced in Go 1.13 + - exhaustive # checks exhaustiveness of enum switch statements + - exptostd # detects functions from golang.org/x/exp/ that can be replaced by std functions + - fatcontext # detects nested contexts in loops + - forbidigo # forbids identifiers + - funcorder # checks the order of functions, methods, and constructors + - funlen # tool for detection of long functions + - gocheckcompilerdirectives # validates go compiler directive comments (//go:) + - gochecknoglobals # checks that no global variables exist + - gochecksumtype # checks exhaustiveness on Go "sum types" + - gocognit # computes and checks the cognitive complexity of functions + - goconst # finds repeated strings that could be replaced by a constant + - gocritic # provides diagnostics that check for bugs, performance and style issues + - gocyclo # computes and checks the cyclomatic complexity of functions + - gomoddirectives # manages the use of 'replace', 'retract', and 'excludes' directives in go.mod + - goprintffuncname # checks that printf-like functions are named with f at the end + - gosec # inspects source code for security problems + - govet # reports suspicious constructs, such as Printf calls whose arguments do not align with the format string + - iface # checks the incorrect use of interfaces, helping developers avoid interface pollution + - inamedparam # reports interfaces with unnamed method parameters + - ineffassign # detects when assignments to existing variables are not used + - interfacebloat # checks the number of methods inside an interface + - intrange # finds places where for loops could make use of an integer range + - loggercheck # checks key value pairs for common logger libraries (kitlog,klog,logr,zap) + - makezero # finds slice declarations with non-zero initial length + - mirror # reports wrong mirror patterns of bytes/strings usage + - misspell # finds commonly misspelled English words in comments + - mnd # detects magic numbers + - musttag # enforces field tags in (un)marshaled structs + - nakedret # finds naked returns in functions greater than a specified function length + - nestif # reports deeply nested if statements + - nilerr # finds the code that returns nil even if it checks that the error is not nil + - nilnesserr # reports that it checks for err != nil, but it returns a different nil value error (powered by nilness and nilerr) + - nilnil # checks that there is no simultaneous return of nil error and an invalid value + - noctx # finds sending http request without context.Context + - nolintlint # reports ill-formed or insufficient nolint directives + - nonamedreturns # reports all named returns + - nosprintfhostport # checks for misuse of Sprintf to construct a host with port in a URL + - perfsprint # checks that fmt.Sprintf can be replaced with a faster alternative + - prealloc # finds slice declarations that could potentially be preallocated + - predeclared # finds code that shadows one of Go's predeclared identifiers + - promlinter # checks Prometheus metrics naming via promlint + - protogetter # reports direct reads from proto message fields when getters should be used + - reassign # checks that package variables are not reassigned + - recvcheck # checks for receiver type consistency + - revive # fast, configurable, extensible, flexible, and beautiful linter for Go, drop-in replacement of golint + - rowserrcheck # checks whether Err of rows is checked successfully + - sloglint # ensure consistent code style when using log/slog + - spancheck # checks for mistakes with OpenTelemetry/Census spans + - sqlclosecheck # checks that sql.Rows and sql.Stmt are closed + - staticcheck # is a go vet on steroids, applying a ton of static analysis checks + - tagalign # checks that struct tags are well aligned + - testableexamples # checks if examples are testable (have an expected output) + - testifylint # checks usage of github.com/stretchr/testify + - testpackage # makes you use a separate _test package + - tparallel # detects inappropriate usage of t.Parallel() method in your Go test codes + - unconvert # removes unnecessary type conversions + - unparam # reports unused function parameters + - unused # checks for unused constants, variables, functions and types + - usestdlibvars # detects the possibility to use variables/constants from the Go standard library + - usetesting # reports uses of functions with replacement inside the testing package + - wastedassign # finds wasted assignment statements + - whitespace # detects leading and trailing whitespace # - wrapcheck # checks that errors returned from external packages are wrapped ## you may want to enable @@ -260,7 +260,7 @@ linters: # Run `GL_DEBUG=govet golangci-lint run --enable=govet` to see default, all available analyzers, and enabled analyzers. # Default: [] disable: - - fieldalignment # too strict + - fieldalignment # too strict # Settings per analyzer. settings: shadow: @@ -323,7 +323,7 @@ linters: nolintlint: # Exclude following linters from requiring an explanation. # Default: [] - allow-no-explanation: [ funlen, gocognit, golines, exhaustive ] + allow-no-explanation: [funlen, gocognit, golines, exhaustive] # Enable to require an explanation of nonzero length after each nolint directive. # Default: false require-explanation: true @@ -340,7 +340,7 @@ linters: errorf: true string-format: true sprintf1: true - strconcat: false # Changed from true to match current config + strconcat: false # Changed from true to match current config bool-format: true hex-format: true @@ -378,7 +378,7 @@ linters: - name: if-return - name: import-alias-naming - name: imports-blocklist - arguments: ["gotest.tools/v3/assert"] # IDE auto-inserted instead of testify's assert + arguments: ["gotest.tools/v3/assert"] # IDE auto-inserted instead of testify's assert - name: increment-decrement - name: indent-error-flow - name: max-control-nesting @@ -391,7 +391,7 @@ linters: - name: superfluous-else - name: unchecked-type-assertion exclude: ["TEST"] - arguments: [acceptIgnoredAssertionResult: true] + arguments: [{acceptIgnoredAssertionResult: true}] - name: unexported-naming - name: unhandled-error exclude: ["TEST"] @@ -513,18 +513,18 @@ linters: rules: # Exclude TODO comments from godot - source: 'TODO' - linters: [ godot ] + linters: [godot] # Exclude package comments requirements for files with nolint or TODO - text: 'should have a package comment' - linters: [ revive ] + linters: [revive] - text: 'exported \S+ \S+ should have comment( \(or a comment on this block\))? or be unexported' - linters: [ revive ] + linters: [revive] - text: 'package comment should be of the form ".+"' source: '// ?(nolint|TODO)' - linters: [ revive ] + linters: [revive] - text: 'comment on exported \S+ \S+ should be of the form ".+"' source: '// ?(nolint|TODO)' - linters: [ revive, staticcheck ] + linters: [revive, staticcheck] # Relax some rules for test files - path: '_test\.go' linters: @@ -536,8 +536,8 @@ linters: - gosec - noctx - wrapcheck - - forbidigo # Allow fmt.Print* in tests - - testpackage # Allow testing internal implementation + - forbidigo # Allow fmt.Print* in tests + - testpackage # Allow testing internal implementation # Allow fmt.Print* in main packages - path: 'main\.go' linters: @@ -551,8 +551,8 @@ linters: formatters: enable: - gofumpt - - goimports # checks if the code and import statements are formatted according to the 'goimports' command - - golines # checks if code is formatted, and fixes long lines + - goimports # checks if the code and import statements are formatted according to the 'goimports' command + - golines # checks if code is formatted, and fixes long lines # All settings can be found here https://github.com/golangci/golangci-lint/blob/HEAD/.golangci.reference.yml settings: From 152ecdb886fefb99f2157b40f01870284aa0892d Mon Sep 17 00:00:00 2001 From: Kemal Akkoyun Date: Tue, 4 Nov 2025 16:41:22 +0100 Subject: [PATCH 07/14] fix(build): improve ratchet targets for repos without actions directory Replace glob patterns with find command in ratchet targets to gracefully handle repositories that don't have a .github/actions directory. This prevents "no such file or directory" errors when running make ratchet/pin, ratchet/update, or ratchet/check. Signed-off-by: Kemal Akkoyun --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 8271d25..6dbe9f7 100644 --- a/Makefile +++ b/Makefile @@ -109,17 +109,17 @@ lint/yaml: yamlfmt ratchet/pin: ## Pin GitHub Actions to commit SHAs ratchet/pin: ratchet @echo "Pinning GitHub Actions to commit SHAs..." - ratchet pin .github/workflows/*.yml .github/actions/**/action.yml + @find .github/workflows -name '*.yml' -o -name '*.yaml' | xargs ratchet pin ratchet/update: ## Update pinned GitHub Actions to latest versions ratchet/update: ratchet @echo "Updating pinned GitHub Actions to latest versions..." - ratchet update .github/workflows/*.yml .github/actions/**/action.yml + @find .github/workflows -name '*.yml' -o -name '*.yaml' | xargs ratchet update ratchet/check: ## Verify all GitHub Actions are pinned ratchet/check: ratchet @echo "Checking GitHub Actions are pinned..." - ratchet lint .github/workflows/*.yml .github/actions/**/action.yml + @find .github/workflows -name '*.yml' -o -name '*.yaml' | xargs ratchet lint # Documentation targets From e87f6b9c5e6e4d8b84303792e5337c83af104bcf Mon Sep 17 00:00:00 2001 From: Kemal Akkoyun Date: Tue, 4 Nov 2025 16:41:39 +0100 Subject: [PATCH 08/14] chore(ci): add YAML formatting and actionlint checks Add CI workflows to enforce code quality standards for GitHub Actions: - yaml-format-check.yaml: Validates YAML formatting using make lint/yaml - actionlint.yaml: Lints workflows and verifies pinning using make lint/action These workflows leverage existing Makefile targets which handle tool installation automatically, ensuring consistency between local development and CI environments. Signed-off-by: Kemal Akkoyun --- .github/workflows/actionlint.yaml | 36 ++++++++++++++++++++++++ .github/workflows/yaml-format-check.yaml | 32 +++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 .github/workflows/actionlint.yaml create mode 100644 .github/workflows/yaml-format-check.yaml diff --git a/.github/workflows/actionlint.yaml b/.github/workflows/actionlint.yaml new file mode 100644 index 0000000..0ecfb35 --- /dev/null +++ b/.github/workflows/actionlint.yaml @@ -0,0 +1,36 @@ +name: GitHub Actions Lint + +on: + pull_request: + paths: + - ".github/workflows/*.yml" + - ".github/workflows/*.yaml" + - ".github/actions/**/action.yml" + - ".github/actions/**/action.yaml" + push: + branches: [main] + paths: + - ".github/workflows/*.yml" + - ".github/workflows/*.yaml" + - ".github/actions/**/action.yml" + - ".github/actions/**/action.yaml" + +permissions: + contents: read + +jobs: + actionlint: + name: Lint GitHub Actions + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 + + - name: Setup Go + uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 + with: + go-version-file: go.mod + cache: false + + - name: Lint GitHub Actions + run: make lint/action diff --git a/.github/workflows/yaml-format-check.yaml b/.github/workflows/yaml-format-check.yaml new file mode 100644 index 0000000..df0ce55 --- /dev/null +++ b/.github/workflows/yaml-format-check.yaml @@ -0,0 +1,32 @@ +name: YAML Format Check + +on: + pull_request: + paths: + - "**/*.yml" + - "**/*.yaml" + push: + branches: [main] + paths: + - "**/*.yml" + - "**/*.yaml" + +permissions: + contents: read + +jobs: + yaml-format: + name: Check YAML Formatting + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 + + - name: Setup Go + uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 + with: + go-version-file: go.mod + cache: false + + - name: Check YAML formatting + run: make lint/yaml From 504690749f34645670239ab638e001a5434bcb09 Mon Sep 17 00:00:00 2001 From: Kemal Akkoyun Date: Tue, 4 Nov 2025 16:49:29 +0100 Subject: [PATCH 09/14] chore(.github/workflows): Make sure all files are formatted Signed-off-by: Kemal Akkoyun --- .github/workflows/actionlint.yaml | 4 ++-- .github/workflows/conventional-commit.yml | 9 +++++---- .github/workflows/fossa.yml | 4 ++-- .github/workflows/golangci-lint.yaml | 8 ++++---- .github/workflows/markdown-lint.yaml | 2 +- .github/workflows/ossf-scorecard.yml | 10 +++++----- .github/workflows/unit-test.yaml | 12 ++++++------ .github/workflows/yaml-format-check.yaml | 4 ++-- 8 files changed, 27 insertions(+), 26 deletions(-) diff --git a/.github/workflows/actionlint.yaml b/.github/workflows/actionlint.yaml index 0ecfb35..72e539d 100644 --- a/.github/workflows/actionlint.yaml +++ b/.github/workflows/actionlint.yaml @@ -24,10 +24,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 + uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 - name: Setup Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 + uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 with: go-version-file: go.mod cache: false diff --git a/.github/workflows/conventional-commit.yml b/.github/workflows/conventional-commit.yml index cb0a1f0..e1ba0ef 100644 --- a/.github/workflows/conventional-commit.yml +++ b/.github/workflows/conventional-commit.yml @@ -14,7 +14,7 @@ permissions: jobs: update-labels: permissions: - pull-requests: write # Needed to post comments & update labels + pull-requests: write # Needed to post comments & update labels name: Update Labels runs-on: ubuntu-latest # Prevent double triggers: skip pull_request runs for forks (pull_request_target will handle them) @@ -57,9 +57,9 @@ jobs: echo "Base Repo: ${{ github.repository }}" echo "Is Fork: ${{ github.event.pull_request.head.repo.full_name != github.repository }}" - name: Check out - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 + uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 - name: Setup go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 + uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 with: cache-dependency-path: "**/go.mod" go-version-file: go.mod @@ -67,6 +67,7 @@ jobs: # This step is skipped if we don't have write permissions (e.g., pull_request from fork on synchronize) - name: Assign Labels if: steps.check-permissions.outputs.has_permissions == 'true' - run: go -C .github/tools/conventionalcommit run . -owner="${{ github.repository_owner }}" -repo="${{ github.event.repository.name }}" -pr="${{ github.event.pull_request.number }}" + run: go -C .github/tools/conventionalcommit run . -owner="${{ github.repository_owner }}" -repo="${{ github.event.repository.name + }}" -pr="${{ github.event.pull_request.number }}" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/fossa.yml b/.github/workflows/fossa.yml index e42546d..d179687 100644 --- a/.github/workflows/fossa.yml +++ b/.github/workflows/fossa.yml @@ -12,9 +12,9 @@ jobs: fossa: runs-on: ubuntu-latest steps: - - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 + - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 - - uses: fossas/fossa-action@3ebcea1862c6ffbd5cf1b4d0bd6b3fe7bd6f2cac # v1.7.0 + - uses: fossas/fossa-action@3ebcea1862c6ffbd5cf1b4d0bd6b3fe7bd6f2cac # v1.7.0 with: api-key: ${{secrets.FOSSA_API_KEY}} team: OpenTelemetry diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/golangci-lint.yaml index 86e6709..e64773b 100644 --- a/.github/workflows/golangci-lint.yaml +++ b/.github/workflows/golangci-lint.yaml @@ -16,8 +16,8 @@ jobs: name: Format and Lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 - - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 + - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 + - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 with: go-version-file: go.mod - name: Install golangci-lint @@ -27,8 +27,8 @@ jobs: run: | golangci-lint fmt --diff - name: Lint - uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8 + uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8 with: version: ${{ env.GOLANGCI_LINT_VERSION }} - name: Check Typos - uses: crate-ci/typos@0c17dabcee8b8f1957fa917d17393a23e02e1583 # v1.36.3 + uses: crate-ci/typos@0c17dabcee8b8f1957fa917d17393a23e02e1583 # v1.36.3 diff --git a/.github/workflows/markdown-lint.yaml b/.github/workflows/markdown-lint.yaml index a56e3c3..2f92715 100644 --- a/.github/workflows/markdown-lint.yaml +++ b/.github/workflows/markdown-lint.yaml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 + uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 - name: Run linter id: markdownlint diff --git a/.github/workflows/ossf-scorecard.yml b/.github/workflows/ossf-scorecard.yml index da804c6..c09f97c 100644 --- a/.github/workflows/ossf-scorecard.yml +++ b/.github/workflows/ossf-scorecard.yml @@ -5,7 +5,7 @@ on: branches: - main schedule: - - cron: "13 5 * * 4" # once a week + - cron: "13 5 * * 4" # once a week workflow_dispatch: permissions: read-all @@ -19,11 +19,11 @@ jobs: # Needed for GitHub OIDC token if publish_results is true id-token: write steps: - - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 + - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 with: persist-credentials: false - - uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3 + - uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3 with: results_file: results.sarif results_format: sarif @@ -33,7 +33,7 @@ jobs: # uploads of run results in SARIF format to the repository Actions tab. # https://docs.github.com/en/actions/advanced-guides/storing-workflow-data-as-artifacts - name: "Upload artifact" - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: SARIF file path: results.sarif @@ -42,6 +42,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard (optional). # Commenting out will disable upload of results to your repo's Code Scanning dashboard - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@16140ae1a102900babc80a33c44059580f687047 # v4.30.9 + uses: github/codeql-action/upload-sarif@16140ae1a102900babc80a33c44059580f687047 # v4.30.9 with: sarif_file: results.sarif diff --git a/.github/workflows/unit-test.yaml b/.github/workflows/unit-test.yaml index fa7a2f9..c93ed17 100644 --- a/.github/workflows/unit-test.yaml +++ b/.github/workflows/unit-test.yaml @@ -8,20 +8,20 @@ on: permissions: read-all jobs: test-coverage: - if: false # temporary disable + if: false # temporary disable name: Coverage runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 + uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 - name: Install Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 + uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 with: go-version-file: go.mod - name: Run coverage tests run: go test ./... -coverprofile=coverage.txt -covermode=atomic - name: Upload coverage report - uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1 + uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1 compatibility-test: name: Test (go ${{ matrix.platform.os }} ${{ matrix.platform.arch }}) @@ -39,9 +39,9 @@ jobs: runs-on: ${{ matrix.platform.os }} steps: - name: Checkout code - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 + uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 - name: Install Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 + uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 with: go-version-file: go.mod cache-dependency-path: "**/go.mod" diff --git a/.github/workflows/yaml-format-check.yaml b/.github/workflows/yaml-format-check.yaml index df0ce55..ceeb1c2 100644 --- a/.github/workflows/yaml-format-check.yaml +++ b/.github/workflows/yaml-format-check.yaml @@ -20,10 +20,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 + uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 - name: Setup Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 + uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 with: go-version-file: go.mod cache: false From d1df9b6d671cedf40aa09f04cffb64f57ebda13c Mon Sep 17 00:00:00 2001 From: Kemal Akkoyun Date: Wed, 5 Nov 2025 20:42:54 +0100 Subject: [PATCH 10/14] chore: Fix markdownlint issues Signed-off-by: Kemal Akkoyun --- CONTRIBUTING.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index df7feb9..a8a218a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,22 +24,22 @@ This project uses several tools for development. Most tools will be automaticall 1. Clone the repository: - ```sh - git clone https://github.com/open-telemetry/opentelemetry-go-compile-instrumentation - cd opentelemetry-go-compile-instrumentation - ``` + ```sh + git clone https://github.com/open-telemetry/opentelemetry-go-compile-instrumentation + cd opentelemetry-go-compile-instrumentation + ``` 2. Build the project: - ```sh - make build - ``` + ```sh + make build + ``` 3. Run tests: - ```sh - make test - ``` + ```sh + make test + ``` ### Available Make Targets From b36a97cbe22258016be5f709e0eeb74dd12ca824 Mon Sep 17 00:00:00 2001 From: Kemal Akkoyun Date: Wed, 5 Nov 2025 21:01:53 +0100 Subject: [PATCH 11/14] chore(Makefile): Add checkmake and fix the discovered issues Signed-off-by: Kemal Akkoyun --- .checkmake | 17 ++++++++++++ .github/workflows/checkmake.yaml | 33 +++++++++++++++++++++++ .github/workflows/conventional-commit.yml | 1 + Makefile | 25 +++++++++++++---- demo/grpc/client/.gitignore | 1 + demo/grpc/server/.gitignore | 1 + 6 files changed, 73 insertions(+), 5 deletions(-) create mode 100644 .checkmake create mode 100644 .github/workflows/checkmake.yaml create mode 100644 demo/grpc/client/.gitignore create mode 100644 demo/grpc/server/.gitignore diff --git a/.checkmake b/.checkmake new file mode 100644 index 0000000..ce5dc02 --- /dev/null +++ b/.checkmake @@ -0,0 +1,17 @@ +[default] +# Configuration for checkmake linter + +[uniquetargets] +# Allow duplicate target definitions (one for comment, one for dependencies) +# This improves readability by separating comments from dependencies +disabled = true + +[maxbodylength] +# Allow longer target bodies for complex build tasks +# Package and clean targets naturally have multiple steps +disabled = true + +[phonydeclared] +# We declare all phony targets at the top of the Makefile in a single .PHONY declaration +# This is a valid approach and more maintainable than declaring each target separately +disabled = true diff --git a/.github/workflows/checkmake.yaml b/.github/workflows/checkmake.yaml new file mode 100644 index 0000000..82cac89 --- /dev/null +++ b/.github/workflows/checkmake.yaml @@ -0,0 +1,33 @@ +name: Checkmake + +on: + push: + branches: + - main + paths: + - 'Makefile' + - '.checkmake' + - '.github/workflows/checkmake.yaml' + pull_request: + paths: + - 'Makefile' + - '.checkmake' + - '.github/workflows/checkmake.yaml' + +jobs: + checkmake: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # ratchet:actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # ratchet:actions/setup-go@v5 + with: + go-version: '1.23' + + - name: Install checkmake + run: go install github.com/checkmake/checkmake/cmd/checkmake@latest + + - name: Run checkmake + run: checkmake --config .checkmake Makefile diff --git a/.github/workflows/conventional-commit.yml b/.github/workflows/conventional-commit.yml index e1ba0ef..918c873 100644 --- a/.github/workflows/conventional-commit.yml +++ b/.github/workflows/conventional-commit.yml @@ -71,3 +71,4 @@ jobs: }}" -pr="${{ github.event.pull_request.number }}" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + diff --git a/Makefile b/Makefile index 6dbe9f7..c5c35c2 100644 --- a/Makefile +++ b/Makefile @@ -2,9 +2,9 @@ # SPDX-License-Identifier: Apache-2.0 .PHONY: all test test-unit test-integration format lint build install package clean \ - build-demo-grpc format/go format/yaml lint/go lint/yaml lint/action \ - actionlint yamlfmt gotestfmt ratchet ratchet/pin ratchet/update ratchet/check \ - golangci-lint embedmd help docs tmp/make-help.txt + build-demo build-demo-grpc build-demo-http format/go format/yaml lint/go lint/yaml \ + lint/action lint/makefile actionlint yamlfmt gotestfmt ratchet ratchet/pin \ + ratchet/update ratchet/check golangci-lint embedmd checkmake help docs # Constant variables BINARY_NAME := otel @@ -56,9 +56,13 @@ package: ## Package the instrumentation code into binary @cp -a pkg $(INST_PKG_TMP) @cd $(INST_PKG_TMP) && go mod tidy @tar -czf $(INST_PKG_GZIP) --exclude='*.log' $(INST_PKG_TMP) + @mkdir -p tool/data/ @mv $(INST_PKG_GZIP) tool/data/ @rm -rf $(INST_PKG_TMP) +build-demo: ## Build all demos +build-demo: build-demo-grpc build-demo-http + build-demo-grpc: ## Build gRPC demo server and client @echo "Building gRPC demo..." @(cd demo/grpc/server && go generate && go build -o server .) @@ -86,8 +90,8 @@ format/yaml: yamlfmt # Lint targets -lint: ## Run all linters (Go, YAML, GitHub Actions) -lint: lint/go lint/yaml lint/action +lint: ## Run all linters (Go, YAML, GitHub Actions, Makefile) +lint: lint/go lint/yaml lint/action lint/makefile lint/action: ## Lint GitHub Actions workflows lint/action: actionlint ratchet/check @@ -104,6 +108,11 @@ lint/yaml: yamlfmt @echo "Linting YAML files..." yamlfmt -lint -dstar '**/*.yml' '**/*.yaml' +lint/makefile: ## Lint Makefile +lint/makefile: checkmake + @echo "Linting Makefile..." + checkmake --config .checkmake Makefile + # Ratchet targets for GitHub Actions pinning ratchet/pin: ## Pin GitHub Actions to commit SHAs @@ -207,3 +216,9 @@ embedmd: ## Install embedmd if not present echo "Installing embedmd..."; \ go install github.com/campoy/embedmd@latest; \ fi + +checkmake: ## Install checkmake if not present + @if ! command -v checkmake >/dev/null 2>&1; then \ + echo "Installing checkmake..."; \ + go install github.com/checkmake/checkmake/cmd/checkmake@latest; \ + fi diff --git a/demo/grpc/client/.gitignore b/demo/grpc/client/.gitignore new file mode 100644 index 0000000..b051c6c --- /dev/null +++ b/demo/grpc/client/.gitignore @@ -0,0 +1 @@ +client diff --git a/demo/grpc/server/.gitignore b/demo/grpc/server/.gitignore new file mode 100644 index 0000000..254defd --- /dev/null +++ b/demo/grpc/server/.gitignore @@ -0,0 +1 @@ +server From 28da7f00ed4300c42ba6b4a68588692bbb79e2e7 Mon Sep 17 00:00:00 2001 From: Kemal Akkoyun Date: Wed, 5 Nov 2025 21:10:13 +0100 Subject: [PATCH 12/14] fix(ci): Fix failing test Signed-off-by: Kemal Akkoyun --- .github/workflows/unit-test.yaml | 6 ++---- Makefile | 25 +++++++++++++++++++++---- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/.github/workflows/unit-test.yaml b/.github/workflows/unit-test.yaml index c93ed17..10b1a08 100644 --- a/.github/workflows/unit-test.yaml +++ b/.github/workflows/unit-test.yaml @@ -45,12 +45,10 @@ jobs: with: go-version-file: go.mod cache-dependency-path: "**/go.mod" - - name: Build - run: make build - - name: Run tests + - name: Build and test env: GOARCH: ${{ matrix.platform.arch }} - run: go test -shuffle=on ./... + run: make build test done: name: Done diff --git a/Makefile b/Makefile index c5c35c2..116e2b2 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,13 @@ # Copyright The OpenTelemetry Authors # SPDX-License-Identifier: Apache-2.0 +# Use bash for all shell commands (required for pipefail and other bash features) +SHELL := /bin/bash + .PHONY: all test test-unit test-integration format lint build install package clean \ build-demo build-demo-grpc build-demo-http format/go format/yaml lint/go lint/yaml \ lint/action lint/makefile actionlint yamlfmt gotestfmt ratchet ratchet/pin \ - ratchet/update ratchet/check golangci-lint embedmd checkmake help docs + ratchet/update ratchet/check golangci-lint embedmd checkmake help docs check-embed # Constant variables BINARY_NAME := otel @@ -142,24 +145,38 @@ tmp/make-help.txt: $(MAKEFILE_LIST) @mkdir -p tmp @$(MAKE) --no-print-directory help > tmp/make-help.txt +# Validation targets + +check-embed: ## Verify that embedded files exist (required for tests) + @echo "Checking embedded files..." + @if [ ! -f tool/data/$(INST_PKG_GZIP) ]; then \ + echo "Error: tool/data/$(INST_PKG_GZIP) does not exist"; \ + echo "Run 'make package' to generate it"; \ + exit 1; \ + fi + @echo "All embedded files present" + # Test targets +# NOTE: Tests require the 'package' target to run first because tool/data/export.go +# uses //go:embed to embed otel-pkg.gz at compile time. If the file doesn't exist +# when Go compiles the test packages, the embed will fail. test: ## Run all tests (unit + integration) test: test-unit test-integration .ONESHELL: test-unit: ## Run unit tests -test-unit: gotestfmt +test-unit: package gotestfmt @echo "Running unit tests..." set -euo pipefail - go test -json -v -timeout=5m -count=1 ./tool/... 2>&1 | tee ./gotest-unit.log | gotestfmt + go test -json -v -shuffle=on -timeout=5m -count=1 ./tool/... 2>&1 | tee ./gotest-unit.log | gotestfmt .ONESHELL: test-integration: ## Run integration tests test-integration: build gotestfmt @echo "Running integration tests..." set -euo pipefail - go test -json -v -timeout=10m -count=1 -run TestBasic ./test/... 2>&1 | tee ./gotest-integration.log | gotestfmt + go test -json -v -shuffle=on -timeout=10m -count=1 -run TestBasic ./test/... 2>&1 | tee ./gotest-integration.log | gotestfmt # Clean targets From bc048ecd199f4e7a227f9b9d9d12602d21eda38f Mon Sep 17 00:00:00 2001 From: Kemal Akkoyun Date: Thu, 6 Nov 2025 11:21:52 +0100 Subject: [PATCH 13/14] chore: Split test runs on the CI Signed-off-by: Kemal Akkoyun --- .github/workflows/check-typos.yaml | 20 ++++++ .github/workflows/golangci-lint.yaml | 2 - .../{unit-test.yaml => test-integration.yaml} | 16 ++--- .github/workflows/test-unit.yaml | 61 +++++++++++++++++++ Makefile | 35 ++++++++--- 5 files changed, 117 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/check-typos.yaml rename .github/workflows/{unit-test.yaml => test-integration.yaml} (82%) create mode 100644 .github/workflows/test-unit.yaml diff --git a/.github/workflows/check-typos.yaml b/.github/workflows/check-typos.yaml new file mode 100644 index 0000000..f08b138 --- /dev/null +++ b/.github/workflows/check-typos.yaml @@ -0,0 +1,20 @@ +name: Check Typos + +on: + pull_request: + push: + branches: [main] + +permissions: + contents: read + +jobs: + check-typos: + name: Check Typos + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 + + - name: Check Typos + uses: crate-ci/typos@0c17dabcee8b8f1957fa917d17393a23e02e1583 # v1.36.3 diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/golangci-lint.yaml index e64773b..ee223e9 100644 --- a/.github/workflows/golangci-lint.yaml +++ b/.github/workflows/golangci-lint.yaml @@ -30,5 +30,3 @@ jobs: uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8 with: version: ${{ env.GOLANGCI_LINT_VERSION }} - - name: Check Typos - uses: crate-ci/typos@0c17dabcee8b8f1957fa917d17393a23e02e1583 # v1.36.3 diff --git a/.github/workflows/unit-test.yaml b/.github/workflows/test-integration.yaml similarity index 82% rename from .github/workflows/unit-test.yaml rename to .github/workflows/test-integration.yaml index 10b1a08..c40d8fd 100644 --- a/.github/workflows/unit-test.yaml +++ b/.github/workflows/test-integration.yaml @@ -1,4 +1,4 @@ -name: Unit Tests +name: Run Integration Tests on: push: branches: @@ -18,12 +18,12 @@ jobs: uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 with: go-version-file: go.mod - - name: Run coverage tests - run: go test ./... -coverprofile=coverage.txt -covermode=atomic + - name: Run unit test coverage + run: make test-integration/coverage - name: Upload coverage report uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1 - compatibility-test: + test-unit: name: Test (go ${{ matrix.platform.os }} ${{ matrix.platform.arch }}) strategy: matrix: @@ -48,14 +48,14 @@ jobs: - name: Build and test env: GOARCH: ${{ matrix.platform.arch }} - run: make build test + run: make test-integration done: name: Done runs-on: ubuntu-latest - needs: [compatibility-test] + needs: [test-unit] steps: - name: Success run: | - echo ${{ needs.compatibility-test.result }} - test ${{ needs.compatibility-test.result }} == "success" + echo ${{ needs.test-unit.result }} + test ${{ needs.test-unit.result }} == "success" diff --git a/.github/workflows/test-unit.yaml b/.github/workflows/test-unit.yaml new file mode 100644 index 0000000..21eb310 --- /dev/null +++ b/.github/workflows/test-unit.yaml @@ -0,0 +1,61 @@ +name: Run Unit Tests +on: + push: + branches: + - main + pull_request: +# Declare default permissions as read only. +permissions: read-all +jobs: + test-coverage: + if: false # temporary disable + name: Coverage + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 + - name: Install Go + uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 + with: + go-version-file: go.mod + - name: Run unit test coverage + run: make test-unit/coverage + - name: Upload coverage report + uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1 + + test-unit: + name: Test (go ${{ matrix.platform.os }} ${{ matrix.platform.arch }}) + strategy: + matrix: + platform: + - os: ubuntu-latest + arch: amd64 + - os: ubuntu-22.04-arm + arch: arm64 + - os: macos-latest + arch: arm64 + - os: windows-latest + arch: amd64 + runs-on: ${{ matrix.platform.os }} + steps: + - name: Checkout code + uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 + - name: Install Go + uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 + with: + go-version-file: go.mod + cache-dependency-path: "**/go.mod" + - name: Build and test + env: + GOARCH: ${{ matrix.platform.arch }} + run: make test-unit + + done: + name: Done + runs-on: ubuntu-latest + needs: [test-unit] + steps: + - name: Success + run: | + echo ${{ needs.test-unit.result }} + test ${{ needs.test-unit.result }} == "success" diff --git a/Makefile b/Makefile index 116e2b2..557176f 100644 --- a/Makefile +++ b/Makefile @@ -53,15 +53,22 @@ install: ## Install otel to $$GOPATH/bin @go mod tidy go install -ldflags "-X main.Version=$(VERSION) -X main.CommitHash=$(COMMIT_HASH) -X main.BuildTime=$(BUILD_TIME)" ./$(TOOL_DIR) +.ONESHELL: package: ## Package the instrumentation code into binary @echo "Packaging instrumentation code into binary..." - @rm -rf $(INST_PKG_TMP) - @cp -a pkg $(INST_PKG_TMP) - @cd $(INST_PKG_TMP) && go mod tidy - @tar -czf $(INST_PKG_GZIP) --exclude='*.log' $(INST_PKG_TMP) - @mkdir -p tool/data/ - @mv $(INST_PKG_GZIP) tool/data/ - @rm -rf $(INST_PKG_TMP) + @set -euo pipefail + rm -rf $(INST_PKG_TMP) + if [ ! -d pkg ]; then \ + echo "Error: pkg directory does not exist"; \ + exit 1; \ + fi + cp -r pkg $(INST_PKG_TMP) + (cd $(INST_PKG_TMP) && go mod tidy) + tar -czf $(INST_PKG_GZIP) --exclude='*.log' $(INST_PKG_TMP) + mkdir -p tool/data/ + mv $(INST_PKG_GZIP) tool/data/ + rm -rf $(INST_PKG_TMP) + @echo "Package created successfully at tool/data/$(INST_PKG_GZIP)" build-demo: ## Build all demos build-demo: build-demo-grpc build-demo-http @@ -171,6 +178,13 @@ test-unit: package gotestfmt set -euo pipefail go test -json -v -shuffle=on -timeout=5m -count=1 ./tool/... 2>&1 | tee ./gotest-unit.log | gotestfmt +.ONESHELL: +test-unit/coverage: ## Run unit tests with coverage report +test-unit/coverage: package gotestfmt + @echo "Running unit tests with coverage report..." + set -euo pipefail + go test -json -v -shuffle=on -timeout=5m -count=1 ./tool/... -coverprofile=coverage.txt -covermode=atomic 2>&1 | tee ./gotest-unit.log | gotestfmt + .ONESHELL: test-integration: ## Run integration tests test-integration: build gotestfmt @@ -178,6 +192,13 @@ test-integration: build gotestfmt set -euo pipefail go test -json -v -shuffle=on -timeout=10m -count=1 -run TestBasic ./test/... 2>&1 | tee ./gotest-integration.log | gotestfmt +.ONESHELL: +test-integration/coverage: ## Run integration tests with coverage report +test-integration/coverage: build gotestfmt + @echo "Running integration tests with coverage report..." + set -euo pipefail + go test -json -v -shuffle=on -timeout=10m -count=1 -run TestBasic ./test/... -coverprofile=coverage.txt -covermode=atomic 2>&1 | tee ./gotest-integration.log | gotestfmt + # Clean targets clean: ## Clean build artifacts From 8513d4ff2f543b155d227860ced4c4edab925deb Mon Sep 17 00:00:00 2001 From: Kemal Akkoyun Date: Thu, 6 Nov 2025 11:39:22 +0100 Subject: [PATCH 14/14] chore: Unify CI workflow naming Signed-off-by: Kemal Akkoyun --- ...-commit.yml => check-conventional-commit.yml} | 0 .../{checkmake.yaml => check-makefile.yaml} | 16 ++++++++-------- ...-format-check.yaml => check-yaml-format.yaml} | 2 +- .../{actionlint.yaml => lint-actionlint.yaml} | 2 +- .../{golangci-lint.yaml => lint-golang.yaml} | 6 +++--- .../{markdown-lint.yaml => lint-markdown.yaml} | 2 +- .github/workflows/test-integration.yaml | 2 +- .github/workflows/test-unit.yaml | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) rename .github/workflows/{conventional-commit.yml => check-conventional-commit.yml} (100%) rename .github/workflows/{checkmake.yaml => check-makefile.yaml} (73%) rename .github/workflows/{yaml-format-check.yaml => check-yaml-format.yaml} (95%) rename .github/workflows/{actionlint.yaml => lint-actionlint.yaml} (96%) rename .github/workflows/{golangci-lint.yaml => lint-golang.yaml} (93%) rename .github/workflows/{markdown-lint.yaml => lint-markdown.yaml} (95%) diff --git a/.github/workflows/conventional-commit.yml b/.github/workflows/check-conventional-commit.yml similarity index 100% rename from .github/workflows/conventional-commit.yml rename to .github/workflows/check-conventional-commit.yml diff --git a/.github/workflows/checkmake.yaml b/.github/workflows/check-makefile.yaml similarity index 73% rename from .github/workflows/checkmake.yaml rename to .github/workflows/check-makefile.yaml index 82cac89..671c533 100644 --- a/.github/workflows/checkmake.yaml +++ b/.github/workflows/check-makefile.yaml @@ -1,18 +1,18 @@ -name: Checkmake +name: Check Makefiles on: push: branches: - main paths: - - 'Makefile' - - '.checkmake' - - '.github/workflows/checkmake.yaml' + - "Makefile" + - ".checkmake" + - ".github/workflows/checkmake.yaml" pull_request: paths: - - 'Makefile' - - '.checkmake' - - '.github/workflows/checkmake.yaml' + - "Makefile" + - ".checkmake" + - ".github/workflows/checkmake.yaml" jobs: checkmake: @@ -24,7 +24,7 @@ jobs: - name: Set up Go uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # ratchet:actions/setup-go@v5 with: - go-version: '1.23' + go-version: "1.23" - name: Install checkmake run: go install github.com/checkmake/checkmake/cmd/checkmake@latest diff --git a/.github/workflows/yaml-format-check.yaml b/.github/workflows/check-yaml-format.yaml similarity index 95% rename from .github/workflows/yaml-format-check.yaml rename to .github/workflows/check-yaml-format.yaml index ceeb1c2..a52dea8 100644 --- a/.github/workflows/yaml-format-check.yaml +++ b/.github/workflows/check-yaml-format.yaml @@ -1,4 +1,4 @@ -name: YAML Format Check +name: Check YAML Formatting on: pull_request: diff --git a/.github/workflows/actionlint.yaml b/.github/workflows/lint-actionlint.yaml similarity index 96% rename from .github/workflows/actionlint.yaml rename to .github/workflows/lint-actionlint.yaml index 72e539d..afbe62b 100644 --- a/.github/workflows/actionlint.yaml +++ b/.github/workflows/lint-actionlint.yaml @@ -1,4 +1,4 @@ -name: GitHub Actions Lint +name: Check GitHub Actions on: pull_request: diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/lint-golang.yaml similarity index 93% rename from .github/workflows/golangci-lint.yaml rename to .github/workflows/lint-golang.yaml index ee223e9..6f59369 100644 --- a/.github/workflows/golangci-lint.yaml +++ b/.github/workflows/lint-golang.yaml @@ -1,4 +1,4 @@ -name: Linters +name: Check Go Code on: push: branches: @@ -12,8 +12,8 @@ env: GOLANGCI_LINT_VERSION: v2.1.6 jobs: - golangci: - name: Format and Lint + golangci-lint: + name: Check Go Code runs-on: ubuntu-latest steps: - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 diff --git a/.github/workflows/markdown-lint.yaml b/.github/workflows/lint-markdown.yaml similarity index 95% rename from .github/workflows/markdown-lint.yaml rename to .github/workflows/lint-markdown.yaml index 2f92715..1262ff9 100644 --- a/.github/workflows/markdown-lint.yaml +++ b/.github/workflows/lint-markdown.yaml @@ -1,4 +1,4 @@ -name: Markdown Lint +name: Check Markdown Files on: pull_request: paths: diff --git a/.github/workflows/test-integration.yaml b/.github/workflows/test-integration.yaml index c40d8fd..863cd21 100644 --- a/.github/workflows/test-integration.yaml +++ b/.github/workflows/test-integration.yaml @@ -1,4 +1,4 @@ -name: Run Integration Tests +name: Integration Tests on: push: branches: diff --git a/.github/workflows/test-unit.yaml b/.github/workflows/test-unit.yaml index 21eb310..c01c286 100644 --- a/.github/workflows/test-unit.yaml +++ b/.github/workflows/test-unit.yaml @@ -1,4 +1,4 @@ -name: Run Unit Tests +name: Unit Tests on: push: branches: