Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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: 1 addition & 1 deletion .github/workflows/ci-test-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:

- name: modTidy
working-directory: ./${{ inputs.project-directory }}
run: make tools-tidy
run: make tidy

- name: ensure compilation
working-directory: ./${{ inputs.project-directory }}
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ test-all: tools test-tools test-unit
.PHONY: test-examples
test-examples:
@echo "Running example tests..."
make -C examples test
$(MAKE) -C examples test

.PHONY: tidy-all
tidy-all:
make -C examples tidy-examples
make -C modules tidy-modules
$(MAKE) tidy
$(MAKE) -C examples tidy-examples
$(MAKE) -C modules tidy-modules

## -------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions commons-test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ tools:
.PHONY: test-tools
test-tools: $(GOBIN)/gotestsum

.PHONY: tools-tidy
tools-tidy:
.PHONY: tidy
tidy:
go mod tidy
6 changes: 5 additions & 1 deletion docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@
* follow the style, naming and structure conventions of the rest of the project.
* make commits atomic and easy to merge.
* when updating documentation, please see [our guidance for documentation contributions](contributing_docs.md).
* apply format running `go fmt`, or the shell script `./scripts/checks.sh`
* when updating the `go.mod` file, please run `make tidy-all` to ensure all modules are updated. Please be aware that the lint stage could fail if this is not done.
* apply format running `make lint`
* For examples: `make -C examples lint`
* For modules: `make -C modules lint`
* verify all tests are passing. Build and test the project with `make test-all` to do this.
* For a given module or example, go to the module or example directory and run `make test`.
2 changes: 1 addition & 1 deletion examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ lint-examples:

.PHONY: tidy-examples
tidy-examples:
@find . -type f -name Makefile -execdir make tools-tidy \;
@find . -type f -name Makefile -execdir make tidy \;
2 changes: 1 addition & 1 deletion modules/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ lint-modules:

.PHONY: tidy-modules
tidy-modules:
@find . -type f -name Makefile -execdir make tools-tidy \;
@find . -type f -name Makefile -execdir make tidy \;