Skip to content

Commit

Permalink
#71 Update documentations
Browse files Browse the repository at this point in the history
  • Loading branch information
docktermj committed Jul 11, 2024
1 parent 9414790 commit 886de55
Show file tree
Hide file tree
Showing 10 changed files with 342 additions and 130 deletions.
18 changes: 15 additions & 3 deletions .github/coverage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,19 @@

## testcoverage.yaml

- [testcoverage.yaml]
- Used by `coverage:` in
- [go-test-darwin.yaml](../workflows/go-test-darwin.yaml)
- [go-test-linux.yaml](../workflows/go-test-linux.yaml)
- [go-test-windows.yaml](../workflows/go-test-windows.yaml)
- [go-test-darwin.yaml]
- [go-test-linux.yaml]
- [go-test-windows.yaml]
- [go-test-coverage]
- [go-test-coverage configuration]
- [go-test-coverage badge]

[go-test-darwin.yaml]: ../workflows/README.md#go-test-darwinyaml
[go-test-linux.yaml]: ../workflows/README.md#go-test-linuxyaml
[go-test-windows.yaml]: ../workflows/README.md#go-test-windowsyaml
[testcoverage.yaml]: testcoverage.yaml
[go-test-coverage]: https://github.com/vladopajic/go-test-coverage
[go-test-coverage configuration]: https://github.com/vladopajic/go-test-coverage?tab=readme-ov-file#config
[go-test-coverage badge]: https://github.com/vladopajic/go-test-coverage/blob/main/docs/badge.md
58 changes: 42 additions & 16 deletions .github/linters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,53 @@

## .checkov.yaml

- Used by [???](https://)
- [.checkov.yaml]
- Used by [lint-workflows.yaml]
- [checkov]
- [checkov configuration]

## .golangci.yaml

- Used by [golangci-lint.yaml](../workflows/golangci-lint.yaml)
- [golangci-lint](https://golangci-lint.run/)
- [Configuration](https://golangci-lint.run/usage/configuration/)
- [.golangci.yaml]
- Used by [golangci-lint.yaml]
- [golangci-lint]
- [golangci-lint configuration]

## .jscpd.json

- Used by
- [Options](https://github.com/kucherenko/jscpd/tree/master/apps/jscpd#options)
- Example:

```json
{
"ignore": [
"**/*.go,**/go-test*.yaml"
],
"threshold": 10
}
```
- [.jscpd.json]
- Used by [lint-workflows.yaml]
- [jscpd]
- [jscpd configuration]
- Example:

```json
{
"ignore": [
"**/*.go,**/go-test*.yaml"
],
"threshold": 10
}
```

## .yaml-lint.yml

- [.yaml-lint.yml]
- Used by [lint-workflows.yaml]
- [yaml-lint]
- [yaml-lint configuration]

[.checkov.yaml]: .checkov.yaml
[.golangci.yaml]: .golangci.yaml
[.jscpd.json]: .jscpd.json
[.yaml-lint.yml]: .yaml-lint.yml
[checkov configuration]: https://www.checkov.io/2.Basics/CLI%20Command%20Reference.html
[checkov]: https://www.checkov.io/
[golangci-lint configuration]: https://golangci-lint.run/usage/configuration/
[golangci-lint.yaml]: ../workflows/README.md#golangci-lintyaml
[golangci-lint]: https://golangci-lint.run/
[jscpd configuration]: https://github.com/kucherenko/jscpd/tree/master/apps/jscpd#options
[jscpd]: https://github.com/kucherenko/jscpd
[lint-workflows.yaml]: ../workflows/README.md#lint-workflowsyaml
[yaml-lint configuration]: https://yamllint.readthedocs.io/en/stable/configuration.html
[yaml-lint]: https://github.com/adrienverge/yamllint
186 changes: 159 additions & 27 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,72 +2,204 @@

## add-labels-standardized.yaml

- [GitHub Action](add-labels-standardized.yaml)
- uses [senzing-factory/build-resources/...add-labels-to-issue.yaml)](https://github.com/senzing-factory/build-resources/blob/main/.github/workflows/add-labels-to-issue.yaml)
When issues are opened,
this action adds appropriate labels to the issue.
(e.g. "triage", "customer-submission")

- [Add Labels Standardized GitHub action]
- Uses: [senzing-factory/build-resources/.../add-labels-to-issue.yaml]

## add-to-project-garage-dependabot.yaml

- [GitHub Action](add-to-project-garage-dependabot.yaml)
- uses [senzing-factory/build-resources/.../add-to-project-dependabot.yaml](https://github.com/senzing-factory/build-resources/blob/main/.github/workflows/add-to-project-dependabot.yaml)
When a Dependabot Pull Request (PR) is made against `main` branch,
this action adds the PR to the "Garage" project board as "In Progress".

- [Add to Project Garage Dependabot GitHub action]
- Uses: [senzing-factory/build-resources/.../add-to-project-dependabot.yaml]

## add-to-project-garage.yaml

- [GitHub Action](add-to-project-garage.yaml)
- uses [senzing-factory/build-resources/.../add-to-project-dependabot.yaml](https://github.com/senzing-factory/build-resources/blob/main/.github/workflows/add-to-project.yaml)
When an issue is created,
this action adds the issue to the "Garage" board as "Backlog".

- [Add to Project Garage GitHub action]
- Uses: [senzing-factory/build-resources/.../add-to-project.yaml]

## dependabot-approve-and-merge.yaml

- [GitHub Action](dependabot-approve-and-merge.yaml)
- uses [senzing-factory/build-resources/.../dependabot-approve-and-merge.yaml](https://github.com/senzing-factory/build-resources/blob/main/.github/workflows/dependabot-approve-and-merge.yaml)
When a Dependabot Pull Request (PR) is made against the `main` branch,
this action determines if it should be automatically approved and merged into the `main` branch.
Once this action occurs [move-pr-to-done-dependabot.yaml] moves the PR on the "Garage" project board to "Done".

- [Dependabot Approve and Merge GitHub action]
- Uses: [senzing-factory/build-resources/.../dependabot-approve-and-merge.yaml]

## docker-build-container.yaml

- [GitHub Action](docker-build-container.yaml)
- uses [senzing-factory/github-action-docker-buildx-build](https://github.com/senzing-factory/github-action-docker-buildx-build)
When a Pull Request is made against the `main` branch,
this action verifies that the `Dockerfile` can be successfully built.

*Note:* The Docker image is **not** pushed to [DockerHub].

- [Docker Build Container GitHub action]
- Uses: [senzing-factory/github-action-docker-buildx-build]

## docker-push-containers-to-dockerhub.yaml

- [GitHub Action](docker-push-containers-to-dockerhub.yaml)
- uses [senzing-factory/github-action-docker-buildx-build](https://github.com/senzing-factory/github-action-docker-buildx-build)
After a [Semantic Version] release is created,
this action builds Docker images on multiple architectures and pushes the Docker images to [DockerHub].

- [Docker Push Containers to DockerHub GitHub action]
- Uses: [senzing-factory/github-action-docker-buildx-build]

## golangci-lint.yaml

- [GitHub Action](golangci-lint.yaml)
- uses [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action)
When a change is committed to GitHub or a Pull Request is made against the `main` branch,
this action runs [golangci-lint] to run multiple linters against the code.

- [Golangci Lint GitHub action]
- Configuration:
- [.golangci.yaml]
- Uses:
- [actions/checkout]
- [senzing-factory/github-action-install-senzing-api]
- [actions/setup-go]
- [golangci/golangci-lint-action]

## go-proxy-pull.yaml

- [GitHub Action](go-proxy-pull.yaml)
- uses [andrewslotin/go-proxy-pull-action](https://github.com/andrewslotin/go-proxy-pull-action)
After a [Semantic Version] release is created,
this action expedites the Go publishing process.

- [Go Proxy Pull GitHub action]
- Uses: [andrewslotin/go-proxy-pull-action]

## go-test-darwin.yaml

- [GitHub Action](go-test-darwin.yaml)
When a Pull Request is made against the `main` branch,
this action runs `go test` with coverage testing on macOS.

- [Go Test Darwin GitHub action]
- Configuration: [testcoverage.yaml]
- Uses:
- [actions/checkout]
- [actions/setup-go]
- [gotesttools/gotestfmt-action]
- [senzing-factory/github-action-install-senzing-api]
- [actions/upload-artifact]
- [senzing-factory/build-resources/.../go-coverage.yaml]

## go-test-linux.yaml

- [GitHub Action](go-test-linux.yaml)
When a change is committed to GitHub or a Pull Request is made against the `main` branch,
this action runs `go test` with coverage testing on Linux.

- [Go Test Linux GitHub action]
- Configuration: [testcoverage.yaml]
- Uses:
- [actions/checkout]
- [actions/setup-go]
- [gotesttools/gotestfmt-action]
- [senzing-factory/github-action-install-senzing-api]
- [actions/upload-artifact]
- [senzing-factory/build-resources/.../go-coverage.yaml]

## go-test-windows.yaml

- [GitHub Action](go-test-windows.yaml)
When a Pull Request is made against the `main` branch,
this action runs `go test` with coverage testing on Windows.

- [Go Test Windows GitHub action]
- Configuration: [testcoverage.yaml]
- Uses:
- [actions/checkout]
- [actions/setup-go]
- [gotesttools/gotestfmt-action]
- [senzing-factory/github-action-install-senzing-api]
- [actions/upload-artifact]
- [senzing-factory/build-resources/.../go-coverage.yaml]

## lint-workflows.yaml

- [GitHub Action](lint-workflows.yaml)
- uses [senzing-factory/build-resources/.../lint-workflows.yaml](https://github.com/senzing-factory/build-resources/blob/main/.github/workflows/lint-workflows.yaml)
When a change is committed to GitHub or a Pull Request is made against the `main` branch,
this action runs [super-linter] to run multiple linters against the code.

- [Lint Workflows GitHub action]
- Configuration:
- [.checkov.yaml]
- [.jscpd.json]
- [.yaml-lint.yml]
- Uses: [senzing-factory/build-resources/.../lint-workflows.yaml]

## make-go-github-file.yaml

- [GitHub Action](make-go-github-file.yaml)
- uses [senzing-factory/build-resources/.../make-go-github-file.yaml](https://github.com/senzing-factory/build-resources/blob/main/.github/workflows/make-go-github-file.yaml)
After a [Semantic Version] release is created,
this action creates a Pull Request for an updated [github.go] file
for the **next** Semantic Version release by increasing the Semantic Version's Patch value.

- [Make Go GitHub File GitHub action]
- Uses: [senzing-factory/build-resources/.../make-go-github-file.yaml]

## make-go-tag.yaml

- [GitHub Action](make-go-tag.yaml)
- uses [senzing-factory/github-action-make-go-tag](https://github.com/senzing-factory/github-action-make-go-tag)
After a [Semantic Version] release is created,
this action creates a tag in the form `vM.m.P` using the SHA of the `M.m.P` release.
The `v` prefix is standard usage in [Go].

- [Make Go Tag GitHub action]
- Uses:
- [actions/checkout]
- [senzing-factory/github-action-make-go-tag]

## move-pr-to-done-dependabot.yaml

- [GitHub Action](move-pr-to-done-dependabot.yaml)
- uses [senzing-factory/build-resources/.../move-pr-to-done-dependabot.yaml](https://github.com/senzing-factory/build-resources/blob/main/.github/workflows/move-pr-to-done-dependabot.yaml)
When a Pull Request is merged into the `main` branch,
this action moves the PR on the "Garage" project board to "Done".

- [Move PR to Done Dependabot GitHub action]
- Uses: [senzing-factory/build-resources/.../move-pr-to-done-dependabot.yaml]

[.checkov.yaml]: ../linters/README.md#checkovyaml
[.golangci.yaml]: ../linters/README.md#golangciyaml
[.jscpd.json]: ../linters/README.md#jscpdjson
[.yaml-lint.yml]: ../linters/README.md#yaml-lintyml
[actions/checkout]: https://github.com/actions/checkout
[actions/setup-go]: https://github.com/actions/setup-go
[actions/upload-artifact]: https://github.com/actions/upload-artifact
[Add Labels Standardized GitHub action]: add-labels-standardized.yaml
[Add to Project Garage Dependabot GitHub action]: add-to-project-garage-dependabot.yaml
[Add to Project Garage GitHub action]: add-to-project-garage.yaml
[andrewslotin/go-proxy-pull-action]: https://github.com/andrewslotin/go-proxy-pull-action
[Dependabot Approve and Merge GitHub action]: dependabot-approve-and-merge.yaml
[Docker Build Container GitHub action]: docker-build-container.yaml
[Docker Push Containers to DockerHub GitHub action]: docker-push-containers-to-dockerhub.yaml
[DockerHub]: https://hub.docker.com/
[github.go]: ../../cmd/github.go
[Go Proxy Pull GitHub action]: go-proxy-pull.yaml
[Go Test Darwin GitHub action]: go-test-darwin.yaml
[Go Test Linux GitHub action]: go-test-linux.yaml
[Go Test Windows GitHub action]: go-test-windows.yaml
[Go]: https://go.dev/
[Golangci Lint GitHub action]: golangci-lint.yaml
[golangci-lint]: https://github.com/golangci/golangci-lint
[golangci/golangci-lint-action]: https://github.com/golangci/golangci-lint-action
[gotesttools/gotestfmt-action]: https://github.com/gotesttools/gotestfmt-action
[Lint Workflows GitHub action]: lint-workflows.yaml
[Make Go GitHub File GitHub action]: make-go-github-file.yaml
[Make Go Tag GitHub action]: make-go-tag.yaml
[Move PR to Done Dependabot GitHub action]: move-pr-to-done-dependabot.yaml
[move-pr-to-done-dependabot.yaml]: move-pr-to-done-dependabotyaml
[Semantic Version]: https://semver.org/
[senzing-factory/build-resources/.../add-labels-to-issue.yaml]: https://github.com/senzing-factory/build-resources/blob/main/.github/workflows/add-labels-to-issue.yaml
[senzing-factory/build-resources/.../add-to-project-dependabot.yaml]: https://github.com/senzing-factory/build-resources/blob/main/.github/workflows/add-to-project-dependabot.yaml
[senzing-factory/build-resources/.../add-to-project.yaml]: https://github.com/senzing-factory/build-resources/blob/main/.github/workflows/add-to-project.yaml
[senzing-factory/build-resources/.../dependabot-approve-and-merge.yaml]: https://github.com/senzing-factory/build-resources/blob/main/.github/workflows/dependabot-approve-and-merge.yaml
[senzing-factory/build-resources/.../go-coverage.yaml]: https://github.com/senzing-factory/build-resources/blob/main/.github/workflows/go-coverage.yaml
[senzing-factory/build-resources/.../lint-workflows.yaml]: https://github.com/senzing-factory/build-resources/blob/main/.github/workflows/lint-workflows.yaml
[senzing-factory/build-resources/.../make-go-github-file.yaml]: https://github.com/senzing-factory/build-resources/blob/main/.github/workflows/make-go-github-file.yaml
[senzing-factory/build-resources/.../move-pr-to-done-dependabot.yaml]: https://github.com/senzing-factory/build-resources/blob/main/.github/workflows/move-pr-to-done-dependabot.yaml
[senzing-factory/github-action-docker-buildx-build]: https://github.com/senzing-factory/github-action-docker-buildx-build
[senzing-factory/github-action-install-senzing-api]: https://github.com/senzing-factory/github-action-install-senzing-api
[senzing-factory/github-action-make-go-tag]: https://github.com/senzing-factory/github-action-make-go-tag
[super-linter]: https://github.com/super-linter/super-linter
[testcoverage.yaml]: ../coverage/README.md#testcoverageyaml
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ include makefiles/osdetect.mk

# "Simple expanded" variables (':=')

PROGRAM_NAME := $(shell basename `git rev-parse --show-toplevel`) # Name of the GIT repository.
# PROGRAM_NAME is the name of the GIT repository.
PROGRAM_NAME := $(shell basename `git rev-parse --show-toplevel`)
MAKEFILE_PATH := $(abspath $(firstword $(MAKEFILE_LIST)))
MAKEFILE_DIRECTORY := $(shell dirname $(MAKEFILE_PATH))
TARGET_DIRECTORY := $(MAKEFILE_DIRECTORY)/target
Expand Down Expand Up @@ -131,6 +132,13 @@ check-coverage:
.PHONY: run
run: run-osarch-specific

# -----------------------------------------------------------------------------
# Documentation
# -----------------------------------------------------------------------------

.PHONY: documentation
documentation: documentation-osarch-specific

# -----------------------------------------------------------------------------
# Clean
# -----------------------------------------------------------------------------
Expand Down
33 changes: 21 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
# go-cmdhelping

If you are beginning your journey with
[Senzing](https://senzing.com/),
please start with
[Senzing Quick Start guides](https://docs.senzing.com/quickstart/).

You are in the
[Senzing Garage](https://github.com/senzing-garage)
where projects are "tinkered" on.
If you are beginning your journey with [Senzing],
please start with [Senzing Quick Start guides].

You are in the [Senzing Garage] where projects are "tinkered" on.
Although this GitHub repository may help you understand an approach to using Senzing,
it's not considered to be "production ready" and is not considered to be part of the Senzing product.
Heck, it may not even be appropriate for your application of Senzing!
Expand All @@ -28,7 +24,6 @@ the recommendation is not to use it yet.
[![Go Report Card](https://goreportcard.com/badge/github.com/senzing-garage/go-cmdhelping)](https://goreportcard.com/report/github.com/senzing-garage/go-cmdhelping)
[![License](https://img.shields.io/badge/License-Apache2-brightgreen.svg)](https://github.com/senzing-garage/go-cmdhelping/blob/main/LICENSE)

[![gosec.yaml](https://github.com/senzing-garage/go-cmdhelping/actions/workflows/gosec.yaml/badge.svg)](https://github.com/senzing-garage/go-cmdhelping/actions/workflows/gosec.yaml)
[![go-test-linux.yaml](https://github.com/senzing-garage/go-cmdhelping/actions/workflows/go-test-linux.yaml/badge.svg)](https://github.com/senzing-garage/go-cmdhelping/actions/workflows/go-test-linux.yaml)
[![go-test-darwin.yaml](https://github.com/senzing-garage/go-cmdhelping/actions/workflows/go-test-darwin.yaml/badge.svg)](https://github.com/senzing-garage/go-cmdhelping/actions/workflows/go-test-darwin.yaml)
[![go-test-windows.yaml](https://github.com/senzing-garage/go-cmdhelping/actions/workflows/go-test-windows.yaml/badge.svg)](https://github.com/senzing-garage/go-cmdhelping/actions/workflows/go-test-windows.yaml)
Expand All @@ -53,6 +48,20 @@ for an example of use.

## References

- [Development](docs/development.md)
- [Errors](docs/errors.md)
- [Examples](docs/examples.md)
1. [API documentation]
1. [Development]
1. [Errors]
1. [Examples]
1. Related artifacts:
1. [DockerHub]
1. [Helm Chart]

[API documentation]: https://pkg.go.dev/github.com/senzing-garage/template-go
[Development]: docs/development.md
[DockerHub]: https://hub.docker.com/r/senzing/template-go
[Errors]: docs/errors.md
[Examples]: docs/examples.md
[Helm Chart]: https://github.com/senzing-garage/charts/tree/main/charts/template-go
[Senzing Garage]: https://github.com/senzing-garage-garage
[Senzing Quick Start guides]: https://docs.senzing.com/quickstart/
[Senzing]: https://senzing.com/
Loading

0 comments on commit 886de55

Please sign in to comment.