Description
Template for GitHub Apps built with Golang
You can find more information about this project/repository and how to use it in following blog post:
https://martinheinz.dev/blog/65
Template for GitHub Apps built with Golang alternatives and similar packages
Based on the "Continuous Integration" category.
Alternatively, view go-github-app alternatives based on common mentions on social networks and blogs.
-
drone
DISCONTINUED. Gitness is an Open Source developer platform with Source Control management, Continuous Integration and Continuous Delivery. [Moved to: https://github.com/harness/gitness] -
Buildkite
The Buildkite Agent is an open-source toolkit written in Go for securely running build jobs on any device or network -
go-test-coverage
go-test-coverage is tool and github action which reports issues when test coverage is below set threshold
InfluxDB - Power Real-Time Data Analytics at Scale
Do you think we are missing an alternative of Template for GitHub Apps built with Golang or a related project?
README
Template for GitHub Apps built with Golang
Blog Posts - More Information About This Repo
You can find more information about this project/repository and how to use it in following blog post:
Building GitHub Apps with Golang
Quick Start
To use this repository as starter for your project you can run configure_project.sh script, which sets up all variables and file names. This way you can avoid configuring and renaming things yourself:
./configure_project.sh \
APP_ID="54321" \
INSTALLATION_ID="987654321" \
WEBHOOK_SECRET="verysecret" \
KEY_PATH="./github_key.pem" \
REGISTRY="ghcr.io/<GITHUB_USERNAME>/go-github-app"
Running
make container # Builds containerized application
make run # Runs container at localhost
# From another terminal:
curl http://localhost:8080/api/v1/github/pullrequests/octocat/hello-world
Testing
Test are run inside container image, equivalent to the container in which the application runs. To run tests:
make test
Running tests:
? github.com/MartinHeinz/go-github-app/cmd/app [no test files]
ok github.com/MartinHeinz/go-github-app/cmd/app/apis 0.010s
? github.com/MartinHeinz/go-github-app/cmd/app/config [no test files]
? github.com/MartinHeinz/go-github-app/cmd/app/httputil [no test files]
? github.com/MartinHeinz/go-github-app/cmd/app/test_data [no test files]
? github.com/MartinHeinz/go-github-app/cmd/app/utils [no test files]
ok github.com/MartinHeinz/go-github-app/cmd/app/webhooks 0.006s
? github.com/MartinHeinz/go-github-app/pkg [no test files]
Checking gofmt: PASS
Checking go vet: PASS
CI/CD
Predefined CI/CD uses GitHub Actions:
Build, Test, Lint Workflow (
build.yaml
):- Builds binary and container image
- Runs tests and generates code coverage report
- Performs SonarCloud code analysis
- Sends coverage starts to CodeClimate
Release Workflow (
release.yaml
, triggered on tag creation):- Builds container image
- Pushes the image to GitHub container registry