Skip to content

Commit

Permalink
Merge pull request #73 from kolyshkin/bump-ci
Browse files Browse the repository at this point in the history
Refresh and improve CI
  • Loading branch information
cpuguy83 authored Jul 13, 2021
2 parents 2640e80 + 129c806 commit a3a0287
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
name: Build
strategy:
matrix:
go-versions: [1.12.x, 1.13.x, 1.14.x]
platform: [ubuntu-latest]
go-versions: [1.13.x, 1.15.x, 1.16.x]
platform: [ubuntu-20.04]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v1
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}

Expand All @@ -29,3 +29,12 @@ jobs:

- name: Test
run: go test -v ./...

lint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: golangci/golangci-lint-action@v2
with:
# must be specified without patch version
version: v1.41
13 changes: 0 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,17 @@ build: bin/go-md2man
clean:
@rm -rf bin/*

.PHONY: check
check: lint

.PHONY: test
test:
@go test $(TEST_FLAGS) ./...

.PHONY: lint
lint:
@$(LINTER_BIN) run --new-from-rev "HEAD~$(git rev-list master.. --count)" ./...

bin/go-md2man: actual_build_flags := $(BUILD_FLAGS) -o bin/go-md2man
bin/go-md2man: bin
@CGO_ENABLED=0 go build $(actual_build_flags)

bin:
@mkdir ./bin

$(LINTER_BIN): linter_bin_path := $(shell which $(LINTER_BIN))
$(LINTER_BIN):
@if [ -z $(linter_bin_path) ] || [ ! -x $(linter_bin_path) ]; then \
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.15.0; \
fi

.PHONY: mod
mod:
@go mod tidy
Expand Down

0 comments on commit a3a0287

Please sign in to comment.