github-action: add prepare-source test to linting

This is inspired by PR #307, but uses github actions rather than
Travis.

Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
Tom Gundersen 2020-03-10 21:37:23 +01:00
parent efb2975e36
commit c50aa9e135

View file

@ -25,6 +25,18 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: Check that source has been prepared
run: |
./tools/prepare-source.sh
if ! git diff --quiet --exit-code ; then
echo
echo "Please include these changes in your branch: "
git diff
exit "1"
else
exit "0"
fi
- name: Install golangci-lint
run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.23.7