From c50aa9e135850fcf5ea925995823711645f7415f Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Tue, 10 Mar 2020 21:37:23 +0100 Subject: [PATCH] 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 --- .github/workflows/tests.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 91e477c23..dd6f2f966 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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