diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index a2e7ecb..56823bb 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -1,20 +1,33 @@ name: test -on: pull_request +on: + workflow_dispatch: + pull_request: + branches: + - main + push: + branches: + - main jobs: test: name: Test Parade - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Checkout uses: actions/checkout@master - name: Setup go - uses: actions/setup-go@v1 + uses: actions/setup-go@v2 with: - go-version: "1.15.6" + go-version: "1.16.0" - name: Test all env: GO111MODULE: on run: | - export PATH=$PATH:$(go env GOPATH)/bin - go get golang.org/x/lint/golint - make test + make test-coverage + - name: Install goveralls + env: + GO111MODULE: off + run: go get github.com/mattn/goveralls + - name: Send coverage + uses: shogo82148/actions-goveralls@v1 + with: + path-to-profile: covprofile diff --git a/Makefile b/Makefile index 156db0f..7cd4695 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,13 @@ test: lint crossbuild: test gox -os="linux darwin windows" -arch="386 amd64" -output "bin/remo_{{.OS}}_{{.Arch}}/{{.Dir}}" +mod: + go mod download + clean: go clean rm -f $(BINARY_NAME) - rm -f bin/ \ No newline at end of file + rm -f bin/ + +test-coverage: mod + go test -race -covermode atomic -coverprofile=covprofile ./... diff --git a/README.md b/README.md index 09bb2a7..a5722b9 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ Parade [![release badge](https://img.shields.io/github/v/release/chroju/parade.svg)](https://github.com/chroju/parade/releases) [![test badge](https://github.com/chroju/parade/workflows/test/badge.svg)](https://github.com/chroju/parade/actions?workflow=test) +[![Coverage Status](https://coveralls.io/repos/github/chroju/parade/badge.svg?branch=main)](https://coveralls.io/github/chroju/parade?branch=main) + Parade is a simple CLI tool for AWS SSM parameter store. Easy to read and write key values in your parameter store.