Workflow file: test-go-task.yml
Lint and check formatting of a Go module.
This is the version of the workflow for projects using the Task task runner tool.
- [
Taskfile.yml
](assets/test-go-task/Taskfile.yml]- Install to: repository root (or add the
go:test
task into the existingTaskfile.yml
)
- Install to: repository root (or add the
Markdown badge:
[](https://github.com/REPO_OWNER/REPO_NAME/actions/workflows/test-go-task.yml)
Replace the REPO_OWNER
and REPO_NAME
placeholders in the URLs with the final repository owner and name (example).
Asciidoc badge:
image:https://github.com/{repository-owner}/{repository-name}/actions/workflows/test-go-task.yml/badge.svg["Test Go status", link="https://github.com/{repository-owner}/{repository-name}/actions/workflows/test-go-task.yml"]
Define the {repository-owner}
and {repository-name}
attributes and use them throughout the readme (example).
Add CI workflow to test Go code
On every push and pull request that affects relevant files:
- Build the project.
- Upload the binary as a workflow artifact to allow interested parties to try it out without needing to build it
themselves.
- Run the project's Go code tests.
On every push and pull request that affects relevant files:
- Build the project.
- Upload the binary as a workflow artifact to allow interested parties to try it out without needing to build it
themselves.
- Run the project's [Golang](https://golang.org/) code tests.