Skip to content

Commit

Permalink
Validate go mod on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mxpv committed Apr 18, 2020
1 parent a3fcd67 commit 44e1f77
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- name: Install Go
uses: actions/setup-go@v1
Expand Down Expand Up @@ -36,16 +37,33 @@ jobs:
run: |
make test
lint:
name: Lint
checks:
name: Checks
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: 1.12

- name: Checkout
uses: actions/checkout@v1

- name: Go mod
env:
DIFF_PATH: "go.mod go.sum"
run: |
go mod tidy
DIFF=$(git status --porcelain -- $DIFF_PATH)
if [ "$DIFF" ]; then
echo
echo "These files were modified:"
echo
echo "$DIFF"
echo
exit 1
fi
- name: Lint
run: |
make lint

0 comments on commit 44e1f77

Please sign in to comment.