Skip to content

Latest commit

 

History

History
56 lines (36 loc) · 1.87 KB

test-go-task.md

File metadata and controls

56 lines (36 loc) · 1.87 KB

"Test Go" workflow (Task)

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.

Assets

  • [Taskfile.yml](assets/test-go-task/Taskfile.yml]
    • Install to: repository root (or add the go:test task into the existing Taskfile.yml)

Readme badge

Markdown badge:

[![Test Go status](https://github.com/REPO_OWNER/REPO_NAME/actions/workflows/test-go-task.yml/badge.svg)](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).

Commit message

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.

PR message

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.