Browse Source

CI: Send test coverage to Coveralls.

pull/40/head
Tyler Smith 5 months ago
parent
commit
1527c01e5c
No known key found for this signature in database GPG Key ID: CA38F1A9BE0EC890
3 changed files with 20 additions and 8 deletions
  1. +17
    -4
      .github/workflows/workflow.yml
  2. +2
    -3
      Makefile
  3. +1
    -1
      README.md

+ 17
- 4
.github/workflows/workflow.yml View File

@ -1,10 +1,10 @@
---
name: build-check
on:
- push
- pull_request
on: [push, pull_request]
jobs:
build-check:
name: build-check Go ${{ matrix.go }}
runs-on: ubuntu-20.04
strategy:
matrix:
@ -15,10 +15,23 @@ jobs:
- '1.13'
- '1.12'
- '1.11'
name: build-check Go ${{ matrix.go }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go }}
- run: make build_check
test-coverage:
name: build-check Go ${{ matrix.go }}
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
with:
go-version: 1.15
- name: Get test coverage
run: make tests
- name: Send coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: coverage.out

+ 2
- 3
Makefile View File

@ -2,10 +2,9 @@
.PHONY: tests profile_tests build_check
tests: ## Run tests with coverage
@go test -v -cover ./...
profile_tests: ## Run tests and output coverage profiling
@go test -v -coverprofile=coverage.out ./...
profile_tests: tests ## Run tests and output coverage profiling
@go tool cover -html=coverage.out
build_check: ## Checks build and tests

+ 1
- 1
README.md View File

@ -7,7 +7,7 @@
[![Build check](https://github.com/tyler-smith/go-bip39/workflows/build-check/badge.svg?branch=master)](https://github.com/tyler-smith/go-bip39/actions?query=workflow%3Abuild-check+branch%3Amaster)
[![Go Report Card](https://goreportcard.com/badge/github.com/tyler-smith/go-bip39)](https://goreportcard.com/report/github.com/tyler-smith/go-bip39)
[![PGP](https://img.shields.io/keybase/pgp/tylersmith?color=green)](https://keybase.io/tylersmith)
[![Coverage Status](https://coveralls.io/repos/github/tyler-smith/go-bip39/badge.svg?branch=TS_v2)](https://coveralls.io/github/tyler-smith/go-bip39?branch=TS_v2)
## Example

Loading…
Cancel
Save