Skip to content

brunoqkz/golang-ci-template-github-actions

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

golang ci template using github actions

WORK IN PROGRESS

Build Status Coverage Status Go Report Card

Info

This repository serves as a template for github-actions integrated go projects. It consists of a hello, world! like example in source file main.go which gets compiled into binary golang-ci-template-github-actions. The pre-commit script runs some checks on the code, before the unit tests are executed. When the build stage was successful, build artifacts are uploaded and available in the CI job status.

When a new release is created, the released-artifacts are automatically uploaded to github and available on the release pagei (TODO).

For demonstration purposes, both a linux- and windows target is created and packetized in a zip-archive.

Creating a release

On your repositories home (github.com) go to Releases > create realease. As soon as the release-tag is created, Travis will run the deployment step. (TODO)

Test coverage (coveralls)

We use the gcov2lcov-action to first convert the golang test coverage to lcov format and then upload it using the coveralls github action.

Don't forget to enable Leave comments (x) in coveralls, under repo settings > pull request alerts, so that the coveralls-action posts a comment with the test coverage to affected pull requests:

pr screenshot

Author

Jan Delgado

About

example for golang project using github actions

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 60.6%
  • Shell 39.4%