Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 15 additions & 16 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,33 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Get dependencies
- name: Check go mod status
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
go mod tidy
if [[ ! -z $(git status -s) ]]
then
echo "Go mod state is not clean"
exit 1
fi

- name: Build main
run: go build main.go
run: |
go build main.go
go status -s

- name: Run Go Tests
run: go test ./...

run: |
go test ./...
go status -s

- name: Check format
run: |
go fmt -x ./...
git status -s
if [[ ! -z $(git status -s) ]]
then
echo "not well formatted sources are found"
exit 1
fi
- name: Check go mod status
run: |
go mod tidy
if [[ ! -z $(git status -s) ]]
then
echo "Go mod state is not clean"
exit 1
fi