Changes generated by 6799825ac6c97f1e0e3a79a6ca07c3e0340af432 #185
Workflow file for this run
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
name: test | |
on: push | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.17 | |
- name: Run go unit tests | |
run: go test | |
code-quality: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.17 | |
- name: Check Go Code is Formatted | |
run: |- | |
unformatedFiles=$(gofmt -l ./) | |
[ -z "$unformatedFiles" ] && exit 0 | |
echo >&2 "The following files are not formatted:" | |
echo "$unformatedFiles" | |
echo >&2 "Run 'go fmt ./...' to format the files." | |
exit 1 | |
- name: Run go vet | |
run: go vet ./... |