Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] Add test to ensure metadata.yaml is present for all components #24643

Merged
merged 1 commit into from
Jul 27, 2023
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
2 changes: 2 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ jobs:
run: make install-tools
- name: CheckDoc
run: make checkdoc
- name: CheckMetadata
run: make checkmetadata
- name: Porto
run: |
make -j2 goporto
Expand Down
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,13 @@ build-examples:

# Verify existence of READMEs for components specified as default components in the collector.
.PHONY: checkdoc
checkdoc: $(CHECKDOC)
$(CHECKDOC) --project-path $(CURDIR) --component-rel-path $(COMP_REL_PATH) --module-name $(MOD_NAME)
checkdoc: $(CHECKFILE)
$(CHECKFILE) --project-path $(CURDIR) --component-rel-path $(COMP_REL_PATH) --module-name $(MOD_NAME) --file-name "README.md"

# Verify existence of metadata.yaml for components specified as default components in the collector.
.PHONY: checkmetadata
checkmetadata: $(CHECKFILE)
$(CHECKFILE) --project-path $(CURDIR) --component-rel-path $(COMP_REL_PATH) --module-name $(MOD_NAME) --file-name "metadata.yaml"

.PHONY: all-checklinks
all-checklinks:
Expand Down
2 changes: 1 addition & 1 deletion Makefile.Common
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ MULITMOD := $(TOOLS_BIN_DIR)/multimod
CHLOGGEN := $(TOOLS_BIN_DIR)/chloggen
GOIMPORTS := $(TOOLS_BIN_DIR)/goimports
PORTO := $(TOOLS_BIN_DIR)/porto
CHECKDOC := $(TOOLS_BIN_DIR)/checkdoc
CHECKFILE := $(TOOLS_BIN_DIR)/checkfile
CROSSLINK := $(TOOLS_BIN_DIR)/crosslink
GOJUNIT := $(TOOLS_BIN_DIR)/go-junit-report
BUILDER := $(TOOLS_BIN_DIR)/builder
Expand Down
4 changes: 2 additions & 2 deletions internal/tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/google/addlicense v1.1.1
github.com/jcchavezs/porto v0.4.0
github.com/jstemmer/go-junit-report v1.0.0
go.opentelemetry.io/build-tools/checkdoc v0.9.0
go.opentelemetry.io/build-tools/checkfile v0.10.0
go.opentelemetry.io/build-tools/chloggen v0.9.0
go.opentelemetry.io/build-tools/crosslink v0.9.0
go.opentelemetry.io/build-tools/issuegenerator v0.9.0
Expand Down Expand Up @@ -197,7 +197,7 @@ require (
github.com/yeya24/promlinter v0.2.0 // indirect
github.com/ykadowak/zerologlint v0.1.2 // indirect
gitlab.com/bosi/decorder v0.2.3 // indirect
go.opentelemetry.io/build-tools v0.9.0 // indirect
go.opentelemetry.io/build-tools v0.10.0 // indirect
go.tmz.dev/musttag v0.7.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
Expand Down
8 changes: 4 additions & 4 deletions internal/tools/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/tools/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
_ "github.com/google/addlicense"
_ "github.com/jcchavezs/porto/cmd/porto"
_ "github.com/jstemmer/go-junit-report"
_ "go.opentelemetry.io/build-tools/checkdoc"
_ "go.opentelemetry.io/build-tools/checkfile"
_ "go.opentelemetry.io/build-tools/chloggen"
_ "go.opentelemetry.io/build-tools/crosslink"
_ "go.opentelemetry.io/build-tools/issuegenerator"
Expand Down