Skip to content

Commit

Permalink
Add coverage workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
chroju committed Apr 14, 2021
1 parent 1a1d841 commit d20fa4b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 8 deletions.
27 changes: 20 additions & 7 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
rm -f bin/

test-coverage: mod
go test -race -covermode atomic -coverprofile=covprofile ./...
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit d20fa4b

Please sign in to comment.