Add a hook argument for the daemon command #37
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: check code | |
on: [push] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: '1.15.2' | |
- run: go version | |
- name: gofmt | |
run: | | |
set -e | |
out=$(gofmt -s -l *.go) | |
if [ -n "$out" ]; then | |
echo "All the following files are not correctly formatted" | |
echo $out | |
exit 1 | |
fi | |
# TODO: should be reproducible build | |
# - name: go build | |
# run: | | |
# set -e | |
# sha1sum timefor | |
# go get | |
# go list -m all | |
# go build | |
# out=$(git status --porcelain) | |
# if [ -n "$out" ]; then | |
# echo 'Run "go build" and commit binary' | |
# echo $out | |
# sha1sum timefor | |
# exit 1 | |
# fi | |
- run: go vet | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: '1.15.2' | |
- run: go version | |
- name: test | |
run: go test -v |