-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
118 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
### Scope of changes | ||
|
||
[Brief Description of the Changes] | ||
|
||
### Type of change | ||
|
||
- [ ] new feature | ||
- [ ] bug fix | ||
- [ ] documentation | ||
- [ ] testing | ||
- [ ] technical debt | ||
- [ ] other (describe) | ||
|
||
### Acceptance criteria | ||
|
||
Describe how reviewers can test this change to be sure that it works correctly. Add a checklist if possible. | ||
|
||
### Author checklist | ||
|
||
- [ ] I have manually tested the change and/or added automation in the form of unit tests or integration tests | ||
- [ ] I have updated the dependencies list | ||
- [ ] I have recompiled and included new protocol buffers to reflect changes I made | ||
- [ ] I have added new test fixtures as needed to support added tests | ||
- [ ] Check this box if a reviewer can merge this pull request after approval (leave it unchecked if you want to do it yourself) | ||
- [ ] I have moved the associated Shortcut story to "Ready for Review" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- "v*" | ||
tags: | ||
- "v*" | ||
pull_request: | ||
|
||
jobs: | ||
lint: | ||
name: Go Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.20.x | ||
|
||
- name: Install Staticcheck | ||
run: go install honnef.co/go/tools/cmd/[email protected] | ||
|
||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Lint Go Code | ||
run: staticcheck ./... | ||
|
||
test: | ||
name: Go Test | ||
runs-on: ubuntu-latest | ||
env: | ||
GOPATH: ${{ github.workspace }}/go | ||
GOBIN: ${{ github.workspace }}/go/bin | ||
defaults: | ||
run: | ||
working-directory: ${{ env.GOPATH }}/src/github.com/bbengfort/noaalert | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.20.x | ||
|
||
- name: Cache Speedup | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
with: | ||
path: ${{ env.GOPATH }}/src/github.com/bbengfort/noaalert | ||
|
||
- name: Run Unit Tests | ||
run: go test -v -coverprofile=coverage.txt -covermode=atomic --race ./... | ||
|
||
- name: Coverage Report | ||
run: go tool cover -func=coverage.txt | ||
|
||
build: | ||
name: Go Build | ||
runs-on: ubuntu-latest | ||
env: | ||
GOPATH: ${{ github.workspace }}/go | ||
GOBIN: ${{ github.workspace }}/go/bin | ||
defaults: | ||
run: | ||
working-directory: ${{ env.GOPATH }}/src/github.com/bbengfort/noaalert | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.20.x | ||
|
||
- name: Cache Speedup | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
with: | ||
path: ${{ env.GOPATH }}/src/github.com/bbengfort/noaalert | ||
|
||
- name: Build | ||
run: go build ./cmd/... |