-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: introduce github actions and badges
Prior to this change, there was no automated checks on pull requests and we didn't promote the quality of the project. This change introduces github actions to test, vet and report on code coverage. Also, we link to the go reference page and show badges for code quality and coverage in the README.
- Loading branch information
1 parent
b64f8b0
commit 0e5cd36
Showing
4 changed files
with
40 additions
and
3 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,33 @@ | ||
name: Test | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
|
||
- name: Format | ||
run: gofmt -s -w . && git diff --exit-code | ||
|
||
- name: Tidy | ||
run: go mod tidy && git diff --exit-code | ||
|
||
- name: Test | ||
run: go test -v ./... | ||
|
||
- name: Coverage report | ||
uses: ncruces/go-coverage-report@v0 | ||
with: | ||
report: true | ||
chart: true | ||
amend: true | ||
if: | | ||
github.event_name == 'push' | ||
continue-on-error: true |
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
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
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